|
|
@@ -24,19 +24,20 @@ import java.util.List;
|
|
|
@Slf4j
|
|
|
@RequestMapping("${url.manage.prefix}${url.manage.version}/upstream")
|
|
|
public class UpstreamController {
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private IDeviceService deviceService;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private IManageDeviceLivestreamUrlService livestreamUrlService;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private IFileService fileService;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 上游系统获取设备列表信息
|
|
|
+ *
|
|
|
* @param searchInfo
|
|
|
* @param status
|
|
|
* @param workspaceId
|
|
|
@@ -51,9 +52,10 @@ public class UpstreamController {
|
|
|
log.info("===========================>Fetched Return devices: {} ", devices);
|
|
|
return HttpResultResponse.success(devices);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 上游系统获取图片文件信息
|
|
|
+ *
|
|
|
* @param startTime
|
|
|
* @param endTime
|
|
|
* @param workspaceId
|
|
|
@@ -63,19 +65,21 @@ public class UpstreamController {
|
|
|
*/
|
|
|
@GetMapping("/files")
|
|
|
public HttpResultResponse<PaginationData<UpstreamMediaFileDTO>> getFilesList(@RequestParam(defaultValue = "1") Long page,
|
|
|
- @RequestParam(name = "page_size", defaultValue = "10") Long pageSize,
|
|
|
- Long startTime,
|
|
|
- Long endTime,
|
|
|
- String workspaceId,
|
|
|
+ @RequestParam(name = "page_size", defaultValue = "10") Long pageSize,
|
|
|
+ String workspaceName,
|
|
|
+ Long startTime,
|
|
|
+ Long endTime,
|
|
|
+ String workspaceId,
|
|
|
String deviceSn,
|
|
|
String pictureType) {
|
|
|
log.info("============================>Fetching files list with parameters - page: {}, pageSize: {}, startTime: {}, endTime: {}, workspaceId: {}, deviceSn: {}, pictureType: {}",
|
|
|
- page, pageSize, startTime, endTime, workspaceId, deviceSn, pictureType);
|
|
|
+ page, pageSize, startTime, endTime, workspaceId, deviceSn, pictureType);
|
|
|
PaginationData<UpstreamMediaFileDTO> filesList = fileService.getMediaFilesPagination(
|
|
|
- page,
|
|
|
- pageSize,
|
|
|
+ workspaceName,
|
|
|
startTime,
|
|
|
endTime,
|
|
|
+ page,
|
|
|
+ pageSize,
|
|
|
workspaceId,
|
|
|
deviceSn,
|
|
|
pictureType
|
|
|
@@ -83,35 +87,37 @@ public class UpstreamController {
|
|
|
log.info("============================>Fetched Return filesList: {} ", filesList);
|
|
|
return HttpResultResponse.success(filesList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 上游系统获取直播地址
|
|
|
+ *
|
|
|
* @param payload
|
|
|
* @param deviceSn
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/webRtc")
|
|
|
public HttpResultResponse<List<UpstreamLivestreamUrlDTO>> getWebRtc(String payload,
|
|
|
- String deviceSn,
|
|
|
- String workspaceId) {
|
|
|
- List<UpstreamLivestreamUrlDTO> url = livestreamUrlService.selWebRtc(payload, deviceSn,workspaceId);
|
|
|
+ String deviceSn,
|
|
|
+ String workspaceId) {
|
|
|
+ List<UpstreamLivestreamUrlDTO> url = livestreamUrlService.selWebRtc(payload, deviceSn, workspaceId);
|
|
|
return HttpResultResponse.success(url);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 上游系统获取设备列表详情信息
|
|
|
+ *
|
|
|
* @param searchInfo
|
|
|
* @param status
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/devicesDetailList")
|
|
|
public HttpResultResponse<List<UpstreamDeviceDetailDTO>> getDevicesDetailList(String searchInfo,
|
|
|
- Integer status,
|
|
|
+ Integer status,
|
|
|
String workspaceId) {
|
|
|
log.info("===========================>Fetching devices detail list with parameters - searchInfo: {}, status: {}, workspaceId: {}", searchInfo, status, workspaceId);
|
|
|
List<UpstreamDeviceDetailDTO> devices = deviceService.selUpstreamDeviceDetailList(searchInfo, status, workspaceId);
|
|
|
log.info("===========================>Fetched Return devices details: {} ", devices);
|
|
|
return HttpResultResponse.success(devices);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|