供货采购不展示未上架商品

This commit is contained in:
luofei 2023-05-29 14:09:07 +08:00
parent 21369789de
commit e4a8af4275
2 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,9 @@ class Product extends BaseModel
protected $deleteTime = 'is_del';
protected $defaultSoftDelete = 0;
const IS_SHOW = 1; //上架
const IS_NOT_SHOW = 0; //下架
/**
* @Author:Qinii
* @Date: 2020/5/8

View File

@ -122,6 +122,7 @@ class Merchant extends BaseModel
{
$list = Product::where('mer_id', $this['mer_id'])
->where((new ProductDao())->productTypeShow(98))
->where('is_show', Product::IS_SHOW)
->field('mer_id,product_id,product_type,store_name,image,price,is_show,status,is_gift_bag,is_good,cate_id')
->order('sort DESC, create_time DESC')
->limit(10)