1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package cn.wisenergy.web.sms;
/***
* 系统中保存的一些常量
*/
/**
* Created by m1991 on 2021/2/28 22:50
*/
public class Constants {
//通用常量
public static class Common{
//否
public final static Integer NOT = 0;
//是
public final static Integer YES = 1;
//女
public final static Integer SEX_WOMEN = 0;
//男
public final static Integer SEX_MAN = 1;
//数据精度
public final static Integer DECIMAL_DIGITS = 2;
}
//访问来源
public static class SourceType{
//访问来源-APP
public final static Integer APP = 0;
//访问来源-PC
public final static Integer PC = 1;
}
//连接符
public static class Connnector{
//逗号
public final static String COMMA_ = ",";
//下划线
public final static String UNDERLINE = "_";
//冒号
public final static String COLON=":";
}
//时长
public static class Duration{
//一秒
public final static Integer SECOND_INT = 1;
//一分钟
public final static Integer MINUTE_INT = SECOND_INT * 60;
//半小时
public final static Integer HALF_HOUR_INT = MINUTE_INT * 30;
}
//正则的一些常量
public static class RegConstant{
//手机号正则
public static String PHONE_REGSTR = "^[1][0-9]{10}$";
//密码正则
public static String PASSWORD_REGSTR = "^([A-Z]|[a-z]|[0-9]|[_]){6,10}$";
}
//SMS相关常量
public static class Sms{
public static class TemplateCode{
public static String LOGIN_OR_REGISTER="SMS_197895260";
}
public static class CodeType{
public static Integer LOGIN_OR_REGISTER=0;
public static Integer PASS_UPDATE=1;
public static Integer ORDER_NOTICE=2;
}
}
//RedisKey相关的常量
public static class RedisKey{
public static String PROJECT_PRIFIX="xts";
public static String SMS_PRIFIX="sms";
public static String TOKEN_PRIFIX="token";
}
}