|
@@ -22,18 +22,16 @@ public class YfProjectTask
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ProjectTaskMapper projectTaskMapper;
|
|
private ProjectTaskMapper projectTaskMapper;
|
|
|
public void end(){
|
|
public void end(){
|
|
|
- System.out.println("执行定时任务,完成项目");
|
|
|
|
|
|
|
+ System.out.println("执行定时任务,完成项目开始=====================");
|
|
|
List<ProjectTask> projectTasks = projectTaskMapper.selectAll();
|
|
List<ProjectTask> projectTasks = projectTaskMapper.selectAll();
|
|
|
List<Long> ids =new ArrayList<>();
|
|
List<Long> ids =new ArrayList<>();
|
|
|
long nowDate = System.currentTimeMillis();
|
|
long nowDate = System.currentTimeMillis();
|
|
|
- System.out.println(projectTasks.size());
|
|
|
|
|
for (ProjectTask p : projectTasks) {
|
|
for (ProjectTask p : projectTasks) {
|
|
|
long taskDate = p.getEndTime().getTime();
|
|
long taskDate = p.getEndTime().getTime();
|
|
|
System.out.println("newDate="+nowDate);
|
|
System.out.println("newDate="+nowDate);
|
|
|
System.out.println("taskDate="+taskDate);
|
|
System.out.println("taskDate="+taskDate);
|
|
|
if (nowDate>taskDate){
|
|
if (nowDate>taskDate){
|
|
|
ids.add(p.getId());
|
|
ids.add(p.getId());
|
|
|
- System.out.println(p.getId());
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (ids.size()>0) {
|
|
if (ids.size()>0) {
|
|
@@ -45,6 +43,7 @@ public class YfProjectTask
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ System.out.println("执行定时任务,完成项目完成=====================");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|