diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/config/IrsSealPlatformProperties.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/config/IrsSealPlatformProperties.java new file mode 100644 index 0000000..ebb9c45 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/config/IrsSealPlatformProperties.java @@ -0,0 +1,51 @@ +package com.ningdatech.pmapi.irs.config; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +/** + * @author liuxinxin + * @date 2023/3/16 下午6:03 + */ + +@Component +@Data +public class IrsSealPlatformProperties { + public static String projectId; + + public static String projectSecret; + + public static String accessKey; + + public static String secretKey; + + public static String apiUrl; + + + @Value("${irs.seal-platform.project-id}") + public void setProjectId(String projectId) { + IrsSealPlatformProperties.projectId = projectId; + } + + @Value("${irs.seal-platform.project-secret}") + public void setProjectSecret(String projectSecret) { + IrsSealPlatformProperties.projectSecret = projectSecret; + } + + @Value("${irs.seal-platform.access-key}") + public void setAccessKey(String accessKey) { + IrsSealPlatformProperties.accessKey = accessKey; + } + + @Value("${irs.seal-platform.secret-key}") + public void setSecretKey(String secretKey) { + IrsSealPlatformProperties.secretKey = secretKey; + } + + @Value("${irs.seal-platform.api-url}") + public void setApiUrl(String apiUrl) { + IrsSealPlatformProperties.apiUrl = apiUrl; + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sms/manage/SmsManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sms/manage/SmsManage.java index 960136d..1f3f3fc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sms/manage/SmsManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sms/manage/SmsManage.java @@ -85,7 +85,6 @@ public class SmsManage { if (Objects.nonNull(cachePlusOps.get(limitKey))) { Integer limitCount = cachePlusOps.get(limitKey); cachePlusOps.set(new CacheKey(limitKey, Duration.ofSeconds(DateUtil.restSecondsFromNowToNoon())), limitCount++); -// long limitCount = cachePlusOps.incr(new CacheKey(limitKey, Duration.ofSeconds(DateUtil.restSecondsFromNowToNoon()))); // 超出单日发送次数之后直接锁定 if (limitCount >= verificationCodeTypeEnum.getSendTimesByDay().longValue()) { cachePlusOps.set(new CacheKey(lockKey, Duration.ofSeconds(DateUtil.restSecondsFromNowToNoon())), request.getMobile()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sms/model/po/ReqVerificationCodePO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sms/model/po/ReqVerificationCodePO.java index 98712ca..3e41378 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sms/model/po/ReqVerificationCodePO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sms/model/po/ReqVerificationCodePO.java @@ -19,8 +19,8 @@ public class ReqVerificationCodePO implements Serializable { @NotBlank(message = "手机号不能为空") private String mobile; - @ApiModelProperty(value = "短信类型", allowableValues = "LOGIN,RECOMMENDATION_PROOF_FILE_SUBMIT") + @ApiModelProperty(value = "短信类型", allowableValues = "LOGIN") @NotBlank(message = "短信类型不能为空") private String verificationType; -} +} \ No newline at end of file