package com.yeshi.buwan.util;
|
|
public enum RedisKeyEnum {
|
SMSVCode("smscode-", "短信验证码"),
|
SMSLIMIT("smscode-limit-", "短信验证码发送限制"),
|
|
;
|
|
private final String key;
|
private final String desc;
|
|
private RedisKeyEnum(String key, String desc) {
|
this.key = key;
|
this.desc = desc;
|
}
|
|
public String getDesc() {
|
return desc;
|
}
|
|
public String getKey() {
|
return key;
|
}
|
|
public static String getRedisKey(RedisKeyEnum keyEnum, String value) {
|
return keyEnum.getKey() + value;
|
}
|
}
|