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"`