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)