forked from kidgrow-microservices-platform

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
package com.kidgrow.common.constant;
 
/**
 * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
 *
 * @Description: 全局公共常量<br>
 * @Project: <br>
 * @CreateDate: Created in 2020/2/3 16:24 <br>
 * @Author: <a href="4345453@kidgrow.com">liuke</a>
 */
public interface CommonConstant {
    /**
     * token请求头名称
     */
    String TOKEN_HEADER = "Authorization";
 
    /**
     * The access token issued by the authorization server. This value is REQUIRED.
     */
    String ACCESS_TOKEN = "access_token";
 
    String BEARER_TYPE = "Bearer";
 
    /**
     * 客户端浏览器
     */
    String USER_AGENT_BROWSER="user_agent_browser";
 
    /**
     * 客户端操作系统
     */
    String USER_AGENT_SYSTEM="user_agent_system";
 
    /**
     * 客户端IP
     */
    String USER_AGENT_IP="user_agent_ip";
 
    /**
     * 标签 header key
     */
    String HEADER_LABEL = "x-label";
 
    /**
     * 标签 header 分隔符
     */
    String HEADER_LABEL_SPLIT = ",";
 
    /**
     * 标签或 名称
     */
    String LABEL_OR = "labelOr";
 
    /**
     * 标签且 名称
     */
    String LABEL_AND = "labelAnd";
 
    /**
     * 权重key
     */
    String WEIGHT_KEY = "weight";
 
    /**
     * 删除
     */
    String STATUS_DEL = "1";
 
    /**
     * 正常
     */
    String STATUS_NORMAL = "0";
 
    /**
     * 锁定
     */
    String STATUS_LOCK = "9";
 
    /**
     * 目录
     */
    Integer CATALOG = -1;
 
    /**
     * 菜单
     */
    Integer MENU = 1;
 
    /**
     * 权限
     */
    Integer PERMISSION = 2;
 
    /**
     * 删除标记
     */
    String DEL_FLAG = "is_del";
 
    /**
     * 超级管理员用户名
     */
    String ADMIN_USER_NAME = "admin";
 
    /**
     * 公共日期格式
     */
    String MONTH_FORMAT = "yyyy-MM";
    String DATE_FORMAT = "yyyy-MM-dd";
    String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    String SIMPLE_MONTH_FORMAT = "yyyyMM";
    String SIMPLE_DATE_FORMAT = "yyyyMMdd";
    String SIMPLE_DATETIME_FORMAT = "yyyyMMddHHmmss";
 
    String DEF_USER_PASSWORD = "123456";
 
    String LOCK_KEY_PREFIX = "LOCK_KEY:";
 
    /**
     * 租户id参数
     */
    String TENANT_ID_PARAM = "tenantId";
 
 
    /**
     * 日志链路追踪id信息头
     */
    String TRACE_ID_HEADER = "x-traceId-header";
 
 
    /**
     * API请求时间戳
     */
    String REQUEST_TIMESTAMP = "timestamp";
 
 
    /**
     * API请求时Version
     */
    String REQUEST_VERSION = "version";
 
    /**
     * 日志链路追踪id日志标志
     */
    String LOG_TRACE_ID = "traceId";
 
    /**
     * 默认分页大小
     */
    int DEFAULT_PAGE_SIZE =20;
 
    /**
     * UUID"零"值
     */
    String UUID_EMPTY ="00000000-0000-0000-0000-000000000000";
 
    /**
     * 默认超级管理员账号
     */
    public final static String ROOT = "admin";
 
    /**
     * 负载均衡策略-版本号 信息头
     */
    String KIDGROW_VERSION = "kidgrow-version";
    /**
     * 注册中心元数据 版本号
     */
    String METADATA_VERSION = "metadata_version";
 
    /**
     * 默认最小页码
     */
    public static final int MIN_PAGE = 0;
    /**
     * 最大显示条数
     */
    public static final int MAX_LIMIT = 999;
    /**
     * 默认页码
     */
    public static final int DEFAULT_PAGE = 1;
    /**
     * 默认显示条数
     */
    public static final int DEFAULT_LIMIT = 10;
    /**
     * 页码 KEY
     */
    public static final String PAGE_KEY = "page";
    /**
     * 显示条数 KEY
     */
    public static final String PAGE_LIMIT_KEY = "limit";
    /**
     * 排序字段 KEY
     */
    public static final String PAGE_SORT_KEY = "sort";
    /**
     * 排序方向 KEY
     */
    public static final String PAGE_ORDER_KEY = "order";
 
    /**
     * 客户端ID KEY
     */
    public static final String SIGN_APP_ID_KEY = "app_id";
 
    /**
     * 客户端秘钥 KEY
     */
    public static final String SIGN_SECRET_KEY = "SECRET_KEY";
 
    /**
     * 随机字符串 KEY
     */
    public static final String SIGN_NONCE_KEY = "NONCE";
    /**
     * 时间戳 KEY
     */
    public static final String SIGN_TIMESTAMP_KEY = "timestamp";
    /**
     * 签名类型 KEY
     */
    public static final String SIGN_SIGN_TYPE_KEY = "SIGN_TYPE";
    /**
     * 签名结果 KEY
     */
    public static final String SIGN_SIGN_KEY = "sign";
}