liulin
2024-07-30 ce04dfcdd664df7e791a63800cab2cd2d12e878c
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
package com.lunhan.xxx.common;
 
import java.math.BigDecimal;
 
public final class ConstantFactory {
    private ConstantFactory() {
        throw new IllegalStateException("Utility class");
    }
 
    //********************************** msgCode **********************************
    /**
     * msgCode - token错误
     */
    public static final String MCODE_TOKENERROR = "SYS000003";
    //********************************** msgCode **********************************
 
 
 
 
 
    //********************************** 字符串 **********************************
    /**
     * 获取字符串换行符
     */
    public static final String STR_NEWLINE = "\r\n";
    /**
     * 获取html换行符
     */
    public static final String STR_HTMLBR = "<br />";
    /**
     * 1个空格字符串
     */
    public static final String STR_SPACE = " ";
    /**
     * 正则中的1个空格字符串
     */
    public static final String STR_REGEX_SPACE = "\\s";
    /**
     * ~
     */
    public static final String STR_TIME_RANGE = " ~ ";
    /**
     * ;
     */
    public static final String STR_SEMICOLON = ";";
    //********************************** 字符串 **********************************
 
 
 
 
 
    //********************************** 时间日期 相关 **********************************
    /**
     * 日期格式“yyyy-MM-dd”
     */
    public static final String STR_DATE = "yyyy-MM-dd";
    /**
     * 时间格式“yyyy-MM-dd HH:mm:ss”
     */
    public static final String STR_DATE_FULL = "yyyy-MM-dd HH:mm:ss";
    /**
     * 时间格式“yyyy-MM-dd HH:mm:ss.SSS”
     */
    public static final String STR_DATE_FULLMS = "yyyy-MM-dd HH:mm:ss.SSS";
    /**
     * “ 00:00:00”
     */
    public static final String STR_DATE_DAYSTART = " 00:00:00";
    /**
     * “ 23:59:59”
     */
    public static final String STR_DATE_DAYEND = " 23:59:59";
    /**
     * “1970-01-01”
     */
    public static final String STR_DATE_DEFAULT_DATE = "1970-01-01";
    /**
     * “1970-01-01 00:00:00”
     */
    public static final String STR_DATE_DEFAULT = "1970-01-01 00:00:00";
    /**
     * “1970-01-01 08:00:01”
     */
    public static final String STR_DATE_DEFAULT_UTC8 = "1970-01-01 08:00:01";
    /**
     * “1970-01-01 00:00:00”
     */
    public static final String STR_DATE_DEFAULT_FULL = "1970-01-01 00:00:00.000";
    //********************************** 时间日期 相关 **********************************
 
 
 
 
 
    //********************************** SQL关键字 相关 **********************************
    /**
     * 等于“ = ?”
     */
    public static final String SQL_EQUAL = " = ?";
    /**
     * 不等于
     */
    public static final String SQL_NOTEQUAL = " <> ?";
    /**
     * 大于
     */
    public static final String SQL_GREATER = " > ?";
    /**
     * 大于等于
     */
    public static final String SQL_GREATERTHAN = " >= ?";
    /**
     * 小于
     */
    public static final String SQL_LESS = " < ?";
    /**
     * 小于等于
     */
    public static final String SQL_LESSTHAN = " <= ?";
    /**
     * 模糊等于“ like ?”
     */
    public static final String SQL_LIKE = " like ?";
    /**
     * 模糊不等于“ not like ?”
     */
    public static final String SQL_NOTLIKE = " not like ?";
    /**
     * “ IN”
     */
    public static final String SQL_IN = " IN";
    //public static final String SQL_IN = " FIND_IN_SET(%s, ?) > 0";//由于“FIND_IN_SET”无法使用索引 2020-06-17 改为“in”语法 lin.liu
    /**
     * “ NOT IN”
     */
    public static final String SQL_NOTIN = " NOT IN";
    //public static final String SQL_NOTIN = " FIND_IN_SET(%s, ?) = 0";//由于“FIND_IN_SET”无法使用索引 2020-06-17 改为“not in”语法 lin.liu
 
 
    /**
     * 并且“AND”
     */
    public static final String SQL_AND = " AND";
    /**
     * 或者“OR”
     */
    public static final String SQL_OR = " OR";
 
