Explorar o código

恶劣天气缓存24小时

zhulu hai 1 ano
pai
achega
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);
                      }
                 }
             }