package com.zy.nc.task;
|
|
import com.zy.asrs.task.core.ReturnT;
|
import com.zy.nc.task.handler.PlanOrderHandler;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
@Slf4j
|
@Component
|
public class BaseDataTask {
|
|
@Autowired
|
private PlanOrderHandler planOrderHandler;
|
|
@Scheduled(cron = "0/3 * * * * ? ")
|
public void execute1() {
|
ReturnT<String> returnT = planOrderHandler.start1();
|
if (!returnT.isSuccess()) {
|
log.error(returnT.getMsg());
|
}
|
}
|
|
@Scheduled(cron = "0/3 * * * * ? ")
|
public void execute2() {
|
ReturnT<String> returnT = planOrderHandler.start2();
|
if (!returnT.isSuccess()) {
|
log.error(returnT.getMsg());
|
}
|
}
|
|
}
|