#
luxiaotao1123
2020-07-07 f8888ba946f073c8bf47f7ec2da3e79b320d908a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.zy.asrs.task;
 
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.task.handler.WorkMastHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
 
import java.util.List;
 
/**
 * Created by vincent on 2020/7/7
 */
//@Component
public class WorkMastScheduler {
 
    @Autowired
    private WrkMastService wrkMastService;
    @Autowired
    private WorkMastHandler workMastHandler;
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){
        List<WrkMast> wrkMasts = wrkMastService.selectToBeCompleteData();
        if (wrkMasts.isEmpty()) {
            return;
        }
        for (WrkMast wrkMast : wrkMasts) {
            ReturnT<String> start = workMastHandler.start(wrkMast);
 
 
 
        }
    }
 
}