|
@@ -1,18 +1,14 @@
|
|
|
package com.middle.platform.stream.biz.controller;
|
|
package com.middle.platform.stream.biz.controller;
|
|
|
|
|
|
|
|
-import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import com.middle.platform.common.core.utils.Result;
|
|
import com.middle.platform.common.core.utils.Result;
|
|
|
-import com.middle.platform.manage.api.pojo.DevicesVo;
|
|
|
|
|
import com.middle.platform.stream.biz.domain.req.StreamAddRes;
|
|
import com.middle.platform.stream.biz.domain.req.StreamAddRes;
|
|
|
import com.middle.platform.stream.biz.domain.req.StreamUpdateRes;
|
|
import com.middle.platform.stream.biz.domain.req.StreamUpdateRes;
|
|
|
import com.middle.platform.stream.biz.domain.req.StreamUpdateStatusRes;
|
|
import com.middle.platform.stream.biz.domain.req.StreamUpdateStatusRes;
|
|
|
-import com.middle.platform.stream.biz.domain.res.DevicesPathVo;
|
|
|
|
|
|
|
+import com.middle.platform.stream.biz.pojo.VideoPage;
|
|
|
import com.middle.platform.stream.biz.service.SDeviceService;
|
|
import com.middle.platform.stream.biz.service.SDeviceService;
|
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 视频列表
|
|
* 视频列表
|
|
|
*
|
|
*
|
|
@@ -26,26 +22,27 @@ public class VideoController {
|
|
|
private SDeviceService sDeviceService;
|
|
private SDeviceService sDeviceService;
|
|
|
|
|
|
|
|
|
|
|
|
|
- @GetMapping(value = "/getDeviceList", name = "获取设备信息")
|
|
|
|
|
- public Result<Object> getDeviceList(@RequestParam("keywords") String keywords) {
|
|
|
|
|
- List<DevicesVo> deviceList = sDeviceService.getDeviceList(keywords);
|
|
|
|
|
- if (!BeanUtil.isEmpty(deviceList)) {
|
|
|
|
|
- return Result.ok(deviceList, "获取成功");
|
|
|
|
|
- } else {
|
|
|
|
|
- return Result.failed("获取失败");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// @GetMapping(value = "/getDeviceList", name = "获取设备信息")
|
|
|
|
|
+// public Result<Object> getDeviceList(@RequestParam("keywords") String keywords) {
|
|
|
|
|
+// List<DevicesVo> deviceList = sDeviceService.getDeviceList(keywords);
|
|
|
|
|
+// if (!BeanUtil.isEmpty(deviceList)) {
|
|
|
|
|
+// return Result.ok(deviceList, "获取成功");
|
|
|
|
|
+// } else {
|
|
|
|
|
+// return Result.failed("获取失败");
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
- @GetMapping(value = "/getDevicePathList", name = "获取设备流标签信息")
|
|
|
|
|
- public Result<Object> getDevicePathList(@RequestParam("keywords") String keywords) {
|
|
|
|
|
- List<DevicesPathVo> deviceList = sDeviceService.getDevicePathList(keywords);
|
|
|
|
|
- if (!BeanUtil.isEmpty(deviceList)) {
|
|
|
|
|
- return Result.ok(deviceList, "获取成功");
|
|
|
|
|
- } else {
|
|
|
|
|
- return Result.failed("获取失败");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 分页查询
|
|
|
|
|
+ * @param videoPage
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/page")
|
|
|
|
|
+ public Result<Object> page(@RequestBody VideoPage videoPage) {
|
|
|
|
|
+ return Result.ok(sDeviceService.pageQuery(videoPage));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@PostMapping(value = "/add", name = "新增拉流信息")
|
|
@PostMapping(value = "/add", name = "新增拉流信息")
|
|
|
public Result<Object> add(@RequestBody StreamAddRes streamAddRes) {
|
|
public Result<Object> add(@RequestBody StreamAddRes streamAddRes) {
|
|
|
return Result.ok(sDeviceService.add(streamAddRes) != 0 ? "新增成功" : "新增失败");
|
|
return Result.ok(sDeviceService.add(streamAddRes) != 0 ? "新增成功" : "新增失败");
|