|
@@ -122,7 +122,14 @@ public class PersonIntegrationServiceImpl implements PersonIntegrationService {
|
|
|
public PageResult<UserPersonRespVO> page(UserPersonPageReqVO pageReqVO) {
|
|
|
PageResult<UserPersonRespVO> result = userMapper.page(pageReqVO);
|
|
|
Map<Long,WorkExpDO> expMap =new HashMap<>();
|
|
|
- List<WorkExpDO> lastWorkExps = workExpMapper.selectBatchUserLastOne(result.getList().stream().map(item -> item.getUser().getId()).collect(Collectors.toList()));
|
|
|
+ List<WorkExpDO> lastWorkExps = new ArrayList<>();
|
|
|
+ List<Long> userIds = result.getList().stream()
|
|
|
+ .filter(item -> null != item.getUser() && null != item.getUser().getId())
|
|
|
+ .map(item -> item.getUser().getId())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ if(!userIds.isEmpty()){
|
|
|
+ lastWorkExps=workExpMapper.selectBatchUserLastOne(userIds);
|
|
|
+ }
|
|
|
lastWorkExps.forEach(item->expMap.put(item.getUserId(),item));
|
|
|
result.getList().forEach(item -> {
|
|
|
// WorkExpDO lastWorkExp = workExpMapper.selectLastOne(item.getUser().getId());
|