package com.hzs.common.core.constant;

/**
 * 缓存的统一key 常量
 */
public class CacheConstants {

    /**
     * 统一缓存key前缀
     */
    public final static String CACHE_PREFIX = "global:";

    public final static String UPD_MEMBER = CACHE_PREFIX + "upd:member_name:";

    /**
     * 会员账户
     */
    public final static String MEMBER_ACCOUNT = CACHE_PREFIX + "account:";

    public final static String CUSTOMER_ID = CACHE_PREFIX + "customer:";

    /**
     * 会员缓存刷新时间，默认30天
     */
    public final static long MEMBER_REFRESH_TIME = 30;
    /**
     * 商品缓存刷新时间，默认1天
     */
    public final static long WARES_REFRESH_TIME = 1;

    /**
     * 汇率缓存刷新时间，默认1天
     */
    public final static long CURRENCY_REFRESH_TIME = 7;
    /**
     * 国家缓存key
     */
    public final static String BD_COUNTRY = CACHE_PREFIX + "country:";

    /**
     * 语言常量缓存key
     */
    public static final String LANGUAGE_KEY = CACHE_PREFIX + "language:";

    /**
     * 运输方式
     */
    public static final String TRANSPORT_TYPE = CACHE_PREFIX + "transport:type:";
    /**
     * 权限缓存前缀
     */
    public final static String LOGIN_TOKEN_KEY = CACHE_PREFIX + "login_tokens:";
    /**
     * 权限缓存有效期，默认240（分钟）
     */
    public final static long LOGIN_TOKEN_EXPIRATION = 240;
    /**
     * 权限缓存刷新时间，默认60（分钟）
     */
    public final static long LOGIN_TOKEN_REFRESH_TIME = 60;

    /**
     * 权限缓存有效期，默认60（分钟）
     */
    public final static long MEMBER_LOGIN_TOKEN_EXPIRATION = 60;
    /**
     * 权限缓存刷新时间，默认10（分钟）
     */
    public final static long MEMBER_LOGIN_TOKEN_REFRESH_TIME = 10;

    /**
     * 安置位置
     */
    public static final String POSITION = CACHE_PREFIX + "member_id:position:";

    /**
     * 系统参数
     */
    public static final String SYSTEM_CONFIG = CACHE_PREFIX + "system:config";

    /**
     * 缓存订单
     */
    public static final String TEMP_ORDER = CACHE_PREFIX + "temp:order:";

    /**
     * 缓存参数
     */
    public static final String TEMP_PARAM = CACHE_PREFIX + "temp:param:";
    /**
     * 会员订单
     */
    public static final String MEMBER_ORDER = CACHE_PREFIX + "order:";

    /**
     * 汇率
     */
    public static final String BD_CURRENCY = CACHE_PREFIX + "currency:";

    /**
     * 根据id查询汇率
     */
    public static final String BD_CURRENCY_PK = CACHE_PREFIX + "currency:pkId:";

    /**
     * 根据id查询汇率
     */
    public static final String BD_HISTORY_CURRENCY_PK = CACHE_PREFIX + "currency:history:pkId:";

    /**
     * 邮费
     */
    public static final String BD_POSTAGE = CACHE_PREFIX + "postage:";

    /**
     * 商品分类
     */
    public static final String BD_AREA_CLASSIFY = CACHE_PREFIX + "area:classify:";

    /**
     * 规格分类
     */
    public static final String BD_CLASSIFY = CACHE_PREFIX + "classify:";

    /**
     * 产品规格
     */
    public static final String BD_SPECS = CACHE_PREFIX + "specs:";

    /**
     * 规格类型
     */
    public static final String BD_SPECS_TYPE = CACHE_PREFIX + "specs:type:";

    /**
     * 标签
     */
    public static final String BD_LABEL = CACHE_PREFIX + "label:";

    /**
     * 等级
     */
    public static final String BD_GRADE = CACHE_PREFIX + "grade:";

    /**
     * 专区币种 放入List中，国家+专区作为键
     */
    public static final String BD_AREA_CURRENCY = CACHE_PREFIX + "area:currency";
    /**
     * 分红配置
     */
    public static final String BD_SHARE = CACHE_PREFIX + "share:";

    /**
     * 个税明细配置
     */
    public static final String BD_WITHDRAWAL_TAX = CACHE_PREFIX + "withdrawalTax:";

    /**
     * 提现特殊配置列表
     */
    public static final String BD_WITHDRAWAL_SPECIAL = CACHE_PREFIX + "withdrawalSpecial:";

    /**
     * 根据会员编号查询提现特殊配置
     */
    public static final String BD_WITHDRAWAL_SPECIAL_MEMBER_CODE = CACHE_PREFIX + "withdrawalSpecial:memberCode:";

    /**
     * 转账配置配置列表
     */
    public static final String BD_TRANSFER = CACHE_PREFIX + "transfer:";

    /**
     * 转账特殊配置列表
     */
    public static final String BD_TRANSFER_SPECIAL = CACHE_PREFIX + "transferSpecial:";

    /**
     * 根据会员编号查询转账特殊配置
     */
    public static final String BD_TRANSFER_SPECIAL_MEMBER_CODE = CACHE_PREFIX + "transferSpecial:memberCode:";

    /**
     * 奖衔配置
     */
    public static final String BD_AWARDS = CACHE_PREFIX + "awards:";

    /**
     * 奖项配置
     */
    public static final String BD_BONUS_ITEMS = CACHE_PREFIX + "bonus:items:";

    /**
     * 配送中心配置
     */
    public static final String BD_SHOP = CACHE_PREFIX + "shop:";

    /**
     * 极差配置
     */
    public static final String BD_RANGE = CACHE_PREFIX + "range:";

    /**
     * 辅导分红配置
     */
    public static final String BD_AWARDS_COACH = CACHE_PREFIX + "awards:coach:";

    /**
     * 币种配置
     */
    public static final String BD_ACCOUNT = CACHE_PREFIX + "bdaccount:";

    /**
     * 查询币种转换
     */
    public static final String BD_ACCOUNT_CHANGE = CACHE_PREFIX + "bdac:change:";

    /**
     * 行政区划
     */
    public static final String BD_AREA = CACHE_PREFIX + "area:";

    /**
     * 服务补贴
     */
    public static final String BD_BONUS_SERVICE = CACHE_PREFIX + "bonus:service:";

    /**
     * 奖金扣项
     */
    public static final String BD_BONUS_DEDUCT = CACHE_PREFIX + "bonus:deduct:";

    /**
     * 奖金期间
     */
    public static final String CU_MEMBER_SETTLE_PERIOD = CACHE_PREFIX + "bonus:period:";
    /**
     * 购物车
     */
    public static final String SHOPPIN_GCART = CACHE_PREFIX + "shoppin:gcart:";

    /**
     * 短信缓存key前缀
     */
    public final static String CACHE_SMS_PREFIX = CACHE_PREFIX + "sms:";

    /**
     * 抽奖奖品
     */
    public final static String DRAW_REWARD_GIFT = CACHE_PREFIX + "reward:gift:";

    /**
     * 抽奖更新次数
     */
    public final static String DRAW_REWARD_NUMBER = CACHE_PREFIX + "reward:num:";

    /**
     * 抽奖更新次数
     */
    public final static String MEMBER_DEFAULT_DISPLAY = CACHE_PREFIX + "member:display:";


    /**
     * 交易配置
     */
    public final static String TRADE_CONFIG = CACHE_PREFIX + "trade:config";

    /**
     * 交易白名单配置
     */
    public final static String TRADE_CONFIG_WHITE = CACHE_PREFIX + "trade:config:white";

    /**
     * 后台管理员，数据访问权限缓存key
     */
    public final static String MANAGE_ACCESS_PERMISSIONS = CACHE_PREFIX + "manage:permissions:";

    /**
     * 新零售收益区域缓存KEY
     */
    public final static String RETAIL_REGION = CACHE_PREFIX + "retail:region:%s:%s:%s";
    /**
     * 新零售订单失效时间（分钟）
     */
    public final static Long RETAIL_ORDER_EXPIRE_TIME = 30L;
    /**
     * 新零售缓存订单
     */
    public static final String RETAIL_TEMP_ORDER = CACHE_PREFIX + "retail:temp:order:";
    /**
     * 新零售缓存参数（注册）
     */
    public static final String RETAIL_TEMP_REG_PARAM = CACHE_PREFIX + "retail:temp_reg:param:";
    /**
     * 新零售缓存参数（升级）
     */
    public static final String RETAIL_TEMP_UPG_PARAM = CACHE_PREFIX + "retail:temp_upg:param:";
    /**
     * 新零售缓存参数（其它订单）
     */
    public static final String RETAIL_TEMP_OTHER_PARAM = CACHE_PREFIX + "retail:temp_other:param:";
    /**
     * 在线支付回调上锁
     */
    public final static String ONLINE_PAY_KEY = CACHE_PREFIX + "online:payment:";

    /**
     * 手机每天获取短信缓存 -- Hash（sms:count: 年月日, 登录名）
     */
    public final static String SMS_COUNT = CACHE_PREFIX + "sms:count:%s:";
    /**
     * 登录短信重复发送间隔KEY（1分钟）
     */
    public final static String LOGIN_SEND_TIME = CACHE_PREFIX + "login:send:time:";
    /**
     * 登录短信验证码有效期KEY（5分钟）
     */
    public final static String LOGIN_CHECK = CACHE_PREFIX + "login:valid:";
    /**
     * 注册短信重复发送间隔KEY（1分钟）
     */
    public final static String REGISTER_SEND_TIME = CACHE_PREFIX + "register:send:time:";
    /**
     * 注册短信验证码有效期KEY（5分钟）
     */
    public final static String REGISTER_CHECK = CACHE_PREFIX + "register:valid:";
    /**
     * 找回密码短信重复发送间隔KEY（1分钟）
     */
    public final static String RECOVER_SEND_TIME = CACHE_PREFIX + "recover:send:time:";
    /**
     * 找回密码短信验证码有效期KEY（5分钟）
     */
    public final static String RECOVER_CHECK = CACHE_PREFIX + "recover:check:";
    /**
     * 重置支付密码短信重复发送间隔KEY（1分钟）
     */
    public final static String RESET_SEND_TIME = CACHE_PREFIX + "reset:send:time:";
    /**
     * 重置支付密码短信验证码有效期KEY（5分钟）
     */
    public final static String RESET_CHECK = CACHE_PREFIX + "reset:check:";
    /**
     * 默认发送短信验证码有效期期KEY（5分钟）
     */
    public final static String DEFAULT_CHECK = CACHE_PREFIX + "default:check:";
    /**
     * 默认发送短信重复发送间隔KEY（1分钟）
     */
    public final static String DEFAULT_SEND_TIME = CACHE_PREFIX + "default:send:time:";

    /**
     * 自动登录缓存KEY
     */
    public final static String AUTO_LOGIN = CACHE_PREFIX + "auth:login:";

    /**
     * 发货单合单上锁
     */
    public final static String DELIVER_MERGE_KEY = CACHE_PREFIX + "deliver:merge";

}
