package com.yuchen.saas.park.service.controller.elevator;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yuchen.saas.park.api.request.ElevatorRelativePersonElevatorRequest;
import com.yuchen.saas.park.api.vo.elevator.ElevatorRelativePersonElevatorVO;
import com.yuchen.saas.park.service.service.elevator.ISaasParkElevatorRelativePersonElevatorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nest.springwrap.core.mp.support.NestPage;
import org.nest.springwrap.core.mp.support.Query;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 梯控人员关联电梯表 前端控制器
 * </p>
 *
 * @author baichaojie
 * @since 2024-07-08
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@Api(value = "梯控人员关联电梯表控制器接口(综合权限查询)", tags = "梯控人员关联电梯表控制器接口(综合权限查询)")
@RequestMapping("/saasParkElevatorRelativePersonElevator")
public class SaasParkElevatorRelativePersonElevatorController {

    private final ISaasParkElevatorRelativePersonElevatorService baseService;


    /**
     * 分页 综合权限查询
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "分页 综合权限查询", notes = "分页 综合权限查询")
    public R<IPage<ElevatorRelativePersonElevatorVO>> page(@Valid ElevatorRelativePersonElevatorRequest req, Query query) {
        R<IPage<ElevatorRelativePersonElevatorVO>> pages = baseService.pageByParam(req, query);
        return pages;
    }

}
