调整店铺云商品列表查询

This commit is contained in:
luofei 2023-05-24 14:10:59 +08:00
parent 9bdc500954
commit 0129bdb573

View File

@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace app\controller\api\store\product;
use app\common\model\system\merchant\Merchant;
use app\common\repositories\store\product\ProductRepository;
use app\common\repositories\store\StoreCategoryRepository;
use app\common\repositories\system\merchant\MerchantRepository;
@ -101,8 +102,8 @@ class StoreSpu extends BaseController
'keyword', 'cate_id', 'order', 'price_on', 'price_off', 'brand_id', 'pid', 'mer_cate_id', ['product_type', 0], 'action', 'common'
]);
if ($where['action']) unset($where['product_type']);
// $category_id=Db::name('merchant')->where('mer_id',$id)->value('category_id');->where('category_id',$category_id)
$mer_id=Db::name('merchant')->where('mer_state',1)->where('status',1)->where('type_id',11)->value('mer_id');
$category_id=Db::name('merchant')->where('mer_id',$id)->value('category_id');
$mer_id=Db::name('merchant')->where('mer_state',1)->where('status',1)->where('category_id',$category_id)->where('type_id',Merchant::TypeCloudWarehouse)->value('mer_id');
if (!$mer_id){
return app('json')->success(['count'=>0,'list'=>[]]);