京东商城订单修改

This commit is contained in:
苏尹岚
2020-06-03 16:28:53 +08:00
parent 952d41c43a
commit f040fdb028
9 changed files with 111 additions and 35 deletions

View File

@@ -5,8 +5,6 @@ import (
"strings"
"time"
"git.rosy.net.cn/jx-callback/business/partner/purchase/jdshop"
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/baseapi/utils/errlist"
@@ -43,12 +41,6 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *
courierVendorID := storeCourier.VendorID
bill, err2 := c.CreateWaybill(courierVendorID, order, maxDeliveryFee)
if err = err2; err == nil {
if order.VendorID == model.VendorIDJDShop {
err = jdshop.CurPurchaseHandler.OrderExport(ctx, bill.VendorOrderID, bill.VendorWaybillID)
if err != nil {
errList.AddErr(fmt.Errorf("平台:%s,%s", jxutils.GetVendorName(courierVendorID), err.Error()))
}
}
globals.SugarLogger.Debugf("CreateWaybillOnProviders orderID:%s userName:%s vendorID:%d bill:%v", order.VendorOrderID, userName, courierVendorID, bill)
bills = append(bills, bill)
if createOnlyOne {

View File

@@ -7,6 +7,7 @@ import (
"time"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"git.rosy.net.cn/jx-callback/business/partner/purchase/jdshop"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
@@ -537,7 +538,10 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
}
s.updateOrderByBill(order, bill, false)
s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
//京东商城的话,需要去把订单出库
if order.VendorID == model.VendorIDJDShop {
err = jdshop.CurPurchaseHandler.OrderExport(jxcontext.AdminCtx, bill.VendorOrderID, bill.VendorWaybillID, true)
}
if model.IsWaybillPlatformOwn(bill) {
if bill.Status == model.WaybillStatusDelivering && order.Status < model.OrderStatusEndBegin {
// 强制将订单状态置为配送中?