package com.njcn.manufactinflux.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.njcn.manufactinflux.param.JobQueryParam;
import com.njcn.manufactinflux.response.HttpResult;
import com.njcn.manufactinflux.service.IInfluxManufactService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/manInflux")
@Api(tags = "制造influx数据")
@AllArgsConstructor
public class ManufactInfluxController {

    private final IInfluxManufactService influxManufactService;

    @PostMapping("/jobQuery")
    @ApiOperation("任务查询")
    @ApiImplicitParam(name = "jobQueryParam", value = "按需求制造influx假数据", required = true)
    public HttpResult<Object> jobQuery(@RequestBody JobQueryParam jobQueryParam){
        IPage<Object> jobDetails = influxManufactService.manufactInfluxData(jobQueryParam);
        return new HttpResult<>();
    }
}
