1
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type DYPSController struct {
|
||||
web.Controller
|
||||
}
|
||||
|
||||
//抖音运力配送 回调
|
||||
func (d *DYPSController) CallbackDYPSDeliveryMsg() {
|
||||
resp, byteList := api.TiktokStore.EventSignChange(d.Ctx.Request)
|
||||
if resp.Code != 0 {
|
||||
d.Data["json"] = resp
|
||||
d.ServeJSON()
|
||||
return
|
||||
}
|
||||
if strings.Contains(string(byteList), "\"msg_id\":\"0\"") {
|
||||
d.Data["json"] = tiktok_api.CallbackResponse{Code: tiktok_api.CallbackSuccessCode, Msg: tiktok_api.CallbackSuccess}
|
||||
d.ServeJSON()
|
||||
return
|
||||
}
|
||||
|
||||
if d.Ctx.Input.Method() == http.MethodPost {
|
||||
//msg,callbaskResponse:=api.TiktokStore.
|
||||
}
|
||||
}
|
||||
30
controllers/uupt_callback.go
Normal file
30
controllers/uupt_callback.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/uuptapi"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type UuPtController struct {
|
||||
web.Controller
|
||||
}
|
||||
|
||||
//运单状态回调
|
||||
func (c *UuPtController) UuWaybillCallback() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
resp, callbackResponse := api.UuAPI.WaybillCallback(c.Ctx.Request)
|
||||
if callbackResponse.ReturnCode == uuptapi.ReturnFail {
|
||||
c.Data["code"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
return
|
||||
}
|
||||
|
||||
//callbackResponse=uuptapi.
|
||||
c.Data["code"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
c.Abort("404")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user