diff --git a/app/common/repositories/system/merchant/MerchantTypeRepository.php b/app/common/repositories/system/merchant/MerchantTypeRepository.php index b29fe252..dfa9eb94 100644 --- a/app/common/repositories/system/merchant/MerchantTypeRepository.php +++ b/app/common/repositories/system/merchant/MerchantTypeRepository.php @@ -49,9 +49,18 @@ class MerchantTypeRepository extends BaseRepository return compact('count', 'list'); } - public function getSelect($getAll = true) + public function getSelect($getAll = true, $siftStore = false) { $merTypeIds = $this->userApply ? Merchant::AllowApply : Merchant::AllowDisplay; + // 特殊处理市级云仓 + // Merchant::TypeSupplyChain + if ($siftStore == true) { + foreach($merTypeIds as $k=>$v) { + if ($v == Merchant::TypeSupplyChain) { + unset($merTypeIds[$k]); + } + } + } $query = MerchantType::getDB()->when(!$getAll, function ($query) use ($merTypeIds) { $query->whereIn('mer_type_id', $merTypeIds); })->field('mer_type_id,type_name'); diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 3805402d..07c3f38c 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -160,9 +160,10 @@ class MerchantIntention extends BaseController public function typeLst() { /** @var MerchantTypeRepository $repo */ + $siftStore = $this->request->param('sift_store', 0); $repo = app()->make(MerchantTypeRepository::class); $repo->userApply = true; - $lst = $repo->getSelect(false); + $lst = $repo->getSelect(false, $siftStore); return app('json')->success($lst); } }