jinpengyong
2021-07-06 709914b92b814f9f93ec38ed78054a8c831cc0fd
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.moral.api.task;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.moral.api.entity.HistoryHourly;
import com.moral.api.mapper.HistoryHourlyMapper;
import com.moral.api.service.DeviceService;
import com.moral.api.service.HistoryAqiService;
import com.moral.api.service.HistoryDailyService;
import com.moral.api.service.HistoryFiveMinutelyService;
import com.moral.api.service.HistoryHourlyService;
import com.moral.api.service.HistoryMonthlyService;
 
 
@Slf4j
@Api(tags = {"定时任务"})
@RestController
@RequestMapping("/job")
public class TestController {
 
    @Autowired
    private HistoryHourlyService historyHourlyService;
 
    @Autowired
    private HistoryFiveMinutelyService historyFiveMinutelyService;
 
    @Autowired
    private HistoryHourlyMapper historyHourlyMapper;
 
    @Autowired
    private HistoryDailyService historyDailyService;
 
    @Autowired
    private HistoryMonthlyService historyMonthlyService;
 
    @Autowired
    private DeviceService deviceService;
 
    @Autowired
    private HistoryAqiService historyAqiService;
 
    @ApiOperation(value = "job测试", notes = "job测试")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "data", value = "data", required = true, paramType = "query", dataType = "String")
    })
    @RequestMapping(value = "jobTest", method = RequestMethod.GET)
    public void jobTest() {
        historyAqiService.insertHistoryAqi();
    }
 
 
}