package com.pqs9300.task;

import com.pqs9300.service.formdata.FormDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class WarningTask {
    @Autowired
    private FormDataService formDataService;

    @Scheduled(cron = "59 59 23 * * ?")
    public void superviseWarning() {
        System.out.println("开始执行");
        formDataService.insertFormData();
        formDataService.insertFormData(1);
        System.out.println("执行结束");
    }
}
