|
@@ -35,6 +35,7 @@ import com.citu.module.menduner.system.dal.mysql.workexp.WorkExpMapper;
|
|
|
import com.citu.module.menduner.system.enums.sync.SyncConstants;
|
|
|
import com.citu.module.menduner.system.mq.producer.GraphProducer;
|
|
|
import com.citu.module.menduner.system.service.area.AreaService;
|
|
|
+import com.citu.module.menduner.system.util.RedisUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -44,6 +45,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.citu.module.menduner.system.enums.DictTypeConstants.*;
|
|
|
|
|
@@ -84,6 +86,9 @@ public class PersonIntegrationServiceImpl implements PersonIntegrationService {
|
|
|
@Resource
|
|
|
private AreaService areaService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private RedisUtils redisUtils;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public AppRecruitPersonDetailRespVO detail(Long userId) {
|
|
@@ -236,7 +241,13 @@ public class PersonIntegrationServiceImpl implements PersonIntegrationService {
|
|
|
// return PageResult.empty();
|
|
|
// }
|
|
|
|
|
|
- return personInfoMapper.queryPage(reqVO, ids, LoginUserContext.getEnterpriseId());
|
|
|
+ PageResult<PersonInfoRespVO> result = personInfoMapper.queryPage(reqVO, ids, LoginUserContext.getEnterpriseId());
|
|
|
+
|
|
|
+ redisUtils.setEnterpriseUserLookPersonPermission(
|
|
|
+ result.getList().stream()
|
|
|
+ .map(PersonInfoRespVO::getUserId)
|
|
|
+ .collect(Collectors.toSet()));
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -253,7 +264,12 @@ public class PersonIntegrationServiceImpl implements PersonIntegrationService {
|
|
|
reqVO.setAreaIds(areaIdList);
|
|
|
}
|
|
|
}
|
|
|
- return personInfoMapper.queryPage(reqVO, LoginUserContext.getEnterpriseId());
|
|
|
+ PageResult<PersonInfoRespVO> result = personInfoMapper.queryPage(reqVO, LoginUserContext.getEnterpriseId());
|
|
|
+ redisUtils.setEnterpriseUserLookPersonPermission(
|
|
|
+ result.getList().stream()
|
|
|
+ .map(PersonInfoRespVO::getUserId)
|
|
|
+ .collect(Collectors.toSet()));
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -270,14 +286,23 @@ public class PersonIntegrationServiceImpl implements PersonIntegrationService {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
- return personInfoMapper.queryPageById(null == ids ? null : Arrays.asList(ids),
|
|
|
+ PageResult<PersonInfoRespVO> result = personInfoMapper.queryPageById(null == ids ? null : Arrays.asList(ids),
|
|
|
LoginUserContext.getEnterpriseId(),
|
|
|
reqVO);
|
|
|
+ redisUtils.setEnterpriseUserLookPersonPermission(
|
|
|
+ result.getList().stream()
|
|
|
+ .map(PersonInfoRespVO::getUserId)
|
|
|
+ .collect(Collectors.toSet()));
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageResult<PersonInfoRespVO> selectEnterpriseTalentPoolPage(PersonInfoPageReqVO reqVO) {
|
|
|
- return personInfoMapper.selectEnterpriseTalentPoolPage(LoginUserContext.getEnterpriseId(), reqVO);
|
|
|
+ PageResult<PersonInfoRespVO> result = personInfoMapper.selectEnterpriseTalentPoolPage(LoginUserContext.getEnterpriseId(), reqVO);
|
|
|
+ redisUtils.setEnterpriseUserLookPersonPermission(result.getList().stream()
|
|
|
+ .map(PersonInfoRespVO::getUserId)
|
|
|
+ .collect(Collectors.toSet()));
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|