京东新单新回调测试

This commit is contained in:
苏尹岚
2020-04-28 17:48:42 +08:00
parent 75c5d2eaa9
commit 8436f30eec
4 changed files with 24 additions and 16 deletions

View File

@@ -217,19 +217,19 @@ func (c *DjswController) OrderAddTips() {
c.orderStatus()
}
// func (c *DjswController) OrderInfoChange() {
// if c.Ctx.Input.Method() == http.MethodPost {
// callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
// callbackResponse = jd.OnOrderInfoChangeMsg(obj.(*jdapi.CallbackOrderInfoChangeMsg))
// return callbackResponse
// })
// c.Data["json"] = c.transferResponse("OrderInfoChange", callbackResponse)
// c.ServeJSON()
// } else {
// c.Abort("404")
// }
// }
func (c *DjswController) OrderInfoChange() {
c.orderStatus()
if c.Ctx.Input.Method() == http.MethodPost {
callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
callbackResponse = jd.OnOrderInfoChangeMsg(obj.(*jdapi.CallbackOrderInfoChangeMsg))
return callbackResponse
})
c.Data["json"] = c.transferResponse("OrderInfoChange", callbackResponse)
c.ServeJSON()
} else {
c.Abort("404")
}
}
// func (c *DjswController) OrderInfoChange() {
// c.orderStatus()
// }