- first version of order schedule.
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/elmapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/controller"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
@@ -15,7 +16,7 @@ type WaybillController struct {
|
||||
func (c *WaybillController) OnWaybillStatusMsg(msg *elmapi.CallbackWaybillStatusMsg) (retVal *elmapi.CallbackResponse) {
|
||||
controller.CallMsgHandler(func() {
|
||||
retVal = c.onWaybillStatusMsg(msg)
|
||||
}, controller.ComposeUniversalOrderID(msg.OrderID, model.VendorIDELM))
|
||||
}, jxutils.ComposeUniversalOrderID(msg.OrderID, model.VendorIDELM))
|
||||
return retVal
|
||||
}
|
||||
|
||||
@@ -53,12 +54,12 @@ func (c *WaybillController) callbackMsg2Waybill(msg *elmapi.CallbackWaybillStatu
|
||||
WaybillVendorID: model.VendorIDELM,
|
||||
CourierName: msg.Name,
|
||||
CourierMobile: msg.Phone,
|
||||
VendorStatus: c.composeState(msg.State, msg.SubState, elmapi.MsgTypeWaybillWait4DeliveryVendor),
|
||||
VendorStatus: c.composeState(msg.State, msg.SubState, msg.MsgType),
|
||||
WaybillCreatedAt: utils.Timestamp2Time(msg.UpdateAt / 1000),
|
||||
}
|
||||
return retVal
|
||||
}
|
||||
|
||||
func (c *WaybillController) composeState(state, subState string, msgType int) string {
|
||||
return fmt.Sprintf("%s-%s-%d", state, subState, msgType)
|
||||
return fmt.Sprintf("%s-%d", state, msgType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user