From 886ee69587d7a5e36c698876bbdf3e32de429973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?niohe=C2=B7erbao?= Date: Mon, 3 Apr 2023 10:41:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=B8=93=E5=AE=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E6=96=B0=E5=A2=9E=E4=B8=93=E5=AE=B6=E5=90=8E=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/expert/manage/ExpertManage.java | 16 +++++++++++++--- .../pmapi/expert/service/ExpertInfoService.java | 2 +- .../pmapi/expert/service/impl/ExpertInfoServiceImpl.java | 4 +++- 3 files changed, 17 insertions(+), 5 deletions(-) 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