diff --git a/app/controller/api/store/product/CloudWarehouse.php b/app/controller/api/store/product/CloudWarehouse.php index 26dbe786..21d6843a 100644 --- a/app/controller/api/store/product/CloudWarehouse.php +++ b/app/controller/api/store/product/CloudWarehouse.php @@ -5,6 +5,7 @@ namespace app\controller\api\store\product; use app\common\dao\system\merchant\MerchantDao; use app\common\model\system\merchant\Merchant; use app\common\repositories\store\product\SpuRepository; +use think\facade\Db; use think\App; use crmeb\basic\BaseController; @@ -45,10 +46,11 @@ class CloudWarehouse extends BaseController */ public function index() { + $typeStoreId = Db::name('MerchantType')->where('type_code', MerchantModel::TypeCode['TypeStore'])->value('mer_type_id'); $params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword']); $search = [ 'street_id' => $params['street_code'], - 'type_id' => Merchant::TypeStore, + 'type_id' => $typeStoreId, 'category_id' => $params['category_id'], 'status' => 1, 'is_del' => 0,