自动化立体仓库 - WMS系统
lty
11 小时以前 9465ca0127101dfec793afce847b613dad80bce2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.zy.asrs.task;
 
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.ExceptionNoticeHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import static org.reflections.Reflections.log;
@Component
public class ExceptionNoticeScheduler {
    @Autowired
    private ExceptionNoticeHandler exceptionNoticeHandler;
    @Scheduled(cron = "0/1 * * * * ? ")
    private void execute(){
        ReturnT<String> returnT = exceptionNoticeHandler.start();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());
        }
    }
}