|
|
@@ -160,6 +160,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
} |
|
|
|
expertUserFullInfo.setRetiredAt(expertUserInfoDTO.getRetiredAt()); |
|
|
|
expertUserFullInfo.setCompany(expertUserInfoDTO.getCompany()); |
|
|
|
expertUserFullInfo.setCompanyUniqCode(expertUserInfoDTO.getCompanyUniqCode()); |
|
|
|
expertUserFullInfo.setLegalEntityCode(expertUserInfoDTO.getLegalEntityCode()); |
|
|
|
expertUserFullInfo.setAdministrativeDuties(expertUserInfoDTO.getAdministrativeDuties()); |
|
|
|
expertUserFullInfo.setStartWorkAt(expertUserInfoDTO.getStartWorkAt()); |
|
|
@@ -450,11 +451,11 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
.in(ExpertAvoidCompany::getUserId, userIds)); |
|
|
|
Map<Long, List<ExpertAvoidCompany>> avoidInfoMap = CollUtils.group(expertAvoidCompanyList, ExpertAvoidCompany::getUserId); |
|
|
|
return expertUserFullInfos.stream().map(w -> ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(w, |
|
|
|
expertTagListMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
metaApplyMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()))) |
|
|
|
expertTagListMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
metaApplyMap.getOrDefault(w.getUserId(), Collections.emptyList()), |
|
|
|
avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()))) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
@@ -474,7 +475,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
saveExpertUserFullInfo.setId(originalExpertUserFullInfo.getId()); |
|
|
|
// 删除所有专家字典字段(需审核敏感字段不删除) |
|
|
|
LambdaQueryWrapper<ExpertDictionary> expertDictionaryRemove = Wrappers.lambdaQuery(ExpertDictionary.class) |
|
|
|
.eq(ExpertDictionary::getUserId, userId).notIn(ExpertDictionary::getExpertInfoField, ExpertUserInfoSensitiveFieldEnum.getSensitiveDictionaryList()); |
|
|
|
.eq(ExpertDictionary::getUserId, userId) |
|
|
|
.notIn(ExpertDictionary::getExpertInfoField, ExpertUserInfoSensitiveFieldEnum.getSensitiveDictionaryList()); |
|
|
|
iExpertDictionaryService.remove(expertDictionaryRemove); |
|
|
|
|
|
|
|
|
|
|
@@ -487,7 +489,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
|
|
|
|
List<ExpertTag> saveExpertTagList = buildSaveExpertTagList(userId, expertTagList); |
|
|
|
saveExpertTagList = saveExpertTagList.stream() |
|
|
|
.filter(r -> ExpertTagEnum.EXPERT_SOURCE.getKey().equals(r.getExpertInfoField())).collect(Collectors.toList()); |
|
|
|
.filter(r -> ExpertTagEnum.EXPERT_SOURCE.getKey().equals(r.getExpertInfoField())) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (CollUtil.isNotEmpty(saveExpertTagList)) { |
|
|
|
iExpertTagService.saveBatch(saveExpertTagList); |
|
|
|
} |
|
|
@@ -502,13 +505,15 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
saveExpertUserFullInfo.setRegionLevel(null); |
|
|
|
saveExpertUserFullInfo.setRegionCode(null); |
|
|
|
saveExpertUserFullInfo.setCompany(null); |
|
|
|
saveExpertUserFullInfo.setCompanyUniqCode(null); |
|
|
|
saveExpertUserFullInfo.setLegalEntityCode(null); |
|
|
|
iExpertUserFullInfoService.saveOrUpdate(saveExpertUserFullInfo); |
|
|
|
|
|
|
|
// 保存所有专家字典字段 |
|
|
|
List<ExpertDictionary> saveExpertDictionaryList = buildSaveExpertDictionaryList(userId, expertDictionaryList); |
|
|
|
saveExpertDictionaryList = saveExpertDictionaryList |
|
|
|
.stream().filter(r -> !ExpertUserInfoSensitiveFieldEnum.getSensitiveDictionaryList().contains(r.getExpertInfoField())).collect(Collectors.toList()); |
|
|
|
.stream().filter(r -> !ExpertUserInfoSensitiveFieldEnum.getSensitiveDictionaryList().contains(r.getExpertInfoField())) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (CollectionUtils.isNotEmpty(saveExpertDictionaryList)) { |
|
|
|
iExpertDictionaryService.saveBatch(saveExpertDictionaryList); |
|
|
|
} |
|
|
@@ -694,6 +699,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
assemblerExpertUserFullInfoSensitiveFieldSaveRecord(originalExpertUserFullInfo, ExpertUserInfoSensitiveFieldEnum.phone_no, collectMap); |
|
|
|
assemblerExpertUserFullInfoSensitiveFieldSaveRecord(originalExpertUserFullInfo, ExpertUserInfoSensitiveFieldEnum.email, collectMap); |
|
|
|
assemblerExpertUserFullInfoSensitiveFieldSaveRecord(originalExpertUserFullInfo, ExpertUserInfoSensitiveFieldEnum.company, collectMap); |
|
|
|
assemblerExpertUserFullInfoSensitiveFieldSaveRecord(originalExpertUserFullInfo, ExpertUserInfoSensitiveFieldEnum.company_uniq_code, collectMap); |
|
|
|
assemblerExpertUserFullInfoSensitiveFieldSaveRecord(originalExpertUserFullInfo, ExpertUserInfoSensitiveFieldEnum.legal_entity_code, collectMap); |
|
|
|
iExpertUserFullInfoService.saveOrUpdate(originalExpertUserFullInfo); |
|
|
|
|
|
|
@@ -756,27 +762,30 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
/** |
|
|
|
* 信息修改审核通过后 装配更新用户信息敏感字段 |
|
|
|
* |
|
|
|
* @param originalExpertUserFullInfo |
|
|
|
* @param expertUserFullInfoStrEnum |
|
|
|
* @param collectMap |
|
|
|
* @param originalInfo / |
|
|
|
* @param fieldEnum / |
|
|
|
* @param collectMap / |
|
|
|
*/ |
|
|
|
private void assemblerExpertUserFullInfoSensitiveFieldSaveRecord(ExpertUserFullInfo originalExpertUserFullInfo, ExpertUserInfoSensitiveFieldEnum expertUserFullInfoStrEnum |
|
|
|
private void assemblerExpertUserFullInfoSensitiveFieldSaveRecord(ExpertUserFullInfo originalInfo, ExpertUserInfoSensitiveFieldEnum fieldEnum |
|
|
|
, Map<ExpertUserInfoSensitiveFieldEnum, SensitiveModifySegment> collectMap) { |
|
|
|
SensitiveModifySegment segment = collectMap.get(expertUserFullInfoStrEnum); |
|
|
|
SensitiveModifySegment segment = collectMap.get(fieldEnum); |
|
|
|
if (Objects.nonNull(segment)) { |
|
|
|
String segmentApplyValue = (String) segment.getApply(); |
|
|
|
switch (expertUserFullInfoStrEnum) { |
|
|
|
switch (fieldEnum) { |
|
|
|
case phone_no: |
|
|
|
originalExpertUserFullInfo.setPhoneNo(segmentApplyValue); |
|
|
|
originalInfo.setPhoneNo(segmentApplyValue); |
|
|
|
break; |
|
|
|
case email: |
|
|
|
originalExpertUserFullInfo.setEmail(segmentApplyValue); |
|
|
|
originalInfo.setEmail(segmentApplyValue); |
|
|
|
break; |
|
|
|
case company: |
|
|
|
originalExpertUserFullInfo.setCompany(segmentApplyValue); |
|
|
|
originalInfo.setCompany(segmentApplyValue); |
|
|
|
break; |
|
|
|
case company_uniq_code: |
|
|
|
originalInfo.setCompanyUniqCode(segmentApplyValue); |
|
|
|
break; |
|
|
|
case legal_entity_code: |
|
|
|
originalExpertUserFullInfo.setLegalEntityCode(segmentApplyValue); |
|
|
|
originalInfo.setLegalEntityCode(segmentApplyValue); |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|