初次提交
This commit is contained in:
parent
01007c1279
commit
0601bc932a
|
|
@ -71,13 +71,15 @@ public class ScenarioTaskServiceImpl extends
|
||||||
//查询天气数据
|
//查询天气数据
|
||||||
WeatherResource weatherList = weatherResourceService.getOne(new QueryWrapper<WeatherResource>()
|
WeatherResource weatherList = weatherResourceService.getOne(new QueryWrapper<WeatherResource>()
|
||||||
.eq("scenario_id",id));
|
.eq("scenario_id",id));
|
||||||
// currentScenario.getGuid());
|
if(weatherList!=null){
|
||||||
//放入天气数据
|
//放入天气数据
|
||||||
redisUtil.hset(roomId + "_" + id, "weather", weatherList.getWeatherType());
|
redisUtil.hset(roomId + "_" + id, "weather", weatherList);
|
||||||
|
}
|
||||||
|
|
||||||
//查询任务
|
//查询任务
|
||||||
ScenarioTask queryTask = new ScenarioTask();
|
ScenarioTask queryTask = new ScenarioTask();
|
||||||
queryTask.setScenarioId(id);
|
queryTask.setScenarioId(id);
|
||||||
redisUtil.hset(roomId + "_" + id, "taskList", queryTaskList(queryTask).get(0).getTaskType());
|
redisUtil.hset(roomId + "_" + id, "taskList", queryTaskList(queryTask));
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
|
|
||||||
springGlobalTaskManager.startPerSecondTask(roomId + "_" + id + "_task", () -> {
|
springGlobalTaskManager.startPerSecondTask(roomId + "_" + id + "_task", () -> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user