@@ -37,8 +37,14 @@ public class ExpertController { | |||||
private final ExpertManage expertManage; | private final ExpertManage expertManage; | ||||
private final ExpertAdminManage expertAdminManage; | private final ExpertAdminManage expertAdminManage; | ||||
// @PostMapping("/basic-info-submit") | |||||
// @ApiOperation("专家管理员新增专家)") | |||||
// public void expertBasicInfoSubmit(@Valid @RequestBody ExpertUserBasicInfoSubmitRequest request) { | |||||
// expertManage.expertBasicInfoSubmit(request); | |||||
// } | |||||
@PostMapping("/basic-info-submit") | @PostMapping("/basic-info-submit") | ||||
@ApiOperation("填写基本信息接口(专家报名使用))") | |||||
@ApiOperation("专家管理员新增专家)") | |||||
public void expertBasicInfoSubmit(@Valid @RequestBody ExpertUserBasicInfoSubmitRequest request) { | public void expertBasicInfoSubmit(@Valid @RequestBody ExpertUserBasicInfoSubmitRequest request) { | ||||
expertManage.expertBasicInfoSubmit(request); | expertManage.expertBasicInfoSubmit(request); | ||||
} | } | ||||
@@ -117,6 +117,9 @@ public class ExpertManage { | |||||
applyResult.setApplyResult(true); | applyResult.setApplyResult(true); | ||||
expertMetaApplyManage.metaApplyResult(applyResult); | expertMetaApplyManage.metaApplyResult(applyResult); | ||||
// 批量通过专家履职意向审核 | |||||
expertMetaApplyManage.autoPassExpertIntentionApply(userId); | |||||
// 增加用户专家角色 | // 增加用户专家角色 | ||||
Role expertRole = iRoleService.getOne(Wrappers.lambdaQuery(Role.class).eq(Role::getCode, RoleEnum.EXPERT.name())); | Role expertRole = iRoleService.getOne(Wrappers.lambdaQuery(Role.class).eq(Role::getCode, RoleEnum.EXPERT.name())); | ||||
UserRole expertUserRole = iUserRoleService.getOne(Wrappers.lambdaQuery(UserRole.class) | UserRole expertUserRole = iUserRoleService.getOne(Wrappers.lambdaQuery(UserRole.class) | ||||
@@ -590,4 +590,20 @@ public class ExpertMetaApplyManage { | |||||
expertIntentionApplyDealCmd.setExpertRegionLevel(expertMetaApply.getRegionLevel()); | expertIntentionApplyDealCmd.setExpertRegionLevel(expertMetaApply.getRegionLevel()); | ||||
return expertIntentionApplyDealCmd; | return expertIntentionApplyDealCmd; | ||||
} | } | ||||
public void autoPassExpertIntentionApply(Long expertUserId) { | |||||
List<ExpertMetaApply> expertIntentionJoinApplyList = iMetaApplyService.list(Wrappers | |||||
.lambdaQuery(ExpertMetaApply.class) | |||||
.eq(ExpertMetaApply::getUserId, expertUserId) | |||||
.eq(ExpertMetaApply::getApplyType, ExpertApplyTypeEnum.EXPERT_INTENTION_JOIN.getKey()) | |||||
.eq(ExpertMetaApply::getApplyStatus, ExpertApplyStatusEnum.PENDING_REVIEW.getKey())); | |||||
for (ExpertMetaApply expertMetaApply : expertIntentionJoinApplyList) { | |||||
MetaApplyResultRequest applyResult = new MetaApplyResultRequest(); | |||||
applyResult.setApplyId(expertMetaApply.getId()); | |||||
applyResult.setAuditOpinion("同意"); | |||||
applyResult.setApplyResult(true); | |||||
metaApplyResult(applyResult); | |||||
} | |||||
} | |||||
} | } |