|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Tag(name  = "国标设备查询", description = "国标设备查询") | 
|---|
|  |  |  | @SuppressWarnings("rawtypes") | 
|---|
|  |  |  | @CrossOrigin | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/api/device/query") | 
|---|
|  |  |  | public class DeviceQuery { | 
|---|
|  |  |  | 
|---|
|  |  |  | @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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @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, | 
|---|
|  |  |  | 
|---|
|  |  |  | @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, | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|