|
|
@@ -341,23 +341,23 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
.eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); |
|
|
|
ExpertIntentionWorkRegion one = iExpertIntentionWorkRegionService.getOne(query); |
|
|
|
if (Objects.isNull(one)) { |
|
|
|
ExpertIntentionWorkRegion expertIntentionWorkRegion = new ExpertIntentionWorkRegion(); |
|
|
|
expertIntentionWorkRegion.setCreateOn(LocalDateTime.now()); |
|
|
|
expertIntentionWorkRegion.setUpdateOn(LocalDateTime.now()); |
|
|
|
expertIntentionWorkRegion.setRegionCode(expertRegionCode); |
|
|
|
expertIntentionWorkRegion.setRegionLevel(expertRegionLevel); |
|
|
|
expertIntentionWorkRegion.setUserId(expertUserId); |
|
|
|
iExpertIntentionWorkRegionService.save(expertIntentionWorkRegion); |
|
|
|
ExpertIntentionWorkRegion intentionWorkRegion = new ExpertIntentionWorkRegion(); |
|
|
|
intentionWorkRegion.setCreateOn(LocalDateTime.now()); |
|
|
|
intentionWorkRegion.setUpdateOn(LocalDateTime.now()); |
|
|
|
intentionWorkRegion.setRegionCode(expertRegionCode); |
|
|
|
intentionWorkRegion.setRegionLevel(expertRegionLevel); |
|
|
|
intentionWorkRegion.setUserId(expertUserId); |
|
|
|
iExpertIntentionWorkRegionService.save(intentionWorkRegion); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
case EXPERT_INTENTION_LEAVE: { |
|
|
|
// 删除履职意向地 |
|
|
|
LambdaUpdateWrapper<ExpertIntentionWorkRegion> expertIntentionWorkRegionQuery = Wrappers.lambdaUpdate(ExpertIntentionWorkRegion.class) |
|
|
|
LambdaUpdateWrapper<ExpertIntentionWorkRegion> query = Wrappers.lambdaUpdate(ExpertIntentionWorkRegion.class) |
|
|
|
.eq(ExpertIntentionWorkRegion::getUserId, expertUserId) |
|
|
|
.eq(ExpertIntentionWorkRegion::getRegionCode, expertRegionCode) |
|
|
|
.eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); |
|
|
|
iExpertIntentionWorkRegionService.remove(expertIntentionWorkRegionQuery); |
|
|
|
iExpertIntentionWorkRegionService.remove(query); |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
@@ -395,36 +395,9 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
|
List<ExpertDictionary> saveExpertDictionaryList = buildSaveExpertDictionaryList(expertUserId, expertType); |
|
|
|
iExpertDictionaryService.saveBatch(saveExpertDictionaryList); |
|
|
|
} |
|
|
|
|
|
|
|
// 修改履职意向申请状态 |
|
|
|
LambdaUpdateWrapper<ExpertMetaApply> set = Wrappers.lambdaUpdate(ExpertMetaApply.class).eq(ExpertMetaApply::getUserId, expertUserId) |
|
|
|
.eq(ExpertMetaApply::getApplyType, ExpertApplyTypeEnum.EXPERT_INTENTION_JOIN.getKey()) |
|
|
|
.eq(ExpertMetaApply::getApplyStatus, ExpertApplyStatusEnum.PENDING_REVIEW.getKey()) |
|
|
|
.eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.N.name()) |
|
|
|
.set(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.Y.name()); |
|
|
|
iExpertMetaApplyService.update(set); |
|
|
|
|
|
|
|
} else { |
|
|
|
expertUserFullInfo.setUserInfoStep(ExpertUserInfoStepEnum.INFORMATION_TO_BE_SUBMITTED.getKey()); |
|
|
|
} |
|
|
|
if (applyResult) { |
|
|
|
// 补充专家 专家角色 TODO |
|
|
|
// SysRole sysRole = roleService.getOne(Wrappers.lambdaQuery(SysRole.class) |
|
|
|
// .eq(SysRole::getCode, SysRoleEnum.EXPERT.getKey())); |
|
|
|
// if (Objects.nonNull(sysRole)) { |
|
|
|
// Long roleId = sysRole.getRoleId(); |
|
|
|
// LambdaQueryWrapper<SysUsersRoles> eq = Wrappers.lambdaQuery(SysUsersRoles.class) |
|
|
|
// .eq(SysUsersRoles::getUserId, expertUserFullInfo.getUserId()) |
|
|
|
// .eq(SysUsersRoles::getRoleId, sysRole.getRoleId()); |
|
|
|
// SysUsersRoles one = userRoleService.getOne(eq); |
|
|
|
// if (Objects.isNull(one)) { |
|
|
|
// SysUsersRoles sysUsersRolesSaveRecord = new SysUsersRoles(); |
|
|
|
// sysUsersRolesSaveRecord.setUserId(expertUserFullInfo.getUserId()); |
|
|
|
// sysUsersRolesSaveRecord.setRoleId(roleId); |
|
|
|
// userRoleService.saveAndReloadRoleListForToken(Collections.singletonList(sysUsersRolesSaveRecord), false); |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
iExpertUserFullInfoService.saveOrUpdate(expertUserFullInfo); |
|
|
|
} |
|
|
|
|
|
|
|