fix(任务中心): 后台任务时间排序问题

--bug=1048138 --user=王旭 【系统设置】系统-系统后台任务-下次执行时间-排序后顺序错误 https://www.tapd.cn/55049933/s/1599597
This commit is contained in:
WangXu10 2024-10-28 18:52:51 +08:00 committed by Craftsman
parent 7c6b2041ea
commit 746688eefa
1 changed files with 2 additions and 7 deletions

View File

@ -279,13 +279,8 @@ public class BaseTaskHubService {
item.setNextTime(trigerTimeMap.get(item.getResourceId()).getNextTime());
item.setLastTime(trigerTimeMap.get(item.getResourceId()).getLastTime());
} else {
try {
CronExpression cron = new CronExpression(item.getValue());
Date date = new Date(System.currentTimeMillis());
item.setNextTime(cron.getNextValidTimeAfter(date).getTime());
} catch (ParseException e) {
LogUtils.error(e);
}
item.setNextTime(item.getNextTime());
item.setLastTime(item.getLastTime());
}
}
}