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(); } }