package com.nantian.cloud.jly.task;

import com.nantian.cloud.jly.service.ConfigureGaugeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author suixin
 * @date 2022/11/9
 */
@Component
@EnableScheduling
public class Task {

    @Autowired
    private ConfigureGaugeService configureGaugeService;

    /**
     * @Description: 每天凌晨1点，自动更新计量器具检定状态
     * @Author: suixin
     * @Date: 2022/11/9
     * @Return: void
     * @Param: []
     */
//    @Scheduled(cron = "0 0 1 * * ?")
    public void updateConfigureGaugeState(){
        configureGaugeService.updateConfigureGaugeState();
    }
}
