- OnNewPromotionMsg

This commit is contained in:
gazebo
2018-11-08 11:27:31 +08:00
parent 1fd2305269
commit 11f8ba1ecd
2 changed files with 18 additions and 3 deletions

View File

@@ -116,7 +116,14 @@ func (c *DjswController) StockIsHave() {
}
func (c *DjswController) SinglePromoteCreate() {
globals.SugarLogger.Info(string(c.Ctx.Input.RequestBody))
c.Data["json"] = jdapi.Err2CallbackResponse(nil, "")
c.ServeJSON()
if c.Ctx.Input.Method() == http.MethodPost {
obj, callbackResponse := api.JdAPI.GetOrderCallbackMsg(c.Ctx.Input.RequestBody)
if callbackResponse == nil {
callbackResponse = promotion.OnNewPromotionMsg(obj)
}
c.Data["json"] = callbackResponse
c.ServeJSON()
} else {
c.Abort("404")
}
}