|
@@ -185,15 +185,14 @@ public class UserController {
|
|
dto.setRole(role);
|
|
dto.setRole(role);
|
|
dto.setDepartment(department);
|
|
dto.setDepartment(department);
|
|
dto.setCompanyId(companyId);
|
|
dto.setCompanyId(companyId);
|
|
- dto.setUsername(username);
|
|
|
|
- UserDTO dto1 = userService.queryUserIdByUsername(dto.getUsername());
|
|
|
|
|
|
+ UserDTO dto1 = userService.queryUserIdByUsername(username);
|
|
if (dto1 == null) return toolUtils.response(InterfaceResultEnum.PARAM_FAIL,version);
|
|
if (dto1 == null) return toolUtils.response(InterfaceResultEnum.PARAM_FAIL,version);
|
|
dto.setId(dto1.getId());
|
|
dto.setId(dto1.getId());
|
|
List<UserDTO> userList;
|
|
List<UserDTO> userList;
|
|
if (dto1.getRole() == 1) {
|
|
if (dto1.getRole() == 1) {
|
|
- userList = userService.getAllUserListByUserVO(dto);
|
|
|
|
|
|
+ userList = userService.getAllUserListByUserDTO(dto);
|
|
} else {
|
|
} else {
|
|
- userList = userService.getUserListByUserVO(dto);
|
|
|
|
|
|
+ userList = userService.getUserListByUserDTO(dto);
|
|
}
|
|
}
|
|
List<UserDTO> list = new ArrayList<>();
|
|
List<UserDTO> list = new ArrayList<>();
|
|
userList.forEach(userDTO -> {
|
|
userList.forEach(userDTO -> {
|
|
@@ -224,6 +223,8 @@ public class UserController {
|
|
}
|
|
}
|
|
list.add(userDTO);
|
|
list.add(userDTO);
|
|
});
|
|
});
|
|
- return BaseResult.success(list);
|
|
|
|
|
|
+ UserVO userVO = new UserVO();
|
|
|
|
+ userVO.setList(list);
|
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,userVO);
|
|
}
|
|
}
|
|
}
|
|
}
|