禁止用户端检索服务团队
This commit is contained in:
parent
13b18aadc9
commit
34d3408944
@ -14,6 +14,8 @@ namespace app\common\repositories\system\merchant;
|
|||||||
|
|
||||||
|
|
||||||
use app\common\dao\system\merchant\MerchantTypeDao;
|
use app\common\dao\system\merchant\MerchantTypeDao;
|
||||||
|
use app\common\model\system\merchant\Merchant;
|
||||||
|
use app\common\model\system\merchant\MerchantType;
|
||||||
use app\common\repositories\BaseRepository;
|
use app\common\repositories\BaseRepository;
|
||||||
use app\common\repositories\system\auth\MenuRepository;
|
use app\common\repositories\system\auth\MenuRepository;
|
||||||
use app\common\repositories\system\RelevanceRepository;
|
use app\common\repositories\system\RelevanceRepository;
|
||||||
@ -44,9 +46,11 @@ class MerchantTypeRepository extends BaseRepository
|
|||||||
return compact('count', 'list');
|
return compact('count', 'list');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSelect()
|
public function getSelect($getAll = true)
|
||||||
{
|
{
|
||||||
$query = $this->search([])->field('mer_type_id,type_name');
|
$query = MerchantType::getDB()->when(!$getAll, function ($query) {
|
||||||
|
$query->whereIn('mer_type_id', [Merchant::TypeCloudWarehouse, Merchant::TypeStore, Merchant::TypeSupplyChain, Merchant::TypePlatform]);
|
||||||
|
})->field('mer_type_id,type_name');
|
||||||
return $query->select()->toArray();
|
return $query->select()->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ class MerchantIntention extends BaseController
|
|||||||
|
|
||||||
public function typeLst()
|
public function typeLst()
|
||||||
{
|
{
|
||||||
$lst = app()->make(MerchantTypeRepository::class)->getSelect();
|
$lst = app()->make(MerchantTypeRepository::class)->getSelect(false);
|
||||||
return app('json')->success($lst);
|
return app('json')->success($lst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user