    /**
     * 逗号“,”
     */
    public static final String SQL_STR_COMMA = " ,";
    /**
     * “ ASC”
     */
    public static final String SQL_ASC = " ASC";
    /**
     * “ DESC”
     */
    public static final String SQL_DESC = " DESC";
    public static final String TB_A = "a.";
    public static final String TB_B = "b.";
    //********************************** SQL关键字 相关 **********************************
 
 
 
 
 
 
    //********************************** redis 相关 **********************************
    /**
     * 分布式锁前缀
     */
    public static final String REDIS_LOCKPREFIX = "lock_";
    /**
     * 分布式锁超时时间10秒
     */
    public static final Long REDIS_LOCKTIMEOUT = 10 * 1000L;
    /**
     * token哈希key
     */
    public static final String REDIS_HASH_TOKEN = "HASH_TOKEN";
    /**
     * 分布式锁超时时间24小时
     */
    public static final Long REDIS_EXPIRE_DEFAULT = 24 * 60 * 60L;
    //********************************** redis 相关 **********************************
 
 
 
 
 
 
    //********************************** request请求 相关 **********************************
    /**
     * token存在于headers的键值
     */
    public static final String REQUEST_TOKENKEY = "tokencode";
    /**
     * token过期时间
     */
    public static final Long TOKEN_EXPIRE_DEFAULT = 2 * 60 * 60L;
    /**
     * 刷新token过期时间
     */
    public static final Long LONG_TOKEN_EXPIRE_DEFAULT = 7 * 24 * 60 * 60L;
    //********************************** request请求 相关 **********************************
 
 
 
 
 
 
    //********************************** 正则表达式相关 **********************************
    /**
     * 字符串格式为日期“yyyy-MM-dd”的正则
     */
    public static final String REGEX_DATE = "^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|(1[0-9])|(2[0-9])|(3[0-1]))$";
    /**
     * 字符串格式为时间“yyyy-MM-dd HH:mm:ss”的正则
     */
    public static final String REGEX_DATETIME = "^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|([12][0-9])|(3[0-1]))\\s((0[0-9])|(1[0-9])|(2[0-3]))(\\:((0[0-9])|([1-5][0-9]))){2}$";
    /**
     * 字符串格式为完整时间“yyyy-MM-dd HH:mm:ss.SSS”的正则
     */
    public static final String REGEX_DATETIME_FULL = "^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|([12][0-9])|(3[0-1]))\\s((0[0-9])|(1[0-9])|(2[0-3]))(\\:((0[0-9])|([1-5][0-9]))){2}\\.([0-9]){3}$";
    /**
     * 字符串格式为时间“/Date(1585790902913+0800)/”的正则
     */
    public static final String REGEX_DATETIME_JAVA = "^/Date\\((?<timestamp>[0-9]{13})\\+([^\\)]+)\\)/$";
 
    //********************************** 正则表达式相关 **********************************
    /**
     * 缴费成功微信模版
     */
    public static final String PAY_THE_FEES_SUCCEED="D_m6GtEG-JQspqFuAvjcvzWCQDCtJAKxtq4pqFzgF54";
    /**
     * 欠费催缴通知
     */
    public static final String ARREARAGE_INFORM="suK97dUCdCqQzwgQ90_DRfzI3TFExmEL1n9DAK3oTDE";
    /**
     * 水费账单提醒
     */
    public static final String WATER_RATE_BILL="qqGUVvz3_rcqpDwJ6LywFOsbZhIHV-0oA6sLbHl1pQ4";
    /**
     * 用水号绑定成功通知
     */
    public static final String ACCOUNT_BINDING_SUCCEED="l1wUD1hkSN16sQxsJ6dcm04BnmiO5-cRGgpsjuoSbLY";
    /**
     * 预付费充值成功提醒
     */
    public static final String TOP_UP_SUCCEED="P29GhSpqsvVdIvEvCabpSD47lNjS5J_jw0tYm5GSKpw";
 
 
 
    //********************************** 正则表达式相关 **********************************
 
 
 
 
 
 
 
 
 
 
 
 
 
    public static final BigDecimal FEE_MAX = new BigDecimal("99999999999999999999.99");
    public static final BigDecimal FEE_PRICE_MAX = new BigDecimal("999.99");
    public static final BigDecimal FEE_AMOUNT_MAX = new BigDecimal("999999.99");
    public static final BigDecimal FEE_PERCENTAGE_MAX = new BigDecimal("100");
    public static final Integer NUM0 = 0;
    public static final Integer NUM1 = 1;
    public static final Integer NUM2 = 2;
    public static final Integer NUM3 = 3;
    public static final Integer NUM4 = 4;
    public static final Integer NUM5 = 5;
    public static final Integer NUM10 = 10;
    public static final Integer NUM15 = 15;
    public static final Integer NUM20 = 20;
    public static final Integer NUM30 = 30;
    public static final Integer NUM50 = 50;
    public static final Integer NUM100 = 100;
    public static final Integer NUM200 = 200;
    public static final Integer NUM500 = 500;
    public static final Integer NUM1000 = 1000;
    public static final Integer NUM2000 = 2000;
    public static final Integer NUM5000 = 5000;
    public static final Integer NUM10000 = 10000;
    public static final Integer LENGTH_MAX10000 = 10000;
    public static final Integer LENGTH_MAX7000 = 7000;
    public static final Integer LENGTH_MAX5000 = 5000;
    public static final Integer LENGTH_MAX2000 = 2000;
    public static final Integer LENGTH_MAX1000 = 1000;
    public static final Integer LENGTH_MAX500 = 500;
    public static final Integer LENGTH_MAX200 = 200;
    public static final Integer LENGTH_MAX100 = 100;
    public static final Integer LENGTH_MAX50 = 50;
    public static final Integer LENGTH_MAX20 = 20;
    public static final Integer LENGTH_MAX11 = 11;
    public static final Integer MONEY_MAX_LENGTH = 2;
    public static final Integer MAX_PAGE_SIZE = 999999;
    public static final Integer PAGE_SIZE_DEFAULT = 20;
    public static final Integer DEFAULT_NUM_PRECISION = 2;
    public static final Integer FILE_UNIT = 1024;
    public static final Integer FILE_SIZE_1M = 1024;
    public static final Integer FILE_SIZE_2M = 2 * 1024;
    public static final Integer FILE_SIZE_5M = 5 * 1024;
    public static final Integer FILE_SIZE_10M = 10 * 1024;
    public static final Integer FILE_SIZE_20M = 20 * 1024;
    public static final Integer FILE_SIZE_50M = 50 * 1024;
    public static final Integer FILE_SIZE_100M = 100 * 1024;
    public static final Integer FILE_SIZE_200M = 200 * 1024;
    public static final Integer TIME_LEN_1S = 1000;
    public static final Integer TIME_LEN_10S = 10 * 1000;
    public static final Integer TIME_LEN_1MIN = 60 * 1000;
    public static final Integer TIME_LEN_5MIN = 5 * 60 * 1000;
    public static final Integer TIME_LEN_10MIN = 10 * 60 * 1000;
    public static final Integer TIME_LEN_20MIN = 20 * 60 * 1000;
    public static final Integer TIME_LEN_50MIN = 50 * 60 * 1000;
    public static final Integer TIME_LEN_100MIN = 100 * 60 * 1000;
    public static final Integer TIME_LEN_1H = 60 * 60 * 1000;
    public static final Integer TIME_LEN_2H = 2 * 60 * 60 * 1000;
    public static final Integer TIME_LEN_12H = 12 * 60 * 60 * 1000;
    public static final Integer TIME_LEN_24H = 24 * 60 * 60 * 1000;
    public static final String KEY_PASSWORD = "lunhan_wcI32U+F5cSF1AL2321UoelnZNYQWxCd_hard_ware";
}