diff --git a/app/common/model/store/product/Product.php b/app/common/model/store/product/Product.php index d3dbd9e3..21e9b6e4 100644 --- a/app/common/model/store/product/Product.php +++ b/app/common/model/store/product/Product.php @@ -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 diff --git a/app/common/model/system/merchant/Merchant.php b/app/common/model/system/merchant/Merchant.php index f3d83c9c..fdaf5872 100644 --- a/app/common/model/system/merchant/Merchant.php +++ b/app/common/model/system/merchant/Merchant.php @@ -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)