京东增加回调测试

This commit is contained in:
苏尹岚
2020-04-28 17:15:51 +08:00
parent 586c12d352
commit 75c5d2eaa9

View File

@@ -217,15 +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() {
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")
}
c.orderStatus()
}