This commit is contained in:
苏尹岚
2021-03-26 15:02:52 +08:00
parent 5afc312f8d
commit d85011dd0a
2 changed files with 3 additions and 2 deletions

View File

@@ -119,6 +119,8 @@ func (c *PurchaseHandler) onOrderMsg(vendorOrgCode string, msg *jdapi.CallbackOr
// globals.SugarLogger.Warnf("京东取消拣货:%v", err2)
// }
// }
globals.SugarLogger.Debugf("OnOrderStatusChanged jd %s", vendorOrgCode)
globals.SugarLogger.Debug("OnOrderStatusChanged jd %s", utils.Format4Output(status, true))
err := partner.CurOrderManager.OnOrderStatusChanged(vendorOrgCode, status)
retVal = jdapi.Err2CallbackResponse(err, status.VendorStatus)
}

View File

@@ -22,11 +22,9 @@ type DjswController struct {
func (c *DjswController) handleMsg(handler func(*jdapi.API, interface{}) *jdapi.CallbackResponse) (callbackResponse *jdapi.CallbackResponse) {
callbackMsg, mapData, callbackResponse := jdapi.GetCallbackMsg(getUsefulRequest(c.Ctx))
globals.SugarLogger.Debug(utils.Format4Output(callbackMsg, true))
globals.SugarLogger.Debug(utils.Format4Output(callbackResponse, true))
if callbackResponse == nil {
if jdAPI := jd.GetAPI(jd.AppKey2OrgCode(callbackMsg.AppKey)); jdAPI != nil {
if callbackResponse = jdAPI.CheckCallbackValidation(mapData, callbackMsg.Sign); callbackResponse == nil {
globals.SugarLogger.Debugf("22222222222222222222222222222222222222", utils.Format4Output(callbackResponse, true))
callbackResponse = handler(jdAPI, callbackMsg.Param)
}
} else {
@@ -40,6 +38,7 @@ func (c *DjswController) orderStatus() {
if c.Ctx.Input.Method() == http.MethodPost {
callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
callbackResponse = jd.OnOrderMsg(obj.(*jdapi.CallbackOrderMsg))
globals.SugarLogger.Debugf("22222", utils.Format4Output(callbackResponse, true))
return callbackResponse
})
c.Data["json"] = c.transferResponse("orderStatus", callbackResponse)