package com.qs.mp.framework.redis;

import com.qs.mp.common.utils.MessageHelper;

/**
 * redis Key管理模版
 *
 * @author duota
 *
 */
public enum RedisKey {
    MARKETING_FAKE_NUM("marketing_fake_num_{0}", "营销活动虚拟参与人数"),
    OPEN_LINK_KEY("open_link_key_{0}_{1}","微信scheme码缓存key"),
    WX_APP_TOKEN_KEY("app_token_key_{0}", "小程序app token"),
    CHANNEL_ORDER_KEY("channel_order_{0}", "经销商下的盲票采购单"),
    USER_TICKET_ORDER_KEY("user_ticket_order_key_{0}", "用户购票订单"),
    USER_DELIVER_ORDER_KEY("user_deliver_order_key_{0}", "用户提货订单"),
    OFFLINE_TICKET_ID_KEY("offline_ticket_id_key_{0}", "线下盲票ID"),
    USER_PRIZE_RECOVERY_KEY("user_prize_recovery_key_{0}", "用户奖品回收");

    public String keyTemplate;
    public String desc;

    RedisKey(String keyTemplate, String desc) {
        this.keyTemplate = keyTemplate;
        this.desc = desc;
    }
    public static String build(RedisKey redisKey, Object... param) {
        return MessageHelper.formatMsg(redisKey.keyTemplate, param);
    }
}
