From b4b32a139b3bf99129d1036a7b5e40a625c4be0c Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Tue, 11 Apr 2023 09:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E7=B1=BB=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/SystemRouteCateServices.php | 4 ++-- crmeb/app/services/system/SystemRouteServices.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crmeb/app/services/system/SystemRouteCateServices.php b/crmeb/app/services/system/SystemRouteCateServices.php index b8f25d299..39cec6423 100644 --- a/crmeb/app/services/system/SystemRouteCateServices.php +++ b/crmeb/app/services/system/SystemRouteCateServices.php @@ -69,9 +69,9 @@ class SystemRouteCateServices extends BaseServices * @email 136327134@qq.com * @date 2023/4/6 */ - public function getAllList(string $appName = 'outapi', string $field = '*') + public function getAllList(string $appName = 'outapi', string $field = '*', string $order = '') { - $list = $this->dao->selectList(['app_name' => $appName], $field)->toArray(); + $list = $this->dao->selectList(['app_name' => $appName], $field, 0, 0, $order)->toArray(); return get_tree_children($list); } diff --git a/crmeb/app/services/system/SystemRouteServices.php b/crmeb/app/services/system/SystemRouteServices.php index f11ea60d3..ea641afed 100644 --- a/crmeb/app/services/system/SystemRouteServices.php +++ b/crmeb/app/services/system/SystemRouteServices.php @@ -68,7 +68,9 @@ class SystemRouteServices extends BaseServices throw new ValidateException('修改的路由不存在'); } - return $routeInfo->toArray(); + $routeInfo = $routeInfo->toArray(); + $routeInfo['cate_tree'] = app()->make(SystemRouteCateServices::class)->getAllList($routeInfo['app_name'], '*', 'id asc,sort desc'); + return $routeInfo; } /**