package com.sckw.core.model.constant;

/**
 * All rights Reserved, Designed By www.51wph.com
 *
 * @version V1.0
 * @ProjectName: wph-platform
 * @Package com.wph.common.consts
 * @Description:全局配置类/系统常用常量
 * @author: zk
 * @date: 2019-05-28 17:31
 * @Copyright: 2019 www.51wph.com Inc. All rights reserved.
 * 注意：本内容仅限于汇链科技有限公司内部传阅，禁止外泄以及用于其他的商业目的
 */
public class Global {

    /**pc-background token有效期为2小时*/
    public static final int PC_BACKGROUND_TOKEN_EXPIRE = 60 * 60 * 2;

    /**app token有效期为30天*/
    public static final int APP_TOKEN_EXPIRE = 30 * 24 * 60 * 60;

    /**pc token有效期为2小时*/
    public static final int PC_TOKEN_EXPIRE = 2 * 60 * 60;

    /**通用有效期为2小时*/
    public static final int COMMON_EXPIRE = 2 * 60 * 60;

    /**API调用token有效时间*/
    public static final int API_EXPIRE = 120 * 60;

    /**保存全局属性值*/
//    private static Map<String, String> map = Maps.newHashMap();

    /**显示/隐藏*/
    public static final int SHOW = 1;
    public static final int HIDE = 0;
    public static final int MINUS_ONE = -1;
    /**正常/删除*/
    public static final int DELETED = 1;
    public static final int UN_DELETED = 0;
    /**是/否*/
    public static final int YES = 1;
    public static final int NO = 0;
    public static final String BE = "是";
    public static final String NAY = "否";

    /**对/错*/
    public static final boolean TRUE = true;
    public static final boolean FALSE = false;

    /**字符*/
    public static final String CODING_GBK = "GBK";
    public static final String CODING_UTF8 = "UTF-8";

    /**消息强弱提醒 强提醒:Y,否则:N*/
    public static final String Y = "Y";
    public static final String N = "N";

    /**初始金额*/
    public static final Double AMOUNT = 0.0;

    /**初始数值*/
    public static final int NUMERICAL_ZERO = 0;
    public static final int NUMERICAL_ONE = 1;
    public static final int NUMERICAL_TWO = 2;
    public static final int NUMERICAL_THREE = 3;
    public static final int NUMERICAL_FOUR = 4;
    public static final int NUMERICAL_EIGHT = 8;
    public static final int NUMERICAL_TWELVE = 12;
    public static final int NUMERICAL_SIXTEEN = 16;

    /**pid等于0的*/
    public static final String PID = "0";

    /**or*/
    public static final String OR = "OR";

    /**and*/
    public static final String AND = "AND";

    /**ok*/
    public static final String OK = "OK";

    /**忘记密码获取验证码*/
    public static final String FORGET_SMS = "forget:";

    /**忘记密码获取验证码*/
    public static final String REPEAT_SUBMIT = "repeatSubmit:";

    /**用户登录验证码*/
    public static final String USER_LOGIN_CAPTCHA = "userLoginCaptcha:";

    /**redis用户信息前缀*/
    public static final String REDIS_USER_LOGIN_PREFIX = "userLoginInfo:";
    public static final String REDIS_USER_PREFIX = "userInfo:";
    public static final String REDIS_USER_TOKEN_PREFIX = "userToken:";

    /**redis企业信息前缀*/
    public static final String REDIS_ENTERPRISE_PREFIX = "enterpriseInfo:";

    /**redis区域信息前缀*/
    public static final String REDIS_AREA_PREFIX = "areaInfo:";

    /**redis区域信息前缀*/
    public static final String REDIS_GROUP_AREA_PREFIX = "areaInfo:group:";

    /**redis用户菜单信息前缀*/
    public static final String REDIS_SYS_MENU_PREFIX = "sysMenu:";

    /**redis字典信息前缀*/
    public static final String REDIS_SYS_DICT_TYPE_PREFIX = "dictInfo:type:";
    public static final String REDIS_SYS_DICT_PREFIX = "dictInfo:dict:";
    public static final String REDIS_SYS_DICT_GROUP_PREFIX = "dictInfo:group:";

    /**告警触发次数*/
    public static final String REDIS_SYS_ALARM_PREFIX = "dictInfo:alarm:";

    /**redis用户车辆gps信息*/
    public static final String REDIS_CACHE_GPS_CAR_PREFIX = "cacheGpsCar:";

    /**redis运营活动奖品前缀*/
    public static final String REDIS_ACTIVITY_PRIZE_PREFIX = "activityPrize:";

    /**redis用户运营活动抽奖信息前缀*/
    public static final String ACTIVITY_JOIN = "activityJoin:";

    /**redis用户运营活动信息前缀*/
    public static final String ACTIVITY = "activity:";

    /**汇链用户专场编号*/
    public static final String PHONE = "400-030-5677";

    /**系统初始密码*/
    public static final String PASSWORD = "123456";

    /**逗号-英文*/
    public static final String COMMA = ",";

    /**逗号-中文*/
    public static final String COMMA1 = "，";
    /**
     * 右斜杠
     */
    public static final String RIGHT_SLASH = "/";

    /**点*/
    public static final String DOT = ".";

    /**冒号*/
    public static final String COLON = ":";

    /**下划线拼接*/
    public static final char UNDERLINE = '_';

    /**空字符串*/
    public static final String EMPTY_STRING = "";

    /**等号**/
    public static final String EQUAL_SIGN = "=";

    /**美元符号**/
    public static final String DOLLAR = "$";

    /**+符号**/
    public static final String PLUS = "+";

    /**-符号*/
    public static final String MINUS_SIGN = "-";

    /**#符号**/
    public static final String POUND = "#";

    /**下划线拼接*/
    public static final String BRACKET = "()";
    public static final String BRACKET_LEFT = "(";
    public static final String BRACKET_RIGHT = ")";

    /**大括号*/
    public static final String BIG_BRACKETS = "{}";
    public static final String BIG_BRACKETS_LEFT = "{";
    public static final String BIG_BRACKETS_RIGHT = "}";

    /**星号拼接*/
    public static final String ASTERISK1 = "*";
    public static final String ASTERISK2 = "**";

    /**括号*/
    public static final String BRACKETS = "[]";
    public static final String BRACKETS_LEFT = "[";
    public static final String BRACKETS_RIGHT = "]";

    /**排序*/
    public static final String ASC = "asc";
    public static final String DESC = "desc";

    /**请求成功值*/
    public static final int SUCCEED = 200;

    /**短信请求返回参数名*/
    public static final String SUCCESS = "success";

    /**pageNum当前页数/pageSize每页显示条数*/
    public static final String PAGE_NUM = "pageNum";
    public static final String PAGE_SIZE = "pageSize";

    /**可调用EncryUtil.generatorPriKey()方法生成*/
    public static final String PRI_KEY = "127f0400ff8a8b7a20d91dfc60a39725";

    /**APP*/
    public static final String APP = "APP";

    /**API*/
    public static final String API = "API";

    /**API初始版本号*/
    public static final String API_VERSION = "1.0.0";

    /**请求头token*/
    public static final String ACCESS_TOKEN = "Access-Token";

    /**客户终端类型*/
    public static final String CLIENT_TYPE = "Client-Type";

    /**系统类型*/
    public static final String SYSTEM_TYPE = "System-Type";

    /**请求代理*/
    public static final String USER_AGENT = "user-agent";

    /**请求格式*/
    public static final String CONTENT_TYPE_AJ = "application/json";

    /**请求方法*/
    public static final String METHOD_POST = "POST";
    public static final String METHOD_GET = "GET";

    /**错误图片*/
    public static final String WRONG_USER_HEAD = "data:,";

    /**运输订单号前缀*/
    public static final String TRAN_NUM_PREFIX = "LTO";

    /**委托单单号前缀*/
    public static final String ENTR_NUM_PREFIX = "LD";

    /**车辆运单单号前缀*/
    public static final String TASK_NUM_PREFIX = "LTL";

    /**装货地点*/
    public static final Integer ADDRESS_LOAD = 1;

    /**卸货地点*/
    public static final Integer ADDRESS_UNLOAD = 2;

    /**时间周期-天/周/月/年*/
    public static final String CYCLE_DAY = "天";
    public static final String CYCLE_WEEK = "周";
    public static final String CYCLE_MONTH = "月";
    public static final String CYCLE_YEAR = "年";

    /**重量单位*/
    public static final String UNIT_TON = "吨";
    public static final String UNIT_KG = "千克";

    /**未读*/
    public static final Integer UN_READ = 0;
    /**管理员角色名*/
    public static final String MANAGE_NAME = "系统管理员";

    /**管理员机构名*/
    public static final String MANAGE_DEPT_NAME = "系统管理员部门";

    /**已读*/
    public static final Integer READ = 1;


    /**完整的用户登录信息key*/
    public static String getFullUserLoginKey(Integer systemType, Long userId, String clientType) {
        return REDIS_USER_LOGIN_PREFIX + systemType + COLON + userId + COLON + clientType;
    }

    /**完整的用户登录信息key*/
    public static String getFullUserLoginKey(Integer systemType, Long userId) {
        return REDIS_USER_LOGIN_PREFIX + systemType + COLON + userId;
    }

    /**完整的用户登录tokenkey*/
    public static String getFullUserTokenKey(String clientType, Long userId) {
        return REDIS_USER_TOKEN_PREFIX + clientType + COLON + userId;
    }

    /**完整的用户企业信息key*/
    public static String getFullUserEntKey(Long entId) {
        return REDIS_ENTERPRISE_PREFIX + entId;
    }

    /**完整的用户菜单信息key*/
    public static String getFullUserMenuKey(Integer systemType, Long userId) {
        return REDIS_SYS_MENU_PREFIX + systemType + COLON + userId;
    }

    /**完整的忘记密码获取验证码key*/
    public static String getForgetKey(Integer systemType, String account) {
        return FORGET_SMS + systemType + COLON + account;
    }

    /**完整的校验重复请求key*/
    public static String getRepeatSubmitKey(Long userId, String url) {
        return REPEAT_SUBMIT + userId + COLON + url;
    }
}
