| | |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | @Resource |
| | | private WeatherUtil weatherUtil; |
| | | |
| | | @Resource |
| | | RedisTemplate redisTemplate; |
| | | |
| | | @XxlJob("historyMinutely") |
| | | public ReturnT insertHistoryMinutelyTable(String params) { |
| | |
| | | ReturnT returnT = new ReturnT(500, e.getMessage()); |
| | | return returnT; |
| | | } |
| | | List record = new ArrayList(); |
| | | record.add("repairMinutelyData_"+endTimeDate.getTime()/1000); |
| | | redisTemplate.opsForList().leftPushAll("unrepair_data", record); |
| | | ReturnT returnT = new ReturnT(500, "插入分钟表失败"); |
| | | return returnT; |
| | | } |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | ReturnT returnT = new ReturnT(500, "插入小时表失败"); |
| | | List record = new ArrayList(); |
| | | record.add("repairHourlyData_"+endTimeDate.getTime()/1000); |
| | | redisTemplate.opsForList().leftPushAll("unrepair_data", record); |
| | | return returnT; |
| | | } |
| | | |