| | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.context.request.async.DeferredResult; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="count", value = "每页查询数量", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="query", value = "查询内容", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name="pushing", value = "是否正在推流", dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name="mediaServerId", value = "流媒体ID", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping(value = "/list") |
| | | @ResponseBody |
| | | public PageInfo<StreamPushItem> list(@RequestParam(required = false)Integer page, |
| | | @RequestParam(required = false)Integer count, |
| | | @RequestParam(required = false)String query, |
| | | @RequestParam(required = false)Boolean online ){ |
| | | @RequestParam(required = false)Boolean pushing, |
| | | @RequestParam(required = false)String mediaServerId ){ |
| | | |
| | | PageInfo<StreamPushItem> pushList = streamPushService.getPushList(page, count); |
| | | if (StringUtils.isEmpty(query)) { |
| | | query = null; |
| | | } |
| | | if (StringUtils.isEmpty(mediaServerId)) { |
| | | mediaServerId = null; |
| | | } |
| | | PageInfo<StreamPushItem> pushList = streamPushService.getPushList(page, count, query, pushing, mediaServerId); |
| | | return pushList; |
| | | } |
| | | |
| | |
| | | // 录像查询以channelId作为deviceId查询 |
| | | String key = DeferredResultHolder.UPLOAD_FILE_CHANNEL; |
| | | String uuid = UUID.randomUUID().toString(); |
| | | logger.warn("通道导入文件类型: {}",file.getContentType() ); |
| | | logger.info("通道导入文件类型: {}",file.getContentType() ); |
| | | if (file.isEmpty()) { |
| | | logger.warn("通道导入文件为空"); |
| | | WVPResult<Object> wvpResult = new WVPResult<>(); |