aa
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user