648540858
2023-06-27 c7d15150237c946fbb4f5547dab0018a5f573d88
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
@@ -24,6 +24,7 @@
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.compress.utils.IOUtils;
import org.apache.ibatis.annotations.Options;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -46,7 +47,7 @@
@Tag(name  = "国标设备查询", description = "国标设备查询")
@SuppressWarnings("rawtypes")
@CrossOrigin
@RestController
@RequestMapping("/api/device/query")
public class DeviceQuery {
@@ -97,8 +98,10 @@
   @Parameter(name = "page", description = "当前页", required = true)
   @Parameter(name = "count", description = "每页查询数量", required = true)
   @GetMapping("/devices")
   @Options()
   public PageInfo<Device> devices(int page, int count){
//      if (page == null) page = 0;
//      if (count == null) count = 20;
      return storager.queryVideoDeviceList(page, count,null);
   }
@@ -123,7 +126,7 @@
   @Parameter(name = "online", description = "是否在线")
   @Parameter(name = "channelType", description = "设备/子目录-> false/true")
   @Parameter(name = "catalogUnderDevice", description = "是否直属与设备的目录")
   public PageInfo channels(@PathVariable String deviceId,
   public PageInfo<DeviceChannel> channels(@PathVariable String deviceId,
                                    int page, int count,
                                    @RequestParam(required = false) String query,
                                    @RequestParam(required = false) Boolean online,
@@ -223,7 +226,7 @@
   @Parameter(name = "online", description = "是否在线")
   @Parameter(name = "channelType", description = "设备/子目录-> false/true")
   @GetMapping("/sub_channels/{deviceId}/{channelId}/channels")
   public PageInfo subChannels(@PathVariable String deviceId,
   public PageInfo<DeviceChannel> subChannels(@PathVariable String deviceId,
                                      @PathVariable String channelId,
                                      int page,
                                      int count,
@@ -237,8 +240,7 @@
         return deviceChannelPageResult;
      }
      PageInfo pageResult = storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count);
      return pageResult;
      return storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count);
   }
   /**