修复上次提交处理平台vendorOrgCode的bug

This commit is contained in:
gazebo
2019-12-09 15:45:09 +08:00
parent ecedbe9be4
commit 8b33ec5f5a
18 changed files with 45 additions and 24 deletions

View File

@@ -8,14 +8,14 @@ import (
"git.rosy.net.cn/jx-callback/business/partner"
)
func (c *PurchaseHandler) OnWaybillMsg(a *jdapi.API, msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackResponse) {
func (c *PurchaseHandler) OnWaybillMsg(vendorOrgCode string, msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackResponse) {
jxutils.CallMsgHandler(func() {
retVal = c.onWaybillMsg(a, msg)
retVal = c.onWaybillMsg(vendorOrgCode, msg)
}, jxutils.ComposeUniversalOrderID(msg.OrderID, model.VendorIDJD))
return retVal
}
func (c *PurchaseHandler) onWaybillMsg(a *jdapi.API, msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackResponse) {
func (c *PurchaseHandler) onWaybillMsg(vendorOrgCode string, msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackResponse) {
order := c.callbackMsg2Waybill(msg)
switch msg.DeliveryStatus {
case jdapi.DeliveryStatusWait4Grap:
@@ -63,6 +63,8 @@ func (c *PurchaseHandler) callbackMsg2Waybill(msg *jdapi.CallbackDeliveryStatusM
VendorStatus: msg.DeliveryStatus,
StatusTime: utils.Str2Time(msg.DeliveryStatusTime),
Remark: msg.Remark,
VendorOrgCode: appKey2OrgCode(msg.AppKey),
}
return retVal
}