- fixed mtps fee cal bug.

This commit is contained in:
gazebo
2018-07-19 21:10:26 +08:00
parent 61157174e6
commit 680c0a0696
6 changed files with 16 additions and 11 deletions

View File

@@ -24,12 +24,12 @@ func (c *WaybillController) OnWaybillStatusMsg(msg *elmapi.CallbackWaybillStatus
func (c *WaybillController) onWaybillStatusMsg(msg *elmapi.CallbackWaybillStatusMsg) (retVal *elmapi.CallbackResponse) {
order := c.callbackMsg2Waybill(msg)
if msg.MsgType == elmapi.MsgTypeWaybillWait4DeliveryVendor {
order.Status = model.WaybillStatusNew
} else if msg.MsgType == elmapi.MsgTypeWaybillPickingUp {
if result, err := api.ElmAPI.GetOrder(msg.OrderID); err == nil {
order.DesiredFee = controller.StandardPrice2Int(utils.Interface2FloatWithDefault(result["deliverFee"], 0.0) +
utils.Interface2FloatWithDefault(result["vipDeliveryFeeDiscount"], 0.0))
}
order.Status = model.WaybillStatusNew
} else if msg.MsgType == elmapi.MsgTypeWaybillPickingUp {
order.Status = model.WaybillStatusAccepted
} else if msg.MsgType == elmapi.MsgTypeWaybillCourierArrived {
order.Status = model.WaybillStatusCourierArrived