Constants.java
7.5 KB
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
package cn.runsa.crmapp.base;
import java.util.Date;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
/**
* 系统常量
*
* @author Stephen
*
*/
public class Constants {
/**
* rest webservice 提供的页面地址
*/
public static final String CONSTANTS_SERVER_WEB_URL = "SERVER_URL";
/**
* rest webservice 提供页面的超时时间
*/
public static final int CONSTANTS_API_PAGE_REGISTER_TIMEOUT = 30*60;
/**
* rest webservice 提供页面的业务:会员入会
*/
public static final String CONSTANTS_API_PAGE_SCOPE_REGISTER = "REGISTER";
public static final String CONSTANTS_CLASS_IMPL_PROFILE = "class.impl.profile";
public static final String CONSTANTS_CLASS_IMPL_SYSTEM = "system";
public static final String CONSTANTS_SERVER_CONFIG_PATH = "server_config";
/**
* 系统默认字符集
*/
public static final String CONSTANTS_DEFAULT_CHARSET = "UTF-8";
public static final String CONSTANTS_DEFAULT_SQL_DELIMITER = "#@#!#";
/**
* 内容服务的类型:url
*/
public static final Byte CONSTANTS_CONTENT_URL = 0;
/**
* 东八区:中国
*/
public static final int CONSTANTS_CHINA_OFFSET_UTC = 8;
/**
* 一天的秒
*/
public static final int CONSTANTS_MILLS_OF_DAYS = 24 * 60 * 60 * 1000;
/**
* 操作失败(响应到前端)
*/
public static final String RES_EXEC_FAILURE = "cn.runsa.failure";
/**
* 阳历
*/
public static final int CALENDAR_GREGORIAN = 0;
/**
* 阴历
*/
public static final int CALENDAR_LUNAR = 1;
/**
* 未婚
*/
public static final int MARRIAGE_NO = 0;
/**
* 已婚
*/
public static final int MARRIAGE_YES = 1;
/**
* 婚姻保密
*/
public static final int MARRIAGE_UNKNOWN = 2;
/**
* 女
*/
public static final int SEX_FEMALE = 0;
/**
* 男
*/
public static final int SEX_MALE = 1;
/**
* 性别保密
*/
public static final int SEX_UNKNOWN = 2;
/**
* 永久
*/
public static Date DATE_FOR_EVER = new DateTime(2099, 12, 31, 23, 59, 59,DateTimeZone.forOffsetHours(CONSTANTS_CHINA_OFFSET_UTC)).toDate();
/**
* 业务处理需要分页的默认值
*/
public static final int CONSTANTS_BUSINESS_DEFAULT_PAGE_SIZE = 100;
/**
* 顾客未验证
*/
public static final byte CONSTANTS_CUSTOMER_VERIFY_NOT = 0;
/**
* 非会员
*/
public static final Byte CONSTANTS_CUSTOMER_NOT_MEMBER = (byte)0;
/**
* 会员
*/
public static final Byte CONSTANTS_CUSTOMER_MEMBER = (byte)1;
/**
* 顾客来源渠道:线下
*/
public static final String CONSTANTS_CUSTOMER_CHANNEL_OFFLINE = "OFFLINE";
/**
* 顾客来源渠道:微信
*/
public static final String CONSTANTS_CUSTOMER_CHANNEL_WEIXIN = "WEIXIN";
/**
* 顾客来源:门店
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_SITE = "SIT";
/**
* 顾客来源:推荐顾客
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_CUSTOMER = "CST";
/**
* 顾客来源:推荐雇员
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_EMPLOYEE = "EMP";
/**
* 顾客来源:优惠券
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_COUPON = "CPN";
/**
* 顾客来源:搜索公众号
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_WEIXINGZH = "GZH";
/**
* 顾客来源:物流单
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_EXPRESS = "EXP";
/**
* 顾客来源:商品
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_GOODS = "GDS";
/**
* 顾客来源:活动
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_ACTIVITY = "ACT";
/**
* 顾客来源:订单
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_ORDER= "ODR";
/**
* 顾客来源:APP
*/
public static final String CONSTANTS_CUSTOMER_SOURCE_APP = "APP";
/**
* 优惠券来源:内部券
*/
public static final int CONSTANTS_COUPONS_COME_FROM_INNER = 0;
/**
* 优惠券来源:外部券
*/
public static final int CONSTANTS_COUPONS_COME_FROM_OUTER = 1;
/**
* 优惠券类型:折扣券
*/
public static final int CONSTANTS_COUPONS_TYPE_DISCOUNT = 0;
/**
* 优惠券类型:金额券
*/
public static final int CONSTANTS_COUPONS_TYPE_MONEY = 1;
/**
* 优惠券类型:礼品券
*/
public static final int CONSTANTS_COUPONS_TYPE_GIFT = 2;
/**
* 优惠券类型:定价券
*/
public static final int CONSTANTS_COUPONS_TYPE_PRICE = 3;
/**
* 优惠券类型:包邮券
*/
public static final int CONSTANTS_COUPONS_TYPE_FREESHIPPING = 4;
/**
* 优惠券的生成方式:自动
*/
public static final int CONSTANTS_COUPONS_GENERATE_AUTO = 0;
/**
* 优惠券的生成方式:导入
*/
public static final int CONSTANTS_COUPONS_GENERATE_IMPORT = 1;
/**
* 优惠券的生成方式:接口接入
*/
public static final int CONSTANTS_COUPONS_GENERATE_INTERFACE = 2;
/**
* 手机
*/
public static final String CONSTANTS_CHANNEL_PHONE = "phone";
/**
* 邮箱
*/
public static final String CONSTANTS_CHANNEL_EMAIL = "email";
/**
* 联盟级
*/
public static final String CONSTANTS_CUSTOMER_RANK_DEFAULT = "LMJ";
/**
* 等级改变:升级
*/
public static final boolean CONSTANTS_RANK_CHANGE_UPGRADE = true;
/**
* 等级改变:降级
*/
public static final boolean CONSTANTS_RANK_CHANGE_DEGRADE = false;
/**
* 订单回执业务:积分
*/
public static final String CONSTANTS_ORDER_SERVICE_POINTS = "POINTS";
/**
* 订单回执业务:优惠券
*/
public static final String CONSTANTS_ORDER_SERVICE_COUPONS = "COUPON";
public static final Byte CONSTANTS_ORDER_POINTS_INCREASE = 1;
public static final Byte CONSTANTS_ORDER_POINTS_DECREASE = 2;
/**
* API账户:公众号
*/
public static final String CONSTANTS_API_TYPE_WXGZH = "GZH";
/**
* API账户:POS
*/
public static final String CONSTANTS_API_TYPE_POS = "POS";
/**
* API账户:电商
*/
public static final String CONSTANTS_API_TYPE_E_COMMERCE = "EC";
/**
* API账户:导购
*/
public static final String CONSTANTS_API_TYPE_SALES_ASSISTANT = "SALES";
/**
* 缓存前缀:token
*/
public static final String CONSTANTS_PREFIX_TOKEN = "TOKEN";
/**
* 缓存前缀:顾客信息
*/
public static final String CONSTANTS_PREFIX_CUSTOMER_INFO = "CST_INF";
/**
* 缓存前缀:顾客手机号
*/
public static final String CONSTANTS_PREFIX_CUSTOMER_ID_PHONE = "CST_TEL";
/**
* 缓存前缀:顾客微信
*/
public static final String CONSTANTS_PREFIX_CUSTOMER_ID_WXGZH = "CST_GZH";
/**
* 缓存前缀:顾客账套信息
*/
public static final String CONSTANTS_PREFIX_CUSTOMER_CRM_ACCOUNTS_ALL = "CST_ACTA";
/**
* 缓存前缀:顾客部分账套信息
*/
public static final String CONSTANTS_PREFIX_CUSTOMER_CRM_ACCOUNTS_PART = "CST_ACTP";
public static final String CONSTANTS_TEMPLATE_SCOPE_POINTS_EXPIRY = "POINTS_EXPIRY";
public static final String CONSTANTS_POINTS_CHANGE_TYPE_ADJUST_MANUAL ="ADJ_MAN";
public static final String CONSTANTS_POINTS_CHANGE_TYPE_EXPIRY ="EXPIRY";
/**
* 新建时字段
*/
public static final String CONSTANTS_FIELD_MODE_NEW = "NEW";
/**
* 更新时字段
*/
public static final String CONSTANTS_FIELD_MODE_MODIFY = "MOD";
/**
* 审批通过
*/
public static final Byte CONSTANTS_APPROVAL_STAT_PASS = 2;
public static final String CONSTANTS_EVENT_ENV_KEY_NAME_POINTS_CALCULATE = "CRM_CALCULATE";
/**
* QiNiu
*/
public static final String QN_ACCESS_KEY = "QN_ACCESS_KEY";
public static final String QN_SECRET_KEY = "QN_SECRET_KEY";
public static final String QN_BUCKET = "QN_BUCKET";
}