package com.gyee.frame.common.quartz.task;

import com.gyee.frame.mapper.auto.TsysUserMapper;
import com.gyee.frame.model.auto.Weatherfd;
import com.gyee.frame.service.WeatherfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

/**
 *测试类
 * @CLASSNAME   WeatherfdPushTask
 * @Description 向页面预测今天气象推送数据
 * @Auther Wang Jiawen
 * @DATE 2020/1/2 15:33
 */
@Component("weatherDataPushByDay_1")
public class WeatherfdPushTask_1 {
	@Autowired
	private TsysUserMapper tsysUserMapper;
	@Autowired
    private WeatherfdService weatherfdService;
    /**
     * 无参的任务
     */
    public void runTaskProphet_1() throws ParseException {
        weatherfdService.listProphet1();//调用list方法完成对 key ："weatherProphet_1" ，路径"weather/weatherProphet_1"的推送     
        //System.out.println("我已执行");
    }   
       

    /**
     * 有参任务
     * 目前仅执行常见的数据类型  Integer Long  带L  string  带 ''  bool Double 带 d
     * @param a
     * @param b
     * 
     */
    public void runTask2(Integer a,Long b,String c,Boolean d,Double e)
    {
    	//List<TsysUser> list=  tsysUserMapper.selectByExample(new TsysUserExample());
    	//System.err.println("用户查询num："+list.size());
        System.out.println("正在执行定时任务，带多个参数的方法"+a+"   "+b+" "+c+"  "+d+" "+e+"执行时间:"+new Date().toLocaleString());
    }

}
