package com.nq.utils.redis;
|
|
import org.omg.CORBA.PUBLIC_MEMBER;
|
|
/**
|
* redis Key
|
* */
|
public class RedisKeyConstant {
|
|
|
/**
|
* 基础数据key
|
* */
|
public static final String RK_BASE_STOCK = "rk_base_stock";
|
|
|
/**
|
* 股票实时数据key
|
* */
|
public static final String RK_REAL_TIME_STOCK = "rk_real_time_stock";
|
|
|
/**
|
* 股票实时数据key
|
* */
|
public static final String RK_COMPANY_INFO = "rk_company_info";
|
|
|
/**
|
* 短信code
|
*/
|
public static final String verification_code= "verification_code";
|
|
|
/**
|
* 黄金行情
|
*/
|
public static final String XAUUSD= "XAUUSD";
|
|
/**
|
* 原油行情
|
*/
|
public static final String USOIL= "USOIL";
|
|
/**
|
* 根据传入的 key 名称获取对应的 Redis key 常量
|
*
|
* @param key 名称
|
* @return 对应的 Redis Key 或者 null 如果没有匹配的 key
|
*/
|
public static String getRedisKey(String key) {
|
switch (key) {
|
case "XAUUSD":
|
return XAUUSD;
|
case "USOIL":
|
return USOIL;
|
default:
|
return null; // 如果没有匹配的 key,返回 null
|
}
|
}
|
}
|