From 0e1d290e53f66ab93536e442da3708dc33959e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 5 Aug 2020 08:57:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=95=86=E5=93=81=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=9C=80=E5=8E=9F=E5=A7=8B=E7=9A=84=E6=8B=BC=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 1 + business/model/dao/store_sku.go | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 4ef397fff..768b1b30a 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -408,6 +408,7 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao. v.ShopPrice = v.SalePrice * 70 / 100 } } + v.SkuName = jxutils.ComposeSkuNameOriginal(skuBindInfo.Prefix, skuBindInfo.Name, skuBindInfo.Comment, skuBindInfo.Unit, skuBindInfo.SpecQuality, skuBindInfo.SpecUnit, 0) v.Weight = skuBindInfo.Weight // 以本地信息中的WEIGHT为准 //饿鲜达的订单做一下处理 if strings.Contains(order.StoreName, model.ExdStoreName) { diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index ed059cb03..0700961be 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -284,6 +284,12 @@ type StoreSkuPriceAndWeight struct { SkuID int `orm:"column(sku_id)"` Weight int Price int + Prefix string + Name string + Unit string + Comment string + SpecQuality float32 + SpecUnit string } type StoreSkuAndName struct { @@ -619,10 +625,12 @@ func GetStoreSkuPriceAndWeight(db *DaoDB, vendorStoreID string, vendorID int, ve vendorSkuIDField = fmt.Sprintf("t2.%s_id", ConvertDBFieldPrefix(model.VendorNames[vendorID])) } sql := fmt.Sprintf(` - SELECT %s vendor_sku_id, t1.id sku_id, t2.price, t1.weight + SELECT %s vendor_sku_id, t1.id sku_id, t2.price, t1.weight, + t5.prefix, t5.name, t1.comment, t5.unit, t1.sepc_quality, t1.sepc_unit FROM sku t1 JOIN store_sku_bind t2 ON t2.sku_id = t1.id AND t2.deleted_at = ? JOIN store_map t3 ON t3.store_id = t2.store_id AND t3.vendor_id = ? AND t3.vendor_store_id = ? AND t3.deleted_at = ? + JOIN sku_name t5 ON t5.id = t1.name_id %s WHERE %s IN (`+GenQuestionMarks(len(vendorSkuIDs))+`)`, vendorSkuIDField, sqlThingMap, vendorSkuIDField) sqlParams := []interface{}{