|
|
@ -100,7 +100,7 @@ func QueryGoodsListByComprehension(c *gin.Context) {
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
// 批发活动id
|
|
|
|
// 批发活动id
|
|
|
|
sub := mysql2.Db.Table((&ac2.ActivityGoods{}).TableName()).Select("goods_id").Where("activity_id = ?", p.ActivityID)
|
|
|
|
sub := mysql2.Db.Table((&ac2.ActivityGoods{}).TableName()).Select("goods_id").Where("activity_id = ?", p.ActivityID)
|
|
|
|
q3 = q3.Where("id in (?) and sale_publish = 1 and is_sal e= 1", sub)
|
|
|
|
q3 = q3.Where("id in (?) and sale_publish = 1 and is_sale = 1", sub)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
findByKeyWord(q3, p.Keyword, &goodsList, p.Page, p.IsSale)
|
|
|
|
findByKeyWord(q3, p.Keyword, &goodsList, p.Page, p.IsSale)
|
|
|
|
back.Suc(c, "", GetGoodsRespByInfoList(goodsList, p.UserId, p.IsSale))
|
|
|
|
back.Suc(c, "", GetGoodsRespByInfoList(goodsList, p.UserId, p.IsSale))
|
|
|
@ -157,7 +157,7 @@ func QueryGoodsListBySalesVolume(c *gin.Context) {
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
// 批发活动id
|
|
|
|
// 批发活动id
|
|
|
|
sub := mysql2.Db.Table((&ac2.ActivityGoods{}).TableName()).Select("goods_id").Where("activity_id = ?", p.ActivityID)
|
|
|
|
sub := mysql2.Db.Table((&ac2.ActivityGoods{}).TableName()).Select("goods_id").Where("activity_id = ?", p.ActivityID)
|
|
|
|
q3 = q3.Where("id in (?) and sale_publish = 1 and is_sal e= 1", sub)
|
|
|
|
q3 = q3.Where("id in (?) and sale_publish = 1 and is_sale = 1", sub)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
findByKeyWord(q3, p.Keyword, &goodsList, p.Page, p.IsSale)
|
|
|
|
findByKeyWord(q3, p.Keyword, &goodsList, p.Page, p.IsSale)
|
|
|
|
back.Suc(c, "", GetGoodsRespByInfoList(goodsList, p.UserId, p.IsSale))
|
|
|
|
back.Suc(c, "", GetGoodsRespByInfoList(goodsList, p.UserId, p.IsSale))
|
|
|
@ -186,7 +186,7 @@ func QueryGoodsListByDiscountPrice(c *gin.Context) {
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
if p.ActivityID != 0 {
|
|
|
|
// 批发活动id
|
|
|
|
// 批发活动id
|
|
|
|
sub := mysql2.Db.Table((&ac2.ActivityGoods{}).TableName()).Select("goods_id").Where("activity_id = ?", p.ActivityID)
|
|
|
|
sub := mysql2.Db.Table((&ac2.ActivityGoods{}).TableName()).Select("goods_id").Where("activity_id = ?", p.ActivityID)
|
|
|
|
q3 = q3.Where("id in (?) and sale_publish = 1 and is_sal e= 1", sub)
|
|
|
|
q3 = q3.Where("id in (?) and sale_publish = 1 and is_sale= 1", sub)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
findByKeyWord(q3, p.Keyword, &goodsInfoIdList, p.Page, p.IsSale)
|
|
|
|
findByKeyWord(q3, p.Keyword, &goodsInfoIdList, p.Page, p.IsSale)
|
|
|
|