refactor(admin): 重构控制器和模型的使用方式

- https://github.com/top-think/think-orm/issues/704
This commit is contained in:
wolfcode
2025-03-27 18:38:27 +08:00
parent bc03616e43
commit b9f764e4d0
19 changed files with 96 additions and 109 deletions

View File

@@ -25,13 +25,13 @@ class SystemAuth extends TimeModel
* @throws DbException
* @throws ModelNotFoundException
*/
public function getAuthorizeNodeListByAdminId($authId): array
public static function getAuthorizeNodeListByAdminId($authId): array
{
$checkNodeList = (new SystemAuthNode())
->where('auth_id', $authId)
->column('node_id');
$systemNode = new SystemNode();
$nodeList = $systemNode
$nodeList = $systemNode
->where('is_auth', 1)
->field('id,node,title,type,is_auth')
->select()