修复删除管理员BUG

This commit is contained in:
liaofei 2023-04-28 14:22:07 +08:00
parent 8f8415a966
commit 4e700eaefa

View File

@ -102,6 +102,6 @@ class SystemAdminDao extends BaseDao
*/
public function checkRoleUse(int $id): bool
{
return (bool)$this->getModel()->whereFindInSet('roles', $id)->count();
return (bool)$this->getModel()->where('is_del', 0)->whereFindInSet('roles', $id)->count();
}
}