Browse Source

社会专家报名验证码校验参数化

tags/24080901
WendyYang 1 year ago
parent
commit
71e1421fc6
2 changed files with 9 additions and 1 deletions
  1. +5
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java
  2. +4
    -0
      pmapi/src/main/resources/application-dev.yml

+ 5
- 1
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java View File

@@ -44,6 +44,7 @@ import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -80,6 +81,9 @@ public class ExpertManage {
private final VerifyCodeCheckHelper verifyCodeCheckHelper; private final VerifyCodeCheckHelper verifyCodeCheckHelper;
private final CachePlusOps cachePlusOps; 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_EXPIRED_DURATION = Duration.ofDays(3);
private static final Duration REGISTER_GEN_DURATION = Duration.ofMinutes(30); private static final Duration REGISTER_GEN_DURATION = Duration.ofMinutes(30);


@@ -225,7 +229,7 @@ public class ExpertManage {
String verificationCode = request.getVerificationCode(); String verificationCode = request.getVerificationCode();
String phoneNo = request.getBasicInfo().getPhoneNo(); String phoneNo = request.getBasicInfo().getPhoneNo();
//校验 专家验证码 //校验 专家验证码
if (false) {
if (expertRegistrationVerifyCodeCheck) {
verifyCodeCheckHelper.verification(VerificationCodeType.EXPERT_REGISTER, phoneNo, verificationCode); verifyCodeCheckHelper.verification(VerificationCodeType.EXPERT_REGISTER, phoneNo, verificationCode);
} }
assemblerAndGenerateExpert(request, null); assemblerAndGenerateExpert(request, null);


+ 4
- 0
pmapi/src/main/resources/application-dev.yml View File

@@ -240,5 +240,9 @@ login:
url: http://lspm.ningdatech.com/login url: http://lspm.ningdatech.com/login
web: web:
url: http://lspm.ningdatech.com url: http://lspm.ningdatech.com
# 专家报名验证码校验
expert-registration:
verify-code:
check: false





Loading…
Cancel
Save