- delivery fee added.

- fixed scheduler bug
This commit is contained in:
gazebo
2018-07-19 18:05:40 +08:00
parent 56fcb4f4ed
commit a56cb64f8e
8 changed files with 111 additions and 10 deletions

View File

@@ -29,6 +29,9 @@ func (c *WaybillController) onWaybillMsg(msg *dadaapi.CallbackMsg) (retVal *dada
order := c.callbackMsg2Waybill(msg)
switch msg.OrderStatus {
case dadaapi.OrderStatusWaitingForAccept:
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