基础数据的BUG修改

This commit is contained in:
秦鸿展
2026-02-07 17:22:11 +08:00
parent e7162e1877
commit 244b8d7e6e
8 changed files with 69 additions and 7 deletions
@@ -157,6 +157,10 @@ public class CommonApplicationService {
UserDO queryAccount = new UserDO();
queryAccount.setTopOrganizationId(topOrganizationId);
queryAccount.setUserAccount(userDO.getUserAccount());
// 如果指定了角色,只检查相同角色的用户
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
queryAccount.setRoleCode(userDO.getRoleCode());
}
userPo = userDomainService.findByTopOrganizationIdAndUserAccount(queryAccount);
}
//根据手机号查询
@@ -165,6 +169,10 @@ public class CommonApplicationService {
UserDO queryPhone = new UserDO();
queryPhone.setTopOrganizationId(topOrganizationId);
queryPhone.setUserPhone(userDO.getUserPhone());
// 如果指定了角色,只检查相同角色的用户
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
queryPhone.setRoleCode(userDO.getRoleCode());
}
userPoTwo = userDomainService.findByTopOrganizationIdAndUserPhone(queryPhone);
}
//根据身份证号查询
@@ -140,6 +140,9 @@
<include refid="selectUserVo"/>
and a.top_organization_id = #{topOrganizationId}
and a.user_account = #{userAccount}
<if test="roleCode != null and roleCode != ''">
and a.role_code = #{roleCode}
</if>
<if test="userId !=null and userId !='' ">
and a.user_id != #{userId}
</if>
@@ -183,6 +186,9 @@
</if>
and a.user_phone = #{userPhone}
and a.top_organization_id = #{topOrganizationId}
<if test="roleCode != null and roleCode != ''">
and a.role_code = #{roleCode}
</if>
<if test="userId !=null and userId !='' ">
and a.user_id != #{userId}
</if>