发送天气资源消息

This commit is contained in:
wangwenhua 2025-09-14 23:50:40 +08:00
parent 737eebbf4e
commit 36b0878659
3 changed files with 5 additions and 2 deletions

View File

@ -67,6 +67,7 @@ public class Scenario extends SearchInputVo {
@ApiModelProperty("是不是小堆")
private Byte isXd;
@TableField(value = "start_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startTime;
@TableField(value = "end_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

View File

@ -76,7 +76,7 @@ public class ScenarioTaskServiceImpl extends
//查询天气数据
List<WeatherResource> weatherList = weatherResourceService.list(new QueryWrapper<WeatherResource>()
.eq("scenario_id",id));
.eq("scenario_id",scenarioId));
JSONArray jsonArray = new JSONArray();
for(WeatherResource weatherResource: weatherList) {
String weaherStr = JSON.toJSONString(weatherResource);
@ -92,7 +92,7 @@ public class ScenarioTaskServiceImpl extends
jsonArray.add(weatherObj);
}
//放入天气数据
redisUtil.hset(roomId + "_" + id, "weather", JSON.toJSONString(jsonArray));
redisUtil.hset(roomId + "_" + scenarioId, "weather", JSON.toJSONString(jsonArray));
//查询任务
ScenarioTask queryTask = new ScenarioTask();
queryTask.setScenarioId(scenarioId);

View File

@ -63,6 +63,8 @@
Author,
CreateUserId,
CreateTime,
start_time As startTime,
end_time,
id,
left_up_lng AS leftUpLng,
right_up_lng AS rightUpLng,