|
|
|
@ -388,13 +388,13 @@ func GetGoodsRespByInfoList(goodsList []goods.Information, userID uint) []QueryC
|
|
|
|
|
var sku goods.Sku
|
|
|
|
|
mysql2.Db.Select(
|
|
|
|
|
"MIN(name), "+
|
|
|
|
|
"SUM(inventory) AS inventory, "+
|
|
|
|
|
"SUM(sales_volume) AS sales_volume, "+
|
|
|
|
|
"MIN(purchase_price) AS purchase_price,"+
|
|
|
|
|
"MIN(original_price) AS original_price, "+
|
|
|
|
|
"MIN(discount_price) AS discount_price, "+
|
|
|
|
|
"MIN(commission) AS commission,"+
|
|
|
|
|
"MIN(coupon) AS coupon").
|
|
|
|
|
"SUM(inventory) AS inventory, "+
|
|
|
|
|
"SUM(sales_volume) AS sales_volume, "+
|
|
|
|
|
"MIN(purchase_price) AS purchase_price,"+
|
|
|
|
|
"MIN(original_price) AS original_price, "+
|
|
|
|
|
"MIN(discount_price) AS discount_price, "+
|
|
|
|
|
"MIN(commission) AS commission,"+
|
|
|
|
|
"MIN(coupon) AS coupon").
|
|
|
|
|
Where("goods_id = ?", v.ID).
|
|
|
|
|
Group("goods_id").
|
|
|
|
|
Find(&sku)
|
|
|
|
@ -457,7 +457,7 @@ func GetGoodsRespByInfoList(goodsList []goods.Information, userID uint) []QueryC
|
|
|
|
|
space := " "
|
|
|
|
|
list = append(list, QueryCategoryGoodsListResp{
|
|
|
|
|
ID: v.ID,
|
|
|
|
|
GoodsName: strings.Join([]string{v.GoodsName, strings.Replace(sku.Name, "+", space, -1)},space),
|
|
|
|
|
GoodsName: strings.Join([]string{v.GoodsName, strings.Replace(sku.Name, "+", space, -1)}, space),
|
|
|
|
|
BrandName: gb.Name + "品牌馆",
|
|
|
|
|
BrandImg: gb.LogoURL,
|
|
|
|
|
BrandId: gb.ID,
|
|
|
|
@ -480,7 +480,7 @@ func GetGoodsRespByInfoList(goodsList []goods.Information, userID uint) []QueryC
|
|
|
|
|
HasCoin: recookGoodsInfoModel.HasCoin(v.Storehouse),
|
|
|
|
|
HasBalance: recookGoodsInfoModel.HasBalance(v.Storehouse),
|
|
|
|
|
GysId: v.VendorID,
|
|
|
|
|
CountryIcon: ,
|
|
|
|
|
CountryIcon: "",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|