forked from kidgrow-microservices-platform

zhaoxiaohao
2020-08-17 73d5561cbf2bea50acc22f91050fcc3557d49de4
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
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";
    /**
     * 客户端屏幕分辨率
     */
    String USER_AGENT_SYSTEM_SCREEN="user_agent_system_screen";
 
    /**
     * 标签 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-xg";
    /**
     * 超级管理的id
     */
    Long ADMIN_USER_ID=1000000000000000001L;
    /**
     * 公共日期格式
     */
    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:";
    /**
     * H端的 tenantid
     */
    String H_TENANT="hospital";
    /**
     * H端的 登录用户类型
     */
    String H_DOCTOR="doctor";
    /**
     * 租户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-xg";
 
    /**
     * 负载均衡策略-版本号 信息头
     */
    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";
    /**
     * logo缩略图默认宽
     */
    public static final Integer TH_IMG_WIDTH = 300;
    /**
     * logo缩略图默认高
     */
    public static final Integer TH_IMG_HEIGHT = 150;
    /**
     * 生成缩略图需要的图片暂存目录
     */
//    public static final String TEMP_IMAGE_PATH="D:/resources/images/";
    public static final String TEMP_IMAGE_PATH="/root/kidgrow";
    /**
     * 普通医生角色ID
     */
    public static final Long HOSPITAL_DOCTOR_ID=1268826800663289858L;
    /**
     * 普通医生角色code标识`
     */
    public static final String HOSPITAL_DOCTOR_CODE="hospital_doctor";
 
    /**
     * 管理员医生角色ID
     */
    public static final Long HOSPITAL_ADMIN_ID=1238826800663299909L;
    /**
     * 管理员医生角色code标识
     */
    public static final String HOSPITAL_ADMIN_CODE="hospital_admin";
 
    /**
     * 自主注册医院的组织id
     */
    public static final Long HOSPITAL_ORG_ID=15321234570L;
 
    /**
     * 自主注册的科室组织id
     */
    public static final Long DEPARTMENT_ORG_ID=15321234571L;
    /**
     * 自主注册的用户默认给的产品id
     */
    public static final Long REG_USER_PRODUCT_ID=1000000000000000001L;
    /**
     * 自主注册的用户合同时长 天
     */
    public static final Integer REG_USER_CONTRACT_DAY=15;
    /**
     * 自主注册的用户合同名
     */
    public static final String REG_USER_CONTRACT_NAME="注册用户免费合同";
    /**
     * 自主注册的创建人id
     */
    public static final Long CREATE_USER_ID= 0L;
    /**
     * 自主注册的创建人名称
     */
    public static final String CREATE_USER_NAME= "自动创建";
    /**
     * 管理员角色code标识
     */
    public static final String SYSTEM_ADMIN_ROLE_CODE="admin";
 
    /**
     * 销售主管角色code标识
     */
    public static final String SALE_MANAGER_ROLE_CODE="salemanager";
 
    /**
     * 喜高PC高管角色code标识
     */
    public static final String PC_ADMIN_ROLE_CODE="pc_admin";
    /**
     * 喜高运营高管角色code标识
     */
    public static final String OPRATIONMANAGER_ROLE_CODE="oprationmanager";
 
    /**
     * 集团组织级别
     */
    public static final Integer SYSTEM_ORG_TOP_CODE=0;
    /**
     * 公司/医院组织级别
     */
    public static final Integer SYSTEM_ORG_HOS_LEVEL=1;
    /**
     * 科室部门组织级别
     */
    public static final Integer SYSTEM_ORG_DEP_LEVEL=2;
    /**
     * 医生类型 C+H
     */
    public static final Integer CH_DOCTOR_TYPE=0;
    /**
     * 医生类型 H
     */
    public static final Integer H_DOCTOR_TYPE=1;
    /**
     * 医生类型 C
     */
    public static final Integer C_DOCTOR_TYPE=2;
    /**
     * 一个科室能最大试用多少次
     */
    public static final Integer MAX_FREE_COUNT=5;
}