fix(system): 修正超级管理员标识及关联查询逻辑
- 将 TenantMapper.xml 中用户表连接更新为使用 gxwebsoft_core.sys_user - 修改关联查询条件,使用 is_super_admin 替代 is_admin 标识 - 调整 User 实体中 isSuperAdmin 字段,移除@TableField注解以确保正确映射
This commit is contained in:
@@ -197,7 +197,6 @@ public class User implements UserDetails {
|
||||
private Integer isOrganizationAdmin;
|
||||
|
||||
@Schema(description = "是否超级管理员")
|
||||
@TableField(exist = false)
|
||||
private Boolean isSuperAdmin;
|
||||
|
||||
@Schema(description = "租户管理员ID")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
u.phone,u.username
|
||||
FROM sys_tenant a
|
||||
LEFT JOIN sys_company b ON a.tenant_id = b.tenant_id
|
||||
LEFT JOIN sys_user u ON u.tenant_id = a.tenant_id AND u.is_admin = 1 AND u.deleted = 0
|
||||
LEFT JOIN gxwebsoft_core.sys_user u ON u.tenant_id = a.tenant_id AND u.is_super_admin = 1 AND u.deleted = 0
|
||||
<where>
|
||||
<if test="param.tenantId != null">
|
||||
AND a.tenant_id = #{param.tenantId}
|
||||
|
||||
Reference in New Issue
Block a user