- 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

@@ -29,11 +29,11 @@ func (c *WaybillController) onWaybillMsg(msg *dadaapi.CallbackMsg) (retVal *dada
order := c.callbackMsg2Waybill(msg)
switch msg.OrderStatus {
case dadaapi.OrderStatusWaitingForAccept:
order.Status = model.WaybillStatusNew
case dadaapi.OrderStatusAccepted:
if result, err := api.DadaAPI.QueryOrderInfo(msg.OrderID); err == nil {
order.DesiredFee = controller.StandardPrice2Int(utils.Interface2FloatWithDefault(result["deliveryFee"], 0.0))
}
order.Status = model.WaybillStatusNew
case dadaapi.OrderStatusAccepted:
order.Status = model.WaybillStatusAccepted
case dadaapi.OrderStatusDelivering:
order.Status = model.WaybillStatusDelivering