From c671db77f188fc20d7204fde96bad1d8ee97560a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 19 Jun 2020 09:25:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=BD=AC=E7=A7=BB=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E5=81=9C=E6=AD=A2=E8=B7=B3=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index c1f5b9ba5..7c72bdde8 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1092,6 +1092,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o TotalShopMoney: utils.Float64TwoInt64(math.Round(utils.Int64ToFloat64(orderDetail.ActualPayPrice) * jdshopapi.JdsPayPercentage)), DeliveryFlag: model.OrderDeliveryFlagMaskScheduleDisabled, StatusTime: utils.Str2Time(jdsOrder.OrderCreateTime + ":00"), + OrderSeq: 0, } //获取真实手机号 fakeMobile, err := api.JdShopAPI.PhoneSensltiveInfo(order.VendorOrderID2, orderDetail.MobileKey) @@ -1130,6 +1131,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o } else { globals.SugarLogger.Errorf("未知的京东商城订单状态!status : %v", jdsOrder.OrderStatus) } + setJdsOrderSeq(order) for _, v := range jdsOrder.OrderItems { sku := &model.OrderSku{ VendorID: model.VendorIDJDShop, @@ -1158,6 +1160,12 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o return orders, err } +func setJdsOrderSeq(orders *model.GoodsOrder) { + // sql := ` + // SELECT * FROM + // ` +} + func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) (vendorOrderIDJds string, err error) { globals.SugarLogger.Debugf("jds TransferJdsOrder vendorOrderID: %v, storeID : %v", vendorOrderID, storeID) var ( @@ -1221,6 +1229,9 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) sku.ID = 0 order.Skus = append(order.Skus, sku) } + if storeID != model.JdShopMainStoreID { + order.DeliveryFlag = model.NO + } order.Status = model.OrderStatusNew err = partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order)) vendorOrderIDJds = order.VendorOrderID