From 244dd71de08f7dedec2e61e59d9d81a7a70519c1 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, 5 Jun 2020 10:08:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index deca4febc..e0439b2c0 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1107,6 +1107,15 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o VendorPrice: jxutils.StandardPrice2Int(v.JdPrice), SalePrice: jxutils.StandardPrice2Int(v.JdPrice), } + var storeSku *model.StoreSkuBind + sql := ` + SELECT * FROM store_sku_bind WHERE store_id = ? AND jds_id = ? AND deleted_at = ? + ` + sqlParams := []interface{}{model.JdShopMainStoreID, v.SkuID, utils.DefaultTimeValue} + err = dao.GetRow(dao.GetDB(), &storeSku, sql, sqlParams) + if storeSku != nil { + sku.SkuID = storeSku.SkuID + } _, _, _, specUnit, _, specQuality := jxutils.SplitSkuName(v.SkuName) sku.Weight = jxutils.FormatSkuWeight(specQuality, specUnit) order.Skus = append(order.Skus, sku)