Commit fe8253c5 authored by 杨锐's avatar 杨锐

删除无用代码。

parent edd3d915
...@@ -100,21 +100,6 @@ public class UserDetailServiceImpl implements IUserDetailService { ...@@ -100,21 +100,6 @@ public class UserDetailServiceImpl implements IUserDetailService {
userDetailVO.setUpdatedAt(resultSet.getTimestamp("updated_at").getTime()); userDetailVO.setUpdatedAt(resultSet.getTimestamp("updated_at").getTime());
return userDetailVO; return userDetailVO;
}); });
// TODO: 2019/12/24 by rui branch feature_optimize_20191223 上线验证后,即删除该注释块
// List<UserDetail> details = userDetailRepository.findAll(getSpecification(name, phoneNo, idNo));
// Map<Long, User> userMap = Maps.newHashMap();
// if (!CollectionUtils.isEmpty(details)) {
// List<Long> userIds = details.stream().map(UserDetail::getUserId).collect(Collectors.toList());
// List<User> users = userRepository.findAll((root, query, cb) -> {
// query.where(root.get("id").in(userIds));
// return query.getRestriction();
// });
// userMap = users.stream().collect(Collectors.toMap(User::getId, o -> o));
// }
// Map<Long, User> finalUserMap = userMap;
// List<UserDetailVO> userDetailVOS = details.stream().map(o -> fromUserDetailAndUserMap(o, finalUserMap)).collect(Collectors.toList());
// return userDetailVOS;
} }
private String buildSearchUserDetailListSql(String name, String phoneNo, String idNo) { private String buildSearchUserDetailListSql(String name, String phoneNo, String idNo) {
...@@ -196,15 +181,6 @@ public class UserDetailServiceImpl implements IUserDetailService { ...@@ -196,15 +181,6 @@ public class UserDetailServiceImpl implements IUserDetailService {
return specification; return specification;
} }
private UserDetailVO fromUserDetailAndUserMap(UserDetail userDetail, Map<Long, User> userMap) {
UserDetailVO userDetailVO = UserDetailVO.fromUserDetail(userDetail);
User user = userMap.get(userDetail.getUserId());
if (user != null) {
userDetailVO.setEnable(user.getEnable());
}
return userDetailVO;
}
private Specification<UserDetail> valueInSpecification(List<Long> userId, List<String> phoneNo, List<String> idNo) { private Specification<UserDetail> valueInSpecification(List<Long> userId, List<String> phoneNo, List<String> idNo) {
List<Predicate> list = new ArrayList<>(); List<Predicate> list = new ArrayList<>();
Specification<UserDetail> specification = (root, criteriaQuery, criteriaBuilder) -> { Specification<UserDetail> specification = (root, criteriaQuery, criteriaBuilder) -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment