- delivery fee added.
- fixed scheduler bug
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/controller"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
type WaybillController struct {
|
||||
@@ -23,6 +24,10 @@ 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 {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user