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.TVentilationOperation;
import com.unis.reserveLayout.modular.keepWork.param.TVentilationOperationPageParam;
import com.unis.reserveLayout.modular.keepWork.service.TVentilationOperationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 通风作业管理 前端控制器
 * </p>
 *
 * @author root
 * @since 2024-05-10
 */
@RestController
@RequestMapping("/t-ventilation-operation")
@ApiSupport(author = "UNIS_TEAM", order = 1)
@Api(tags = "通风作业管理")
public class TVentilationOperationController {
    @Resource
    private TVentilationOperationService tVentilationOperationService;

    @GetMapping("/getList")
    @ApiOperation(value = "查询 通风作业管理 信息列表", notes = "查询 通风作业管理 信息列表")
    public CommonResult<Page<TVentilationOperation>> getList(TVentilationOperationPageParam pageParam) {
        return CommonResult.data(tVentilationOperationService.getList(pageParam));
    }

    @GetMapping("/getById/{id}")
    @ApiOperation(value = "通风作业管理详情", notes = "id获取详情")
    public CommonResult<TVentilationOperation> getById(@PathVariable("id") String id) {
        return CommonResult.data(tVentilationOperationService.getJoinById(id));
    }
}
