diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java index 0e20ce2..978ead5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java @@ -17,6 +17,7 @@ import com.ningdatech.pmapi.expert.model.cmd.ExpertRecommendProofSaveCmd; import com.ningdatech.pmapi.expert.model.dto.ExpertDictionaryDTO; import com.ningdatech.pmapi.expert.model.dto.ExpertFullInfoAllDTO; import com.ningdatech.pmapi.expert.model.req.ExpertUserBasicInfoSubmitRequest; +import com.ningdatech.pmapi.expert.model.req.MetaApplyResultRequest; import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO; import com.ningdatech.pmapi.expert.service.ExpertInfoService; import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; @@ -53,6 +54,7 @@ public class ExpertManage { private final FileService fileService; private final ExpertUserInfoAssembler expertUserInfoAssembler; private final IUserInfoService iUserInfoService; + private final ExpertMetaApplyManage expertMetaApplyManage; /** @@ -98,12 +100,19 @@ public class ExpertManage { List recommendedWay = recommendInfo.getRecommendedWay(); // 推荐方式 List recommendProofFile = recommendInfo.getRecommendationProofFile(); - expertRecommendProofSubmit(recommendedWay, recommendProofFile, userId); + Long applyId = expertRecommendProofSubmit(recommendedWay, recommendProofFile, userId); + + // 批量通过专家管理员审核 + MetaApplyResultRequest applyResult = new MetaApplyResultRequest(); + applyResult.setApplyId(applyId); + applyResult.setAuditOpinion("同意"); + applyResult.setApplyResult(true); + expertMetaApplyManage.metaApplyResult(applyResult); } @Transactional(rollbackFor = Exception.class) - public void expertRecommendProofSubmit(List recommendedWay, List recommendProofFile, Long expertUserId) { + public Long expertRecommendProofSubmit(List recommendedWay, List recommendProofFile, Long expertUserId) { // 用户id ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(expertUserId); // 判断专家状态,是否可以进行证明材料提交 @@ -129,7 +138,8 @@ public class ExpertManage { } expertRecommendProofSaveCmd.setRecommendedWay(recommendedWayDictionaryDTOList); expertRecommendProofSaveCmd.setUserId(expertUserId); - expertInfoService.expertRecommendProofSave(expertRecommendProofSaveCmd); + Long applyId = expertInfoService.expertRecommendProofSave(expertRecommendProofSaveCmd); + return applyId; } public ExpertFullInfoVO getExpertFullInfoDetail(Long expertUserId) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertInfoService.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertInfoService.java index c0b9aa0..02b34b5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertInfoService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/ExpertInfoService.java @@ -19,7 +19,7 @@ public interface ExpertInfoService { * * @param expertRecommendProofSaveCmd */ - void expertRecommendProofSave(ExpertRecommendProofSaveCmd expertRecommendProofSaveCmd); + Long expertRecommendProofSave(ExpertRecommendProofSaveCmd expertRecommendProofSaveCmd); void expertIntentionApplyDeal(ExpertIntentionApplyDealCmd expertIntentionApplyDealCmd); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java index 50da3ed..63e6682 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java @@ -231,7 +231,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { @Override @Transactional(rollbackFor = Exception.class) - public void expertRecommendProofSave(ExpertRecommendProofSaveCmd cmd) { + public Long expertRecommendProofSave(ExpertRecommendProofSaveCmd cmd) { // 保存专家证明材料 Long userId = cmd.getUserId(); ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(userId); @@ -263,6 +263,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { expertRegionApply.setUserId(userId); expertRegionApply.setDisplayEnable(BoolDisplayEnum.Y.name()); iExpertMetaApplyService.save(expertRegionApply); + + return expertRegionApply.getId(); } @Override