From 71e1421fc6cc24d25b04ea78b6f720e71d0ebe10 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 26 Sep 2023 15:40:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E4=B8=93=E5=AE=B6=E6=8A=A5?= =?UTF-8?q?=E5=90=8D=E9=AA=8C=E8=AF=81=E7=A0=81=E6=A0=A1=E9=AA=8C=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java | 6 +++++- pmapi/src/main/resources/application-dev.yml | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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 d2f0dd9..f884ae3 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 @@ -44,6 +44,7 @@ import com.ningdatech.pmapi.user.util.LoginUserUtil; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.MediaType; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -80,6 +81,9 @@ public class ExpertManage { private final VerifyCodeCheckHelper verifyCodeCheckHelper; private final CachePlusOps cachePlusOps; + @Value("${expert-registration.verify-code.check:true}") + private Boolean expertRegistrationVerifyCodeCheck; + private static final Duration REGISTER_EXPIRED_DURATION = Duration.ofDays(3); private static final Duration REGISTER_GEN_DURATION = Duration.ofMinutes(30); @@ -225,7 +229,7 @@ public class ExpertManage { String verificationCode = request.getVerificationCode(); String phoneNo = request.getBasicInfo().getPhoneNo(); //校验 专家验证码 - if (false) { + if (expertRegistrationVerifyCodeCheck) { verifyCodeCheckHelper.verification(VerificationCodeType.EXPERT_REGISTER, phoneNo, verificationCode); } assemblerAndGenerateExpert(request, null); diff --git a/pmapi/src/main/resources/application-dev.yml b/pmapi/src/main/resources/application-dev.yml index 4c5f27b..df8b278 100644 --- a/pmapi/src/main/resources/application-dev.yml +++ b/pmapi/src/main/resources/application-dev.yml @@ -240,5 +240,9 @@ login: url: http://lspm.ningdatech.com/login web: url: http://lspm.ningdatech.com +# 专家报名验证码校验 +expert-registration: + verify-code: + check: false