- record cancel reason for dada.

- revert Infof to Warnf when WaybillStatusFailed.
This commit is contained in:
gazebo
2018-08-07 11:24:34 +08:00
parent d3f4b0079f
commit d0ed9cae4f
2 changed files with 3 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ func (c *WaybillController) callbackMsg2Waybill(msg *dadaapi.CallbackMsg) (retVa
CourierName: msg.DmName,
CourierMobile: msg.DmMobile,
VendorStatus: utils.Int2Str(msg.OrderStatus),
Remark: msg.CancelReason,
// StatusTime: utils.Timestamp2Time(int64(msg.UpdateTime)),
}
// dada太扯了不同消息过来的时间格式不一样

View File

@@ -316,8 +316,8 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
s.updateOrderByBill(order, bill, false)
}
} else {
// 创建运单失败时可能到这里来比如818874313000121改Warnf为Infof
globals.SugarLogger.Infof("OnWaybillStatusChanged Failed bill:%v shouldn't got here, order details:%v", bill, order)
// 创建运单失败时可能到这里来比如818874313000121
globals.SugarLogger.Warnf("OnWaybillStatusChanged Failed bill:%v shouldn't got here, order details:%v", bill, order)
}
case model.WaybillStatusCanceled:
s.removeWaybillFromMap(savedOrderInfo, bill)