package com.huimv.modular.timer.tasks;


import com.huimv.modular.eartagdata.entity.EartagData;
import com.huimv.modular.eartagregister.entity.EartagRegister;
import com.huimv.modular.eartagregister.mapper.EartagRegisterMapper;
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 CountEartagSendMassageTimes {



      @Autowired
      private EartagRegisterMapper  eartagRegisterMapper;
      
    //更新耳标上传次数
    //更新温度
    //更新温度状态
    @Scheduled(cron = "0/59 * * * * ?")
    public void CountAndUpdateEartagSendMassageTimes() {
        
        //更新统计次数
        eartagRegisterMapper.updateCount();
        //更新最新温度
        eartagRegisterMapper.updateEartagTemp();
        //判断是否有问题
       // eartagRegisterMapper.CheckEartagTempAndSetStatus();
        
        System.out.println("更新耳标上传次数成功");

    }
}
