bug: 监控流程若用户已禁用,修改显示方式

This commit is contained in:
wxyclub
2023-11-20 14:58:39 +08:00
parent 8c28530cf4
commit 054978e0a1
5 changed files with 44 additions and 0 deletions
@@ -92,6 +92,21 @@ public class UserEOController extends BaseController<UserEO> {
return Result.success(userVO);
}
@ApiOperation(value = "|UserEO|详情接口包含被禁用用户")
@GetMapping("/getByIdWithDisabled")
public ResponseMessage<UserVO> getByIdFeignClientWithDisabled(String id) throws Exception {
UserEO userEO = userEOService.getUserWithRolesWithDisabled(id);
UserVO userVO= new UserVO();
if(userEO!=null){
userVO = BeanUtil.toBean(userEO,UserVO.class);
userVO.setRoles(userEO.getRoleEOList());
userVO.setOrgsstr(userEO.getOrgIdList());
userVO.setOrgs(userEO.getOrgEOList());
userVO.setPassword(userEO.getPassword());
}
return Result.success(userVO);
}
/**
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.util.http.PageInfo < com.adc.da.sys.entity.UserEO>>
* @Author liwenxuan
@@ -96,6 +96,11 @@ public interface UserEODao extends BaseMapper<UserEO> {
*/
public UserEO getUserWithRoles(String id);
/**
* 查询用户及用户所对应的角色包含已禁用的用户
*/
public UserEO getUserWithRolesWithDisabled(String id);
public UserEO getUserWithRolesAll(String id);
public UserEO get(String id);
@@ -30,6 +30,8 @@ public interface IUserEOService extends IService<UserEO> {
public UserEO getUserWithRoles(String id);
public UserEO getUserWithRolesWithDisabled(String id);
public UserEO getUserWithRolesAll(String id);
public int saveUserRole(UserEO userEO);
@@ -248,6 +248,16 @@ public class UserEOServiceImpl extends ServiceImpl<UserEODao, UserEO> implements
return this.baseMapper.getUserWithRoles(id);
}
/**
* 查询用户及用户所对应的角色,包含已禁用用户
* @param id
* @return
*/
@Transactional(readOnly = true, rollbackFor = Exception.class)
public UserEO getUserWithRolesWithDisabled(String id) {
return this.baseMapper.getUserWithRolesWithDisabled(id);
}
@Transactional(readOnly = true, rollbackFor = Exception.class)
public UserEO getUserWithRolesAll(String id) {
return this.baseMapper.getUserWithRolesAll(id);
@@ -427,6 +427,18 @@
where u.usid = #{id} and u.DISABLE_FLAG = '0'
</select>
<!-- 根据用户ID获取用户信息及角色、组织机构信息,包含已禁用的用户 -->
<select id="getUserWithRolesWithDisabled" resultMap="UserRoleMap" parameterType="java.lang.String">
select
<include refid="User_Role_List"/>
from TS_USER u
left join TS_USER_ROLE ur on u.usid = ur.user_id
left join TS_ROLE r on ur.role_id = r.id
left join TS_USER_ORG UORG on u.usid = UORG.user_id
left join TS_ORG ORG on UORG.org_id = ORG.id
where u.usid = #{id}
</select>
<select id="getUserWithRolesAll" resultMap="UserRoleMap" parameterType="java.lang.String">
select
<include refid="User_Role_List"/>