From d8c73c6710c72842a4a43d9149be0d582d8e7e0a Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 19 Jun 2019 14:21:47 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=9F=A5=E8=AF=A2=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E8=BF=94=E5=9B=9EearngPrice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/promotion/jd_promotion.go | 4 +++- business/model/promotion.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/business/jxstore/promotion/jd_promotion.go b/business/jxstore/promotion/jd_promotion.go index 423bc7f62..4e3610eb3 100644 --- a/business/jxstore/promotion/jd_promotion.go +++ b/business/jxstore/promotion/jd_promotion.go @@ -405,6 +405,7 @@ func CreateJdPromotion(ctx *jxcontext.Context, vendorID int, isIDJd bool, isAsyn Price: skuPrice.Price, LimitSkuCount: skuPrice.LimitSkuCount, IsLock: skuPrice.IsLock, + EarningPrice: skuPrice.EarningPrice, } dao.WrapAddIDCULDEntity(promotionSku, ctx.GetUserName()) if err = dao.CreateEntity(db, promotionSku); err != nil { @@ -513,7 +514,8 @@ func GetJdPromotions(ctx *jxcontext.Context, keyword string, params map[string]i t1.end_at, t1.advertising, CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"storeID":', t2.store_id, ', "name":"', REPLACE(REPLACE(t22.name, '\t', ''), '"', ''), '"}')), "]") store_str, - CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"skuID":', t3.sku_id, ', "priceType":', t3.price_type, ', "price":', t3.price, ', "limitSkuCount":', t3.limit_sku_count, ', "isLock":', t3.is_lock, '}')), "]") sku_price_str + CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"skuID":', t3.sku_id, ', "priceType":', t3.price_type, ', "price":', t3.price, + ', "limitSkuCount":', t3.limit_sku_count, ', "isLock":', t3.is_lock, ', "earningPrice":', t3.earning_price, '}')), "]") sku_price_str FROM promotion t1 JOIN promotion_store t2 ON t1.id = t2.promotion_id JOIN store t22 ON t2.store_id = t22.id diff --git a/business/model/promotion.go b/business/model/promotion.go index 0b79d5b34..ca4037cc3 100644 --- a/business/model/promotion.go +++ b/business/model/promotion.go @@ -30,7 +30,7 @@ var ( type Promotion struct { ModelIDCULD - VendorID int `orm:"column(vendor_id)"` + VendorID int `orm:"column(vendor_id)" json:"vendorID"` Name string `orm:"size(64)" json:"name"` Advertising string `orm:"size(255)" json:"advertising"` Type int `json:"type"`