发送天气资源消息
This commit is contained in:
parent
737eebbf4e
commit
36b0878659
|
|
@ -67,6 +67,7 @@ public class Scenario extends SearchInputVo {
|
||||||
@ApiModelProperty("是不是小堆")
|
@ApiModelProperty("是不是小堆")
|
||||||
private Byte isXd;
|
private Byte isXd;
|
||||||
@TableField(value = "start_time")
|
@TableField(value = "start_time")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime startTime;
|
private LocalDateTime startTime;
|
||||||
@TableField(value = "end_time")
|
@TableField(value = "end_time")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public class ScenarioTaskServiceImpl extends
|
||||||
|
|
||||||
//查询天气数据
|
//查询天气数据
|
||||||
List<WeatherResource> weatherList = weatherResourceService.list(new QueryWrapper<WeatherResource>()
|
List<WeatherResource> weatherList = weatherResourceService.list(new QueryWrapper<WeatherResource>()
|
||||||
.eq("scenario_id",id));
|
.eq("scenario_id",scenarioId));
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
for(WeatherResource weatherResource: weatherList) {
|
for(WeatherResource weatherResource: weatherList) {
|
||||||
String weaherStr = JSON.toJSONString(weatherResource);
|
String weaherStr = JSON.toJSONString(weatherResource);
|
||||||
|
|
@ -92,7 +92,7 @@ public class ScenarioTaskServiceImpl extends
|
||||||
jsonArray.add(weatherObj);
|
jsonArray.add(weatherObj);
|
||||||
}
|
}
|
||||||
//放入天气数据
|
//放入天气数据
|
||||||
redisUtil.hset(roomId + "_" + id, "weather", JSON.toJSONString(jsonArray));
|
redisUtil.hset(roomId + "_" + scenarioId, "weather", JSON.toJSONString(jsonArray));
|
||||||
//查询任务
|
//查询任务
|
||||||
ScenarioTask queryTask = new ScenarioTask();
|
ScenarioTask queryTask = new ScenarioTask();
|
||||||
queryTask.setScenarioId(scenarioId);
|
queryTask.setScenarioId(scenarioId);
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@
|
||||||
Author,
|
Author,
|
||||||
CreateUserId,
|
CreateUserId,
|
||||||
CreateTime,
|
CreateTime,
|
||||||
|
start_time As startTime,
|
||||||
|
end_time,
|
||||||
id,
|
id,
|
||||||
left_up_lng AS leftUpLng,
|
left_up_lng AS leftUpLng,
|
||||||
right_up_lng AS rightUpLng,
|
right_up_lng AS rightUpLng,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user