|
|
@@ -84,7 +84,7 @@ class SystemRouteServices extends BaseServices
|
|
|
*/
|
|
|
public function getTreeList(string $appName = 'adminapi', string $name = '')
|
|
|
{
|
|
|
-// return $this->cacheDriver()->remember('ROUTE_LIST' . strtoupper($appName), function () use ($name, $appName) {
|
|
|
+ return $this->cacheDriver()->remember('ROUTE_LIST' . strtoupper($appName), function () use ($name, $appName) {
|
|
|
$list = app()->make(SystemRouteCateServices::class)
|
|
|
->selectList(['app_name' => $appName], '*', 0, 0, 'id asc,sort desc', [
|
|
|
'children' => function ($query) use ($name, $appName) {
|
|
|
@@ -110,7 +110,7 @@ class SystemRouteServices extends BaseServices
|
|
|
}
|
|
|
}
|
|
|
return get_tree_children($list);
|
|
|
-// }, 600);
|
|
|
+ }, 600);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -201,6 +201,9 @@ class SystemRouteServices extends BaseServices
|
|
|
{
|
|
|
$oneId = app()->make(SystemRouteCateServices::class)->value(['app_name' => $app, 'name' => $cateName, 'pid' => 0], 'id');
|
|
|
if (!$oneId) {
|
|
|
+ //修复重复同步后反复增加二级文件夹
|
|
|
+ $id = app()->make(SystemRouteCateServices::class)->value(['app_name' => $app, 'name' => $cateName, 'pid' => $pid], 'id');
|
|
|
+ if ($id) return $id;
|
|
|
$res = app()->make(SystemRouteCateServices::class)->save([
|
|
|
'app_name' => $app,
|
|
|
'name' => $cateName,
|