21 小时以前 c15e67c83394c1734eb4e9802d8f343c6076efc1
src/main/java/com/ruoyi/inspectiontask/service/impl/TimingTaskJob.java
@@ -5,6 +5,7 @@
import com.ruoyi.inspectiontask.pojo.TimingTask;
import lombok.RequiredArgsConstructor;
import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
@@ -20,12 +21,13 @@
@Component
@DisallowConcurrentExecution // 禁止并发执行同一个Job
@RequiredArgsConstructor
public class TimingTaskJob implements Job, Serializable {
    private static final long serialVersionUID = 1L; // 必须定义序列化ID
    private final InspectionTaskMapper inspectionTaskMapper;
    private final JdbcTemplate jdbcTemplate;
    @Autowired
    private InspectionTaskMapper inspectionTaskMapper;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {