package org.jeecg.modules.dynamicStaticAnalysis.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 动静态分析-分析批次-单元设备 前端控制器
 * </p>
 *
 * @author hkl
 * @since 2023-08-03
 */
@RestController
@RequestMapping("/dynamicStaticAnalysis/analysisBatchUnitDevice")
@Api(tags = "动静态分析-分析批次-单元设备")
public class AnalysisBatchUnitDeviceController extends JeecgController<AnalysisBatchUnitDevice, IAnalysisBatchUnitDeviceService> {


    @AutoLog(value = "动静态分析-分析批次-单元设备-获取列表数据")
    @ApiOperation(value = "动静态分析-分析批次-单元设备-获取列表数据", notes = "动静态分析-分析批次-单元设备-获取列表数据")
    @GetMapping(value = "/listRecord")
    public Result<IPage<AnalysisBatchUnitDeviceVO>> listRecord(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                               AnalysisBatchUnitDeviceDTO dto) {
        Page<AnalysisBatchUnitDeviceVO> pageData = new Page<>(pageNo, pageSize);
        pageData = this.service.listRecord(pageData, dto);
        return Result.OK(pageData);
    }
}
