mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
设置过期时间
This commit is contained in:
@@ -570,9 +570,14 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
String jsonMsg = JSON.toJSONString(realTimeMonitorData);
|
||||
// 上传实时数据每10秒发送一次,1分钟6次,在同一分钟内,只保留最后一条实时数据
|
||||
redisCache.hset(redisKey, DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:00", now), jsonMsg);
|
||||
// 设置过期时间
|
||||
if (redisCache.getExpire(redisKey) < 0) {
|
||||
redisCache.expire(redisKey, CacheConstants.cache_expire_time_1d);
|
||||
|
||||
try {
|
||||
// 设置过期时间
|
||||
if (redisCache.getExpire(redisKey) < 0) {
|
||||
redisCache.expire(redisKey, CacheConstants.cache_expire_time_1d);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.info("设置过期时间error", e);
|
||||
}
|
||||
|
||||
// 把充电桩正在充电中的状态存到redis
|
||||
|
||||
Reference in New Issue
Block a user