package com.liquidnet.common.cache.redis.constant;

/**
 * @author ceshi
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2018/1/25 0025上午 11:19
 */
public enum RedisKeys {
    /**
     * 支付银行列表
     */
    PAY_CHANNEL_BANK_LIST_KEY("payChannel:bankList:"),;

    private static final String PREFIX = "XIAOYAO:CACHE:DATA:";
    private String key;

    RedisKeys(String key) {
        this.key = PREFIX + key;
    }

    /**
     * 构造redis key
     *
     * @param params
     * @return
     */
    public String build(Object... params) {
        StringBuilder sb = new StringBuilder(this.key);
        for (Object param : params) {
            sb.append(param);
        }
        return sb.toString();
    }

}
