jinpengyong
2021-06-30 41b04081ef9b73fde09f46ea9521831572008cf1
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
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.HistoryDailyService;
import com.moral.api.service.HistoryHourlyService;
 
 
@Slf4j
@Api(tags = {"定时任务"})
@RestController
@RequestMapping("/job")
public class TestController {
 
    @Autowired
    private HistoryHourlyService historyHourlyService;
 
    @Autowired
    private HistoryHourlyMapper historyHourlyMapper;
 
    @Autowired
    private HistoryDailyService historyDailyService;
 
    @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() {
        historyDailyService.insertHistoryDaily();
    }
 
 
}