1
zj
11 hours ago d615fc515fc52d6ed970c11d59a017e48de4be32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.nq.utils.sms;
 
public final class SmsConstants {
 
    public static final String SMS_CODE_PREFIX = "SmsCode:";
    public static final String SMS_SEND_LOCK_PREFIX = "SmsSendLock:";
    /** 验证码有效期(秒) */
    public static final int SMS_CODE_TTL_SECONDS = 60;
    /** 同一手机号发送间隔(秒) */
    public static final int SMS_SEND_INTERVAL_SECONDS = 60;
 
    /** 短信验证码校验是否开启,对应 application.properties 中 sms.verify.enabled */
    public static boolean isVerifyEnabled() {
        String enabled = com.nq.utils.PropertiesUtil.getProperty("sms.verify.enabled");
        return !"false".equalsIgnoreCase(org.apache.commons.lang3.StringUtils.trimToEmpty(enabled));
    }
 
    private SmsConstants() {
    }
}