From bb5fa3461140e4ae84fa18439f7c04dbc8e66434 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 26 Oct 2023 11:17:11 +0800 Subject: [PATCH] fix --- model/gmodel/fs_product_logic.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/model/gmodel/fs_product_logic.go b/model/gmodel/fs_product_logic.go index 5cefe921..565395d7 100755 --- a/model/gmodel/fs_product_logic.go +++ b/model/gmodel/fs_product_logic.go @@ -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) }