diff --git a/app/common/dao/system/menu/SupplyMenuDao.php b/app/common/dao/system/menu/SupplyMenuDao.php index 326b492e..be0892b5 100644 --- a/app/common/dao/system/menu/SupplyMenuDao.php +++ b/app/common/dao/system/menu/SupplyMenuDao.php @@ -221,7 +221,7 @@ class SupplyMenuDao extends BaseDao public function merchantTypeByOptions($typeId, $all = false) { - return SupplyMenu::getDB()->alias('A')->leftJoin('Relevance B', 'A.menu_id = B.right_id')->where('is_mer', 1) + return SupplyMenu::getDB()->alias('A')->leftJoin('SupplyRelevance B', 'A.menu_id = B.right_id')->where('is_mer', 1) ->where('B.left_id', $typeId)->where('B.type', RelevanceRepository::TYPE_MERCHANT_AUTH)->when(!$all, function ($query) { $query->where(function ($query) { $query->where(function ($query) { diff --git a/app/common/repositories/system/supply/SupplyTypeRepository.php b/app/common/repositories/system/supply/SupplyTypeRepository.php index 9882e8aa..dbb5078c 100644 --- a/app/common/repositories/system/supply/SupplyTypeRepository.php +++ b/app/common/repositories/system/supply/SupplyTypeRepository.php @@ -15,7 +15,7 @@ namespace app\common\repositories\system\supply; use app\common\dao\system\supply\SupplyTypeDao; use app\common\repositories\BaseRepository; -use app\common\repositories\system\auth\MenuRepository; +use app\common\repositories\system\auth\SupplyMenuRepository; use app\common\repositories\system\RelevanceRepository; use FormBuilder\Factory\Elm; use think\exception\ValidateException; @@ -129,12 +129,12 @@ class SupplyTypeRepository extends BaseRepository $find['auth_ids'] = $ids; $options = []; if ($ids) { - $paths = app()->make(MenuRepository::class)->getAllOptions(1, true,compact('ids'),'path'); + $paths = app()->make(SupplyMenuRepository::class)->getAllOptions(1, true,compact('ids'),'path'); foreach ($paths as $id => $path) { $ids = array_merge($ids, explode('/', trim($path, '/'))); array_push($ids, $id); } - $auth = app()->make(MenuRepository::class)->getAllOptions(1, true, compact('ids')); + $auth = app()->make(SupplyMenuRepository::class)->getAllOptions(1, true, compact('ids')); $options = formatTree($auth, 'menu_name'); } $find['options'] = $options; diff --git a/app/controller/admin/system/auth/SupplyMenu.php b/app/controller/admin/system/auth/SupplyMenu.php index 6e6d0807..cb130f72 100644 --- a/app/controller/admin/system/auth/SupplyMenu.php +++ b/app/controller/admin/system/auth/SupplyMenu.php @@ -172,7 +172,7 @@ class SupplyMenu extends BaseController */ public function menus() { - $pre = '/' . config('admin.' . ($this->merchant ? 'merchant' : 'admin') . '_prefix'); + $pre = '/' . config('admin.' . ($this->merchant ? 'supply' : 'admin') . '_prefix'); $menus = $this->request->adminInfo()->level ? $this->repository->ruleByMenuList($this->request->adminRule(), $this->merchant) : $this->repository->getValidMenuList($this->merchant);