- mtwm save order related status

This commit is contained in:
gazebo
2018-11-30 15:45:34 +08:00
parent d47f1bd41b
commit f2e45c24a8
6 changed files with 46 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ func (c *PurchaseHandler) onWaybillMsg(msg *mtwmapi.CallbackMsg) (response *mtwm
func (c *PurchaseHandler) callbackMsg2Waybill(msg *mtwmapi.CallbackMsg) (retVal *model.Waybill) {
orderID := GetOrderIDFromMsg(msg)
vendorStatus := msg.Data.Get("logistics_status")
retVal = &model.Waybill{
VendorOrderID: orderID,
OrderVendorID: model.VendorIDMTWM,
@@ -39,7 +40,8 @@ func (c *PurchaseHandler) callbackMsg2Waybill(msg *mtwmapi.CallbackMsg) (retVal
WaybillVendorID: model.VendorIDMTWM,
CourierName: msg.Data.Get("dispatcher_name"),
CourierMobile: msg.Data.Get("dispatcher_mobile"),
VendorStatus: msg.Data.Get("logistics_status"),
VendorStatus: vendorStatus,
Status: c.GetWaybillStatusFromVendorStatus(vendorStatus),
StatusTime: getTimeFromTimestamp(utils.Str2Int64(msg.Data.Get("time"))),
Remark: "",
}