jinpengyong
2020-07-24 da68adc69a8a925bc9eae153af0e9797b14ba409
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.moral.task;
 
import java.text.ParseException;
 
import javax.annotation.Resource;
 
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
 
import com.moral.service.RealTimeWeatherService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
 
@Component
public class RealTimeWeatherInsertTask {
    private static transient Logger logger = LoggerFactory.getLogger(RealTimeWeatherInsertTask.class);
 
    @Resource
    private RealTimeWeatherService realTimeWeatherService;
 
    @XxlJob("realtimeWeatherHour")
    public ReturnT insertRealTimeWeather(String param) throws ParseException {
        realTimeWeatherService.insertRealTimeWeather();
        return new ReturnT(200, "插入成功");
    }
}