- 查询活动时,返回earngPrice
This commit is contained in:
@@ -405,6 +405,7 @@ func CreateJdPromotion(ctx *jxcontext.Context, vendorID int, isIDJd bool, isAsyn
|
|||||||
Price: skuPrice.Price,
|
Price: skuPrice.Price,
|
||||||
LimitSkuCount: skuPrice.LimitSkuCount,
|
LimitSkuCount: skuPrice.LimitSkuCount,
|
||||||
IsLock: skuPrice.IsLock,
|
IsLock: skuPrice.IsLock,
|
||||||
|
EarningPrice: skuPrice.EarningPrice,
|
||||||
}
|
}
|
||||||
dao.WrapAddIDCULDEntity(promotionSku, ctx.GetUserName())
|
dao.WrapAddIDCULDEntity(promotionSku, ctx.GetUserName())
|
||||||
if err = dao.CreateEntity(db, promotionSku); err != nil {
|
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.end_at,
|
||||||
t1.advertising,
|
t1.advertising,
|
||||||
CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"storeID":', t2.store_id, ', "name":"', REPLACE(REPLACE(t22.name, '\t', ''), '"', ''), '"}')), "]") store_str,
|
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
|
FROM promotion t1
|
||||||
JOIN promotion_store t2 ON t1.id = t2.promotion_id
|
JOIN promotion_store t2 ON t1.id = t2.promotion_id
|
||||||
JOIN store t22 ON t2.store_id = t22.id
|
JOIN store t22 ON t2.store_id = t22.id
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ var (
|
|||||||
type Promotion struct {
|
type Promotion struct {
|
||||||
ModelIDCULD
|
ModelIDCULD
|
||||||
|
|
||||||
VendorID int `orm:"column(vendor_id)"`
|
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||||
Name string `orm:"size(64)" json:"name"`
|
Name string `orm:"size(64)" json:"name"`
|
||||||
Advertising string `orm:"size(255)" json:"advertising"`
|
Advertising string `orm:"size(255)" json:"advertising"`
|
||||||
Type int `json:"type"`
|
Type int `json:"type"`
|
||||||
|
|||||||
Reference in New Issue
Block a user