|
@@ -167,7 +167,7 @@ public class UserRPCServiceImpl implements UserService {
|
|
|
|
|
|
List<UserDTO> userDTOs = new ArrayList<>();
|
|
List<UserDTO> userDTOs = new ArrayList<>();
|
|
if (condition.get("email") != null) {
|
|
if (condition.get("email") != null) {
|
|
- userDTO.setName(condition.get("email"));
|
|
|
|
|
|
+ userDTO.setEmail(condition.get("email"));
|
|
userDTOs = userService.getUserByFuzzyEmail(userDTO);
|
|
userDTOs = userService.getUserByFuzzyEmail(userDTO);
|
|
} else if (condition.get("name") != null) {
|
|
} else if (condition.get("name") != null) {
|
|
userDTO.setName(condition.get("name"));
|
|
userDTO.setName(condition.get("name"));
|
|
@@ -242,14 +242,17 @@ public class UserRPCServiceImpl implements UserService {
|
|
if (activePage < 0) {
|
|
if (activePage < 0) {
|
|
throw new HttpBadRequestException("wrong page format");
|
|
throw new HttpBadRequestException("wrong page format");
|
|
}
|
|
}
|
|
|
|
+ if (pagecount == 0) {
|
|
|
|
+ return userDTOForMTs;
|
|
|
|
+ }
|
|
if (activePage < pagecount - 1) {
|
|
if (activePage < pagecount - 1) {
|
|
- return userDTOForMTs.subList(pageSize * activePage + 1, (activePage + 1) * pageSize);
|
|
|
|
|
|
+ return userDTOForMTs.subList(pageSize * activePage, (activePage + 1) * pageSize);
|
|
}
|
|
}
|
|
if (activePage == pagecount - 1) {
|
|
if (activePage == pagecount - 1) {
|
|
if (pageSize * activePage + 1 == totalcount) {
|
|
if (pageSize * activePage + 1 == totalcount) {
|
|
return Arrays.asList(userDTOForMTs.get(totalcount - 1));
|
|
return Arrays.asList(userDTOForMTs.get(totalcount - 1));
|
|
}
|
|
}
|
|
- return userDTOForMTs.subList(pageSize * activePage + 1, totalcount);
|
|
|
|
|
|
+ return userDTOForMTs.subList(pageSize * activePage, totalcount);
|
|
} else {
|
|
} else {
|
|
throw new HttpBadRequestException("wrong page format");
|
|
throw new HttpBadRequestException("wrong page format");
|
|
}
|
|
}
|