uu
This commit is contained in:
@@ -1,31 +1,30 @@
|
||||
package controllers
|
||||
|
||||
//
|
||||
//import (
|
||||
// "git.rosy.net.cn/baseapi/platformapi/uuptapi"
|
||||
// "git.rosy.net.cn/jx-callback/business/partner/delivery/uupt"
|
||||
// "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 = uupt.OnWaybillMsg(resp)
|
||||
// c.Data["code"] = callbackResponse
|
||||
// c.ServeJSON()
|
||||
// } else {
|
||||
// c.Abort("404")
|
||||
// }
|
||||
//}
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/uuptapi"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery/uupt"
|
||||
"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 = uupt.OnWaybillMsg(resp)
|
||||
c.Data["code"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
c.Abort("404")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user