zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
package com.changhong.epc.constter.base;
 
import com.changhong.epc.constter.system.UserInfo;
import com.iemsoft.framework.cloud.core.thread.Keys;
import org.apache.commons.lang3.StringUtils;
 
import javax.servlet.http.Cookie;
 
public interface BaseConst {
    /**
     * 项目编码
     */
    String PROJECT_CHARSET                 = "UTF-8";
    
    /**
     * 租户id
     */
    Keys<String> TENANT_ID                 = Keys.getKeys("tenantId", String.class);
 
    /**
     * 租户名
     */
    Keys<String> OPEN_ID                = Keys.getKeys("openId",String.class, "");
 
    /**
     * 业务系统id
     */
    Keys<Integer> SERVICE_ID             = Keys.getKeys("serviceId", Integer.class);
 
    
    /**
     * 用户信息
     */
    Keys<UserInfo> USER_INFO             = Keys.getKeys("userInfo", UserInfo.class);
 
    /**
     * 公司id 查询主数据等用
     */
    Keys<Integer> COMPANY_ID             = Keys.getKeys("companyId", Integer.class);
 
    /**
     * 公司主数据id 查询业务类型用
     */
    Keys<Integer> COMPANY_MASTER_ID        = Keys.getKeys("companyMasterId", Integer.class);
    
    /**
     * token
     */
    Keys<String> TOKEN                     = Keys.getKeys("token", String.class);
 
    /**
     * 用户名称
     */
    Keys<String> USER_NAME                 = Keys.getKeys("userName", String.class);
 
    /**
     * 订单号
     */
    Keys<String> ORDER_CODE                 = Keys.getKeys("orderCode", String.class);
 
    /**
     * 表单id
     */
    Keys<String> FORMID                 = Keys.getKeys("formId", String.class);
 
    /**
     * dataRowNum
     */
    Keys<String> DATA_ROW_NUM                 = Keys.getKeys("dataRowNum", String.class);
 
    /**
     * 数据源
     */
    Keys<String> DATA_SOURCE        = Keys.DATA_SOURCE;
 
    /**
     * 是否忽略数据权限
     */
    Keys<Boolean> IGNORE_DATA_POWER        = Keys.getKeys("IGNORE_DATA_POWER", Boolean.class, Boolean.FALSE);
 
    Keys<String> PERM_TYPE        = Keys.getKeys("PERM_TYPE", String.class, "");
 
    default boolean isEmpty(Cookie cookie){
        return cookie == null || StringUtils.isBlank(cookie.getValue());
    }
    
    String C0000 = "00000";
 
    String C0002 = "00002";
 
    String C0018 = "00018";
    
    /**
     * 登录验证失效
     */
    String N0001 = "N0001";
    
    /**
     * 接口调用失败
     */
    String N0002 = "N0002";
    
    /**
     * token篡改
     */
    String U0002 = "U0002";
 
    /**
     * 参数不能包含script标签
     */
    String L0008 = "L0008";
 
}