mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
fix(role): 修复角色删除按 auth_ids 查用户的子串混淆(like→FIND_IN_SET)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -39,7 +39,7 @@ class AdminRoleDeleteBase extends Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$checkUsers = SystemAdmin::where('auth_ids', 'like', '%' . $roleId . '%')
|
$checkUsers = SystemAdmin::whereRaw('FIND_IN_SET(:roleId, auth_ids)', ['roleId' => $roleId])
|
||||||
->where('delete_time', 0)
|
->where('delete_time', 0)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user