From 4e77206551c38be836199740f29b706f1fdac33f Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 26 Sep 2023 14:34:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=93=E5=AE=B6=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E7=9F=AD=E4=BF=A1=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/expert/model/constant/ExpertAuditMsgTemplate.java | 4 ++-- .../pmapi/expert/service/impl/ExpertInfoServiceImpl.java | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/constant/ExpertAuditMsgTemplate.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/constant/ExpertAuditMsgTemplate.java index 6a242ac..84c1b62 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/constant/ExpertAuditMsgTemplate.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/constant/ExpertAuditMsgTemplate.java @@ -13,11 +13,11 @@ public interface ExpertAuditMsgTemplate { /** * 【丽水市大数据局】尊敬的xxx专家您好,您提交的专家入库申请未通过,如有疑问请联系xxx确认。 */ - String EXPERT_AUDIT_PASS_MSG = "尊敬的%s专家您好,您提交的专家入库申请未通过,如有疑问请联系%s「%s」确认。"; + String EXPERT_AUDIT_FAIL = "尊敬的%s专家您好,您提交的专家入库申请未通过,如有疑问请联系%s「%s」确认。"; /** * 【丽水市大数据局】尊敬的xxx专家您好,您提交的专家入库申请已通过,请登录http://60.188.225.145/login查看,如有疑问请联系xxx。 */ - String EXPERT_AUDIT_FAIL_MSG = "尊敬的%s专家您好,您提交的专家入库申请已通过,请登录%s查看,如有疑问请联系%s「%s」。"; + String EXPERT_AUDIT_PASS = "尊敬的%s专家您好,您提交的专家入库申请已通过,请登录%s查看,如有疑问请联系%s「%s」。"; } 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 feffb1d..4048865 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 @@ -56,6 +56,8 @@ import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; +import static com.ningdatech.pmapi.expert.model.constant.ExpertAuditMsgTemplate.EXPERT_AUDIT_FAIL; +import static com.ningdatech.pmapi.expert.model.constant.ExpertAuditMsgTemplate.EXPERT_AUDIT_PASS; import static com.ningdatech.yxt.model.cmd.SendSmsCmd.SendSmsContext; /** @@ -402,7 +404,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { Long expertUserId = cmd.getExpertUserId(); ExpertUserFullInfo expertInfo = iExpertUserFullInfoService.getByUserId(expertUserId); UserInfoDetails userDetail = LoginUserUtil.loginUserDetail(); - String smsContent; + String content; if (cmd.getApplyResult()) { // 修改专家状态为可用 expertInfo.setExpertAccountStatus(ExpertAccountStatusEnum.AVAILABLE.getKey()); @@ -436,15 +438,15 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { userRoleService.save(saveUserRole); } } - smsContent = String.format(ExpertAuditMsgTemplate.EXPERT_AUDIT_PASS_MSG, expertInfo.getExpertName(), userDetail.getRealName(), userDetail.getMobile()); + content = String.format(EXPERT_AUDIT_PASS, expertInfo.getExpertName(), loginUrl, userDetail.getRealName(), userDetail.getMobile()); } else { expertInfo.setUserInfoStep(ExpertUserInfoStepEnum.INFORMATION_TO_BE_SUBMITTED.getKey()); - smsContent = String.format(ExpertAuditMsgTemplate.EXPERT_AUDIT_FAIL_MSG, expertInfo.getExpertName(), loginUrl, userDetail.getRealName(), userDetail.getMobile()); + content = String.format(EXPERT_AUDIT_FAIL, expertInfo.getExpertName(), userDetail.getRealName(), userDetail.getMobile()); } iExpertUserFullInfoService.saveOrUpdate(expertInfo); if (PhoneUtil.isMobile(expertInfo.getPhoneNo())) { SendSmsContext smsCtx = new SendSmsContext(); - smsCtx.setContent(smsContent); + smsCtx.setContent(content); smsCtx.setReceiveNumber(expertInfo.getPhoneNo()); yxtCallOrSmsHelper.sendSms(smsCtx); }