1.优化角色管理页面/system/role中角色级别排序

This commit is contained in:
2026-06-01 09:56:17 +08:00
parent 906539995d
commit d77e390fa3
3 changed files with 35 additions and 6 deletions

View File

@@ -20,6 +20,10 @@ use support\think\Db;
*/
class SystemRoleLogic extends BaseLogic
{
protected string $orderField = 'level';
protected string $orderType = 'desc';
public function __construct()
{
$this->model = new SystemRole();
@@ -110,7 +114,6 @@ class SystemRoleLogic extends BaseLogic
$query->where('level', '<', $maxLevel);
}
$query->where('id', '<>', SystemRoleChannelService::SUPER_ADMIN_ROLE_ID);
$query->order('sort', 'desc');
return $this->getAll($query);
}