|
|
|
@ -90,12 +90,15 @@ func QueryGoodsListByComprehension(c *gin.Context) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var goodsList []goods.Information
|
|
|
|
|
status := 1
|
|
|
|
|
if p.IsSale {
|
|
|
|
|
status = 0
|
|
|
|
|
}
|
|
|
|
|
q3 := mysql2.Db.Table("recook_goods_info as a").
|
|
|
|
|
Order("id desc").Where(goods.Information{
|
|
|
|
|
BrandID: p.BrandID,
|
|
|
|
|
SecondCategoryID: p.SecondCategoryID,
|
|
|
|
|
PublishStatus: 1,
|
|
|
|
|
Country: p.CountryId,
|
|
|
|
|
PublishStatus: uint(status),
|
|
|
|
|
})
|
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
|
// 批发活动id
|
|
|
|
@ -146,12 +149,17 @@ func QueryGoodsListBySalesVolume(c *gin.Context) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
status := 1
|
|
|
|
|
if p.IsSale {
|
|
|
|
|
status = 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var goodsList []goods.Information
|
|
|
|
|
order := fmt.Sprintf("sales_volume %s, id desc", p.Order)
|
|
|
|
|
q3 := mysql2.Db.Table("recook_goods_info as a").Order(order).Where(goods.Information{
|
|
|
|
|
BrandID: p.BrandID,
|
|
|
|
|
SecondCategoryID: p.SecondCategoryID,
|
|
|
|
|
PublishStatus: 1,
|
|
|
|
|
PublishStatus: uint(status),
|
|
|
|
|
Country: p.CountryId,
|
|
|
|
|
})
|
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
@ -175,11 +183,15 @@ func QueryGoodsListByDiscountPrice(c *gin.Context) {
|
|
|
|
|
}
|
|
|
|
|
var goodsIdList []uint
|
|
|
|
|
|
|
|
|
|
status := 1
|
|
|
|
|
if p.IsSale {
|
|
|
|
|
status = 0
|
|
|
|
|
}
|
|
|
|
|
var goodsInfoIdList []goods.Information
|
|
|
|
|
q3 := mysql2.Db.Table("recook_goods_info as a").Where(goods.Information{
|
|
|
|
|
BrandID: p.BrandID,
|
|
|
|
|
SecondCategoryID: p.SecondCategoryID,
|
|
|
|
|
PublishStatus: 1,
|
|
|
|
|
PublishStatus: uint(status),
|
|
|
|
|
Country: p.CountryId,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|