package com.rehome.mqttclienttemperature.service;



import com.google.gson.Gson;
import com.rehome.mqttclienttemperature.controller.JdbcDemoController;
import com.rehome.mqttclienttemperature.dto.ResponseDto;
import jakarta.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;



/**
 * @author huangwenfei
 * @version v1.0.0.0
 * Created DateTime 2021-04-26 14:35
 * @description: 定时任务服务
 */
@Component
public class ScheduledService {

    @Resource
    private JdbcDemoController jdbcDemoController;

    /**
     * @date 2022-03-16 09:41
     *
     * @description: 从中央气象台获取省份列表
     * @Param: null
     */
//    @Scheduled(cron = "30 31 0 18 12 *")
    public void getNmcWeatherProvince() {
        ResponseDto responseDto = jdbcDemoController.queryList();
        //System.out.println(new Gson().toJson(responseDto));
    }

}