京东订单测试门店
This commit is contained in:
@@ -2,8 +2,10 @@ package jdeclp
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdeclpapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
@@ -46,7 +48,7 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
||||
if len(stores) == 0 || err != nil {
|
||||
return bill, fmt.Errorf("未查询到该门店! 门店id :[%v]", storeID)
|
||||
}
|
||||
_, err = api.JdEclpAPI.WaybillReceive(&jdeclpapi.WaybillReceiveParam{
|
||||
vendorWaybillID, err := api.JdEclpAPI.WaybillReceive(&jdeclpapi.WaybillReceiveParam{
|
||||
SalePlat: jdeclpapi.SalePlatSourceDelivery,
|
||||
CustomerCode: jdeclpapi.CustomerCode,
|
||||
OrderID: order.VendorOrderID,
|
||||
@@ -60,8 +62,20 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
||||
Vloumn: order.Weight,
|
||||
PackageCount: 1,
|
||||
Description: "生鲜",
|
||||
Aging: 5,
|
||||
})
|
||||
// partner.CurOrderManager.OnWaybillStatusChanged(order)
|
||||
waybill := &model.Waybill{
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
OrderVendorID: model.VendorIDJDShop,
|
||||
VendorWaybillID: vendorWaybillID,
|
||||
WaybillVendorID: model.VendorIDJDWL,
|
||||
Status: model.WaybillStatusDelivering,
|
||||
WaybillCreatedAt: time.Now(),
|
||||
StatusTime: time.Now(),
|
||||
WaybillFinishedAt: utils.DefaultTimeValue,
|
||||
DeliveryFlag: model.OrderDeliveryFlagMaskScheduleDisabled,
|
||||
}
|
||||
dao.CreateEntity(dao.GetDB(), waybill)
|
||||
return bill, err
|
||||
}
|
||||
func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user