|
@ -2705,7 +2705,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
public List<HuzhouProjectinfo> queryBoardInfo() { |
|
|
public List<HuzhouProjectinfo> queryBoardInfo() { |
|
|
// 记录开始时间
|
|
|
// 记录开始时间
|
|
|
long startTime = System.currentTimeMillis(); |
|
|
long startTime = System.currentTimeMillis(); |
|
|
String redisKey = "huzhou_board_info"; |
|
|
String redisKey = "hz_project_board_info"; |
|
|
// 如果存在缓存数据,则直接返回缓存数据
|
|
|
// 如果存在缓存数据,则直接返回缓存数据
|
|
|
String cacheData = stringRedisTemplate.opsForValue().get(redisKey); |
|
|
String cacheData = stringRedisTemplate.opsForValue().get(redisKey); |
|
|
log.info("***查询晾晒看板,缓存键:{}", redisKey); |
|
|
log.info("***查询晾晒看板,缓存键:{}", redisKey); |
|
@ -2776,7 +2776,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
stringRedisTemplate.opsForValue().set(redisKey, JSON.toJSONString(projectInfoList)); |
|
|
stringRedisTemplate.opsForValue().set(redisKey, JSON.toJSONString(projectInfoList)); |
|
|
stringRedisTemplate.expire(redisKey, 30, TimeUnit.MINUTES); |
|
|
stringRedisTemplate.expire(redisKey, 60*6, TimeUnit.MINUTES); |
|
|
|
|
|
|
|
|
// 记录结束时间并计算耗时
|
|
|
// 记录结束时间并计算耗时
|
|
|
long endTime = System.currentTimeMillis(); |
|
|
long endTime = System.currentTimeMillis(); |
|
|