fix: percent

master
howell 4 years ago
parent 994f222700
commit ac18b4944e

@ -513,7 +513,7 @@ func GetGoodsRespBySkuList(skuList []goods.Sku) []QueryCategoryGoodsListResp {
dbc.DB.First(&gb, "id = ?", goodsInfo.BrandID)
var inventory uint
var percent uint
//var percent uint
var startTime = formatime.Second{}
var endTime = formatime.Second{}
@ -538,7 +538,7 @@ func GetGoodsRespBySkuList(skuList []goods.Sku) []QueryCategoryGoodsListResp {
salesVolume = promotionSku.SalesVolume
//计算%
percent = uint(salesVolume / (inventory + salesVolume) * 100)
//percent = uint(salesVolume / (inventory + salesVolume) * 100)
startTime = promotionGoods.StartTime
endTime = promotionGoods.EndTime
@ -580,7 +580,7 @@ func GetGoodsRespBySkuList(skuList []goods.Sku) []QueryCategoryGoodsListResp {
OriginalPrice: v.OriginalPrice,
DiscountPrice: discountPrice,
Commission: commission,
Percent: percent, //百分比,-1不显示
Percent: 0, //百分比,-1不显示
StartTime: startTime,
EndTime: endTime,
Coupon: v.Coupon,

Loading…
Cancel
Save