From 06cf6bec1e2ddfef174ae92c697fa4a3149d6826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 1 Dec 2020 17:48:25 +0800 Subject: [PATCH] aa --- business/jxcallback/orderman/order.go | 12 +++++++++--- business/partner/purchase/jdshop/order.go | 11 +++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index e112dab98..82b207507 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1610,8 +1610,10 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) ` sqlParams := []interface{}{order.VendorOrderID2} err = dao.GetRows(db, &goodsOrders, sql, sqlParams) - if goodsOrders[0].Status != model.OrderStatusCanceled { - err = jdshop.ChangeOrderStatus(goodsOrders[0].VendorOrderID, model.OrderStatusCanceled, "订单转移被取消") + for _, order := range goodsOrders { + if order.Status != model.OrderStatusCanceled { + err = jdshop.ChangeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, "订单转移被取消") + } } // suffix := utils.Str2Int(goodsOrders[0].VendorOrderID[12:len(goodsOrders[0].VendorOrderID)]) // suffix++ @@ -1663,7 +1665,11 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) if err != nil { return "", err } - order.Status = model.OrderStatusAccepted + if order.VendorOrgCode == "1" { + order.Status = model.OrderStatusAccepted + } else { + order.Status = model.OrderStatusNew + } } for _, sku := range skus { sku.VendorOrderID = order.VendorOrderID diff --git a/business/partner/purchase/jdshop/order.go b/business/partner/purchase/jdshop/order.go index 8756ae8c2..1de8509f9 100644 --- a/business/partner/purchase/jdshop/order.go +++ b/business/partner/purchase/jdshop/order.go @@ -53,13 +53,20 @@ func (p *PurchaseHandler) GetOrderStatus(vendorOrgCode, vendorOrderID string) (s } func (p *PurchaseHandler) AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptIt bool, userName string) (err error) { - var status int + var ( + status int + remark string + ) if isAcceptIt { status = model.OrderStatusAccepted + //京东商城第二个号要自动接单 + if order.VendorOrgCode == "2" { + + } } else { status = model.OrderStatusCanceled } - return ChangeOrderStatus(order.VendorOrderID, status, "") + return ChangeOrderStatus(order.VendorOrderID, status, remark) } func (p *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bool, userName string) (err error) { status, err := p.GetOrderStatus("", order.VendorOrderID2)