package com.sptg.gateway.controller.vcdevice;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.PageBean;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.video.cloud.api.dto.VCDeviceDto;
import com.sptg.video.cloud.api.entity.VCDevice;
import com.sptg.video.cloud.api.feigns.VCDeviceFeign;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/grid/videoCloud/device")
public class VideoDeviceController {

    private final VCDeviceFeign vcDeviceFeign;

    /**
     * 功能描述:视频云设备列表查询所有

     * @return ResultBean<Page<VCDevice>>
     *
     *
     */
    @GetMapping(value = "/list")
    public ResultBean<Page<VCDevice>> showIotDeviceList() {
        // 暂时拿全部的数据
//        iotDeviceDto.setOrgPosition("0/1/");
        PageBean<VCDevice,VCDeviceDto> pageBean = new PageBean<>();
        pageBean.setCurrent(1);
        pageBean.setSize(900000000);

        return this.vcDeviceFeign.pagingQuery(pageBean);
    }
}
