package com.sptg.iot.biz.quartz;

import com.sptg.third.api.feigns.grid.GridIotFeign;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;



/**
 * @author zwx
 * @create 2020/12/7 18:28
 */
@Slf4j
@Component
@AllArgsConstructor
@Profile({"prod"})
public class IotDevicePushQuartzTask {

    private final GridIotFeign gridIotFeign;

    //每天凌晨1点执行一次，推送到网格
    @Scheduled(cron = "0 0 1 * * *")
    public void run(){
        this.gridIotFeign.gridIotDeviceIncrementPush();
    }
}
