master
howell 4 years ago
parent ac18b4944e
commit b68bfa4027

@ -529,7 +529,7 @@ func GetGoodsRespBySkuList(skuList []goods.Sku) []QueryCategoryGoodsListResp {
First(&promotionGoods, "goods_id = ? AND start_time <= ? AND end_time >= ?", v.GoodsID, now, now)
if promotionGoods.ID > 0 {
var promotionSku promotion.Sku
dbc.DB.Select("SUM(inventory) AS inventory, SUM(sales_volume) AS sales_volume,discount_price,commission").
dbc.DB.Select("SUM(inventory) AS inventory, SUM(sales_volume) AS sales_volume,min(discount_price) as discount_price,min(discount_price) as discount_price").
First(&promotionSku, "promotion_goods_id = ?", promotionGoods.ID)
discountPrice = promotionSku.DiscountPrice //活动的价格
commission = promotionSku.Commission //活动的佣金

Loading…
Cancel
Save