通过redis来进行单据的单号重复判断
This commit is contained in:
@@ -104,6 +104,16 @@ public class RedisService {
|
||||
redisTemplate.opsForValue().set(verifyKey, codeNum, BusinessConstants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* 带有效时间缓存数据
|
||||
* @param key
|
||||
* @param value
|
||||
* @param time 单位秒
|
||||
*/
|
||||
public void storageKeyWithTime(String key, String value, Long time) {
|
||||
redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单个对象
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user