From 6ced693fc82400868851f7aab78c8339fd3ed226 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, 4 Sep 2020 10:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E8=A5=BF=E4=BA=AC=E4=B8=9C=E5=95=86?= =?UTF-8?q?=E5=9F=8E=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jdshop/order_afs.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/business/partner/purchase/jdshop/order_afs.go b/business/partner/purchase/jdshop/order_afs.go index 529484e88..bc0c8ec51 100644 --- a/business/partner/purchase/jdshop/order_afs.go +++ b/business/partner/purchase/jdshop/order_afs.go @@ -6,6 +6,8 @@ import ( "math" "time" + "git.rosy.net.cn/jx-callback/business/model/dao" + "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/model" @@ -54,6 +56,7 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G var ( skuMap = make(map[int]*model.OrderSku) salePrice int64 + db = dao.GetDB() ) for _, sku := range order.Skus { skuMap[sku.SkuID] = sku @@ -82,6 +85,10 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G VendorSkuID: utils.Int2Str(sku.SkuID), SkuID: sku.SkuID, } + storeSkus, _ := dao.GetStoresSkusInfo(db, []int{model.JdShopMainStoreID}, []int{sku.SkuID}) + if len(storeSkus) > 0 { + orderSku.VendorSkuID = utils.Int64ToStr(storeSkus[0].JdsID) + } if skuMap[sku.SkuID] != nil { orderSku.Name = skuMap[sku.SkuID].SkuName orderSku.UserMoney = skuMap[sku.SkuID].SalePrice * int64(sku.Count)