package com.unis.reserveLayout.modular.keepWork.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.unis.common.pojo.CommonResult;
import com.unis.reserveLayout.modular.keepWork.entity.TFumigationTask;
import com.unis.reserveLayout.modular.keepWork.param.TFumigationTaskPageParam;
import com.unis.reserveLayout.modular.keepWork.service.TFumigationTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 熏蒸作业 前端控制器
 * </p>
 *
 * @author root
 * @since 2024-05-10
 */
@RestController
@RequestMapping("/t-fumigation-task")
@ApiSupport(author = "UNIS_TEAM", order = 2)
@Api(tags = "熏蒸作业管理")
public class TFumigationTaskController {
    @Resource
    private TFumigationTaskService tFumigationTaskService;

    @GetMapping("/getList")
    @ApiOperation(value = "查询 熏蒸作业 信息列表", notes = "查询 熏蒸作业 信息列表")
    public CommonResult<Page<TFumigationTask>> getList(TFumigationTaskPageParam pageParam) {
        return CommonResult.data(tFumigationTaskService.getList(pageParam));
    }

    @GetMapping("/getById/{id}")
    @ApiOperation(value = "熏蒸作业详情", notes = "id获取详情")
    public CommonResult<TFumigationTask> getById(@PathVariable("id") String id) {
        return CommonResult.data(tFumigationTaskService.getById(id));
    }
}
