fix
This commit is contained in:
parent
a240d9a3e3
commit
bb5fa34611
|
@ -88,9 +88,10 @@ func (p *FsProductModel) GetRandomProductList(ctx context.Context, limit int) (r
|
|||
Where("`is_del` =? and `is_shelf` = ?", 0, 1).Order("RAND()").Limit(limit).Find(&resp).Error
|
||||
return resp, err
|
||||
}
|
||||
func (p *FsProductModel) GetIgnoreRandomProductList(ctx context.Context, category int, limit int, notInProductIds []int64) (resp []FsProduct, err error) {
|
||||
func (p *FsProductModel) GetIgnoreRandomProductList(ctx context.Context, limit int, notInProductIds []int64) (resp []FsProduct, err error) {
|
||||
db := p.db.WithContext(ctx).Model(&FsProduct{}).
|
||||
Where("`is_del` =? and `is_shelf` = ? and `category` = ?", 0, 1, category)
|
||||
//过滤报价单产品
|
||||
Where("`is_del` =? and `is_shelf` = ? and `type` != ?", 0, 1, 39)
|
||||
if len(notInProductIds) > 0 {
|
||||
db = db.Where("`id` not in(?)", notInProductIds)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user