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.DemoFumigation;
import com.unis.reserveLayout.modular.keepWork.param.DemoFumigationPageParam;
import com.unis.reserveLayout.modular.keepWork.service.DemoFumigationService;
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-11
 */
@RestController
@RequestMapping("/demo-fumigation")
@ApiSupport(author = "UNIS_TEAM", order = 3)
@Api(tags = "内环流作业管理")
public class DemoFumigationController {
    @Resource
    private DemoFumigationService demoFumigationService;

    @GetMapping("/getPageList")
    @ApiOperation(value = "分页列表", notes = "支持分页")
    public CommonResult<Page<DemoFumigation>> getPageList(@Validated DemoFumigationPageParam param) {
        return CommonResult.data(demoFumigationService.selectPageList(param));
    }

    @GetMapping("/getById/{id}")
    @ApiOperation(value = "详情", notes = "id获取详情")
    public CommonResult<DemoFumigation> getById(@PathVariable("id") String id) {
        return CommonResult.data(demoFumigationService.getById(id));
    }

}
