Переглянути джерело

恶劣天气缓存24小时

zhulu 1 рік тому
батько
коміт
192a6e5978

+ 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);
                      }
                 }
             }