소스 검색

恶劣天气缓存24小时

zhulu 1 년 전
부모
커밋
192a6e5978
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java

@@ -111,9 +111,9 @@ public class WeatherWarningServiceImpl extends ServiceImpl<WeatherWarningMapper,
                     }
                      if(CollectionUtils.isNotEmpty(listJg)){
                          this.saveBatch(listJg);
-                         //将数据存入redis供界面展示使用暂定6小时
+                         //将数据存入redis供界面展示使用暂定24小时
                          redisTemplate.opsForValue().set("wearth_areaid_"+areaId, JSON.toJSONString(listJg));
-                         this.redisTemplate.expire("wearth_areaid_"+areaId, 6, TimeUnit.HOURS);
+                         this.redisTemplate.expire("wearth_areaid_"+areaId, 24, TimeUnit.HOURS);
                      }
                 }
             }