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 TENANT_ID = Keys.getKeys("tenantId", String.class); /** * 租户名 */ Keys OPEN_ID = Keys.getKeys("openId",String.class, ""); /** * 业务系统id */ Keys SERVICE_ID = Keys.getKeys("serviceId", Integer.class); /** * 用户信息 */ Keys USER_INFO = Keys.getKeys("userInfo", UserInfo.class); /** * 公司id 查询主数据等用 */ Keys COMPANY_ID = Keys.getKeys("companyId", Integer.class); /** * 公司主数据id 查询业务类型用 */ Keys COMPANY_MASTER_ID = Keys.getKeys("companyMasterId", Integer.class); /** * token */ Keys TOKEN = Keys.getKeys("token", String.class); /** * 用户名称 */ Keys USER_NAME = Keys.getKeys("userName", String.class); /** * 订单号 */ Keys ORDER_CODE = Keys.getKeys("orderCode", String.class); /** * 表单id */ Keys FORMID = Keys.getKeys("formId", String.class); /** * dataRowNum */ Keys DATA_ROW_NUM = Keys.getKeys("dataRowNum", String.class); /** * 数据源 */ Keys DATA_SOURCE = Keys.DATA_SOURCE; /** * 是否忽略数据权限 */ Keys IGNORE_DATA_POWER = Keys.getKeys("IGNORE_DATA_POWER", Boolean.class, Boolean.FALSE); Keys 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"; }