- first version of order schedule.
This commit is contained in:
@@ -4,8 +4,10 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/dadaapi"
|
||||
"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"
|
||||
"git.rosy.net.cn/jx-callback/business/scheduler"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
@@ -53,15 +55,18 @@ func (c *WaybillController) callbackMsg2Waybill(msg *dadaapi.CallbackMsg) (retVa
|
||||
VendorStatus: utils.Int2Str(msg.OrderStatus),
|
||||
WaybillCreatedAt: utils.Timestamp2Time(int64(msg.UpdateTime)),
|
||||
}
|
||||
retVal.VendorOrderID, retVal.OrderVendorID = controller.SplitUniversalOrderID(msg.OrderID)
|
||||
retVal.VendorOrderID, retVal.OrderVendorID = jxutils.SplitUniversalOrderID(msg.OrderID)
|
||||
return retVal
|
||||
}
|
||||
|
||||
// DeliveryPlatformHandler
|
||||
func (c *WaybillController) CreateWaybill(order *model.GoodsOrder) (err error) {
|
||||
globals.SugarLogger.Infof("CreateWaybill order:%v", order)
|
||||
return nil
|
||||
|
||||
billParams := &dadaapi.OperateOrderRequiredParams{
|
||||
ShopNo: utils.Int2Str(order.StoreID), // 当前达达的门店号与京西是一样的
|
||||
OriginID: controller.ComposeUniversalOrderID(order.VendorOrderID, order.VendorID),
|
||||
OriginID: jxutils.ComposeUniversalOrderID(order.VendorOrderID, order.VendorID),
|
||||
CargoPrice: controller.IntPrice2Standard(order.SalePrice),
|
||||
IsPrepay: 0,
|
||||
ReceiverName: order.ConsigneeName,
|
||||
@@ -81,6 +86,9 @@ func (c *WaybillController) CreateWaybill(order *model.GoodsOrder) (err error) {
|
||||
}
|
||||
|
||||
func (c *WaybillController) CancelWaybill(bill *model.Waybill) (err error) {
|
||||
globals.SugarLogger.Infof("CancelWaybill bill:%v", bill)
|
||||
return nil
|
||||
|
||||
reasonID := dadaapi.ReasonIDOther
|
||||
reasonMsg := "other reason"
|
||||
if bill.Status < model.WaybillStatusAccepted {
|
||||
|
||||
Reference in New Issue
Block a user