xucaiqin пре 1 година
родитељ
комит
b8870441e5

+ 3 - 57
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/controller/IndexController.java

@@ -1,19 +1,11 @@
 package com.middle.platform.stream.biz.controller;
 
-import cn.hutool.core.bean.BeanUtil;
 import com.middle.platform.common.core.utils.DateTimeUtil;
 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.StreamUpdateRes;
-import com.middle.platform.stream.biz.domain.req.StreamUpdateStatusRes;
-import com.middle.platform.stream.biz.domain.res.DevicesPathVo;
-import com.middle.platform.stream.biz.service.StreamMediaService;
-import jakarta.annotation.Resource;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * @author xucaiqin
@@ -24,55 +16,9 @@ import java.util.List;
 public class IndexController {
     @Value("${spring.application.name}")
     private String name;
-    @Resource
-    private StreamMediaService streamMediaService;
 
     @GetMapping("")
     public Result<Object> server() {
         return Result.ok(name + ":" + DateTimeUtil.nowStr());
     }
-
-    @GetMapping(value = "/getDeviceList", path = "获取设备信息")
-    public Result<Object> getDeviceList(@RequestParam("keywords") String keywords) {
-        List<DevicesVo> deviceList = streamMediaService.getDeviceList(keywords);
-        if (!BeanUtil.isEmpty(deviceList)) {
-            return Result.ok(deviceList, "获取成功");
-        } else {
-            return Result.failed("获取失败");
-        }
-    }
-
-    @GetMapping(value = "/getDevicePathList", path = "获取设备流标签信息")
-    public Result<Object> getDevicePathList(@RequestParam("keywords") String keywords) {
-        List<DevicesPathVo> deviceList = streamMediaService.getDevicePathList(keywords);
-        if (!BeanUtil.isEmpty(deviceList)) {
-            return Result.ok(deviceList, "获取成功");
-        } else {
-            return Result.failed("获取失败");
-        }
-    }
-
-    @PostMapping(value = "/add", path = "新增拉流信息")
-    public Result<Object> add(@RequestBody StreamAddRes streamAddRes) {
-        return Result.ok(streamMediaService.add(streamAddRes) != 0 ? "新增成功" : "新增失败");
-    }
-
-    @PostMapping(value = "/update", path = "更新拉流信息")
-    public Result<Object> update(@RequestBody StreamUpdateRes streamUpdateRes) {
-        return Result.ok(streamMediaService.update(streamUpdateRes) != 0 ? "更新成功" : "更新失败");
-    }
-
-    @PostMapping(value = "/updateStatus", path = "更新拉流信息状态")
-    public Result<Object> updateStatus(@RequestBody StreamUpdateStatusRes streamUpdateStatusRes) {
-        return Result.ok(streamMediaService.updateStatus(streamUpdateStatusRes) != 0 ? "更新状态成功" : "更新状态失败");
-    }
-
-    @GetMapping(value = "/getVideoUrl", path = "获取播放信息")
-    public Result<Object> getVideoUrl(@RequestParam("id") Long id) {
-        return Result.ok(streamMediaService.getVideoUrl(id));
-    }
-
-
-
-
 }

+ 11 - 1
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/controller/RecordController.java

@@ -1,7 +1,6 @@
 package com.middle.platform.stream.biz.controller;
 
 import com.middle.platform.common.core.utils.Result;
-import com.middle.platform.stream.biz.pojo.StreamPage;
 import com.middle.platform.stream.biz.pojo.StreamRecordPage;
 import com.middle.platform.stream.biz.service.StreamMediaService;
 import jakarta.annotation.Resource;
@@ -11,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
+ * 录像回放
+ *
  * @author xucaiqin
  * @date 2023-12-15 08:46:49
  */
@@ -24,4 +25,13 @@ public class RecordController {
     public Result<Object> page(@RequestBody StreamRecordPage streamRecordPage) {
         return Result.ok(streamMediaService.recordPage(streamRecordPage));
     }
+    /**
+     * 视频播放
+     */
+    /**
+     * 视频下载
+     */
+    /**
+     * 视频删除
+     */
 }

+ 0 - 36
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/controller/RtmpController.java

@@ -1,36 +0,0 @@
-package com.middle.platform.stream.biz.controller;
-
-import com.middle.platform.common.core.utils.Result;
-import com.middle.platform.stream.biz.pojo.PullPara;
-import com.middle.platform.stream.biz.pojo.PushPara;
-import com.middle.platform.stream.biz.pojo.StreamPage;
-import com.middle.platform.stream.biz.service.StreamMediaService;
-import jakarta.annotation.Resource;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @author xucaiqin
- * @date 2023-12-15 08:46:49
- */
-@RestController
-@RequestMapping("/rtmp")
-public class RtmpController {
-    @Resource
-    private StreamMediaService streamMediaService;
-
-    @PostMapping("/page")
-    public Result<Object> page(@RequestBody StreamPage streamPage) {
-        return Result.ok(streamMediaService.rtmpPage(streamPage));
-    }
-
-    @GetMapping("/pull")
-    public Result<Object> pull(PullPara pullPara) {
-        return Result.ok(streamMediaService.rtspPull(pullPara));
-    }
-
-    @GetMapping("/push")
-    public Result<Object> push(PushPara pushPara) {
-        return Result.ok(streamMediaService.rtspPush(pushPara));
-    }
-}
-

+ 0 - 35
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/controller/RtspController.java

@@ -1,35 +0,0 @@
-package com.middle.platform.stream.biz.controller;
-
-import com.middle.platform.common.core.utils.Result;
-import com.middle.platform.stream.biz.pojo.PullPara;
-import com.middle.platform.stream.biz.pojo.PushPara;
-import com.middle.platform.stream.biz.pojo.StreamPage;
-import com.middle.platform.stream.biz.service.StreamMediaService;
-import jakarta.annotation.Resource;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @author xucaiqin
- * @date 2023-12-15 08:46:49
- */
-@RestController
-@RequestMapping("/rtsp")
-public class RtspController {
-    @Resource
-    private StreamMediaService streamMediaService;
-
-    @PostMapping("/page")
-    public Result<Object> page(@RequestBody StreamPage streamPage) {
-        return Result.ok(streamMediaService.rtspPage(streamPage));
-    }
-
-    @GetMapping("/pull")
-    public Result<Object> pull(PullPara pullPara) {
-        return Result.ok(streamMediaService.rtspPull(pullPara));
-    }
-
-    @GetMapping("/push")
-    public Result<Object> push(PushPara pushPara) {
-        return Result.ok(streamMediaService.rtspPush(pushPara));
-    }
-}

+ 76 - 0
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/controller/VideoController.java

@@ -0,0 +1,76 @@
+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.manage.api.pojo.DevicesVo;
+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.StreamUpdateStatusRes;
+import com.middle.platform.stream.biz.domain.res.DevicesPathVo;
+import com.middle.platform.stream.biz.service.SDeviceService;
+import jakarta.annotation.Resource;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 视频列表
+ *
+ * @author xucaiqin
+ * @date 2024-05-08 16:42:32
+ */
+@RestController
+@RequestMapping("/video")
+public class VideoController {
+    @Resource
+    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 = "/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("获取失败");
+        }
+    }
+
+    @PostMapping(value = "/add", name = "新增拉流信息")
+    public Result<Object> add(@RequestBody StreamAddRes streamAddRes) {
+        return Result.ok(sDeviceService.add(streamAddRes) != 0 ? "新增成功" : "新增失败");
+    }
+
+    @PostMapping(value = "/update", name = "更新拉流信息")
+    public Result<Object> update(@RequestBody StreamUpdateRes streamUpdateRes) {
+        return Result.ok(sDeviceService.update(streamUpdateRes) != 0 ? "更新成功" : "更新失败");
+    }
+
+    @PostMapping(value = "/updateStatus", name = "更新拉流信息状态")
+    public Result<Object> updateStatus(@RequestBody StreamUpdateStatusRes streamUpdateStatusRes) {
+        return Result.ok(sDeviceService.updateStatus(streamUpdateStatusRes) != 0 ? "更新状态成功" : "更新状态失败");
+    }
+
+    /**
+     * 获取播放信息
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/getVideoUrl", name = "获取播放信息")
+    public Result<Object> getVideoUrl(@RequestParam("id") Long id) {
+        return Result.ok(sDeviceService.getVideoUrl(id));
+    }
+
+    //rtsp列表查询
+    //rtmp列表查询
+}

+ 141 - 3
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/service/SDeviceService.java

@@ -1,14 +1,152 @@
 package com.middle.platform.stream.biz.service;
 
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.middle.platform.common.core.exception.BusinessException;
+import com.middle.platform.manage.api.feign.DeviceApi;
+import com.middle.platform.manage.api.pojo.DevicesNameVo;
+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.StreamUpdateRes;
+import com.middle.platform.stream.biz.domain.req.StreamUpdateStatusRes;
+import com.middle.platform.stream.biz.domain.res.DevicesPathVo;
+import com.middle.platform.stream.biz.domain.res.StreamPageRes;
 import com.middle.platform.stream.biz.entity.SDevice;
 import com.middle.platform.stream.biz.mapper.SDeviceMapper;
+import com.middle.platform.stream.biz.pojo.StreamPage;
+import com.middle.platform.stream.biz.properties.StreamMediaProperties;
+import jakarta.annotation.Resource;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
 /**
-* @date 2024-05-06 09:54:48
-* @author xucaiqin
-*/
+ * @author xucaiqin
+ * @date 2024-05-06 09:54:48
+ */
+@Slf4j
 @Service
+@AllArgsConstructor
 public class SDeviceService extends ServiceImpl<SDeviceMapper, SDevice> {
+    private final SDeviceMapper sDeviceMapper;
+    private final StreamMediaProperties streamMediaProperties;
+    private final ApiProxy apiProxy;
+
+    @Resource
+    private DeviceApi deviceApi;
+
+    public List<DevicesVo> getDeviceList(String keywords) {
+        DevicesNameVo devicesNameVo = new DevicesNameVo();
+        devicesNameVo.setKeywords(keywords);
+        return deviceApi.devicesQuery(devicesNameVo);
+    }
+
+    public List<DevicesPathVo> getDevicePathList(String keywords) {
+        //查询出所有已新增在流表里的设备id
+        SDevice sDevice = new SDevice();
+        sDevice.setDelFlag(0);
+        sDevice.setUseFlag(1);
+        List<SDevice> sDevices = sDeviceMapper.selectList(new QueryWrapper<>(sDevice));
+        //获取到所有sDevices中的设备id,再去查设备表,获取到设备id和设备name
+        List<DevicesPathVo> devicesPathVos = new ArrayList<>();
+        List<Long> ids = new ArrayList<>();
+        for (SDevice sDevice1 : sDevices) {
+            ids.add(sDevice1.getDeviceId());
+        }
+        //根据设备id查询设备表,获取到设备id和设备name
+        DevicesNameVo devicesNameVo = new DevicesNameVo();
+        devicesNameVo.setIds(ids);
+        List<DevicesVo> devicesVos = deviceApi.devicesQuery(devicesNameVo);
+        //获取到设备id和设备name,再去查设备表,获取到设备id和设备path
+        DevicesPathVo devicesPathVo = new DevicesPathVo();
+        for (DevicesVo devicesVo : devicesVos) {
+            devicesPathVo.setId(devicesVo.getId());
+            devicesPathVo.setName(devicesVo.getName());
+            for (SDevice sDevice2 : sDevices) {
+                if (Objects.equals(sDevice2.getDeviceId(), devicesVo.getId())) {
+                    devicesPathVo.setPath(sDevice2.getPath());
+                    devicesPathVos.add(devicesPathVo);
+                    break;
+                }
+            }
+        }
+        return devicesPathVos;
+    }
+
+    public int add(StreamAddRes streamAddRes) {
+        SDevice sDevice = new SDevice();
+        BeanUtil.copyProperties(streamAddRes, sDevice);
+        return sDeviceMapper.insert(sDevice);
+    }
+
+    public int update(StreamUpdateRes streamUpdateRes) {
+        SDevice sDevice = sDeviceMapper.selectById(streamUpdateRes.getId());
+        if (Objects.isNull(sDevice)) {
+            throw new BusinessException("视频流不存在");
+        }
+        BeanUtil.copyProperties(streamUpdateRes, sDevice);
+        return sDeviceMapper.updateById(sDevice);
+    }
+
+    public int updateStatus(StreamUpdateStatusRes streamUpdateStatusRes) {
+        SDevice sDevice = sDeviceMapper.selectById(streamUpdateStatusRes.getId());
+        if (Objects.isNull(sDevice)) {
+            throw new BusinessException("视频流不存在");
+        }
+        BeanUtil.copyProperties(streamUpdateStatusRes, sDevice);
+        return sDeviceMapper.updateById(sDevice);
+    }
+
+    public String getVideoUrl(Long id) {
+        SDevice sDevice = sDeviceMapper.selectById(id);
+        if (Objects.isNull(sDevice)) {
+            throw new BusinessException("视频流不存在");
+        }
+        return streamMediaProperties.getUrl() + sDevice.getPath();
+    }
+
+    /**
+     * rtmp列表查询
+     *
+     * @param streamPage
+     * @return
+     */
+    public List<Object> rtmpPage(StreamPage streamPage) {
+        log.info("rtmpPage in...");
+        //根据设备名称模糊筛选设备,获得设备id列表
+        String keywords = streamPage.getKeywords();
+        List<Long> ids = new ArrayList<>();
+        if (keywords != null && !keywords.isEmpty()) {
+            //如果有设备,需要先查出设备id
+            DevicesNameVo devicesNameVo = new DevicesNameVo();
+            devicesNameVo.setKeywords(keywords);
+            List<DevicesVo> devicesVos = deviceApi.devicesQuery(devicesNameVo);
+            if (Objects.isNull(devicesVos)) {
+                throw new BusinessException("查无产品");
+            }
+            for (DevicesVo devicesVo : devicesVos) {
+                ids.add(devicesVo.getId());
+            }
+            streamPage.setDeviceIds(ids);
+        }
+        log.info("rtmpList:{}", ids);
+        //数据库查询
+        StreamPageRes streamPageRes = sDeviceMapper.selectStreamPage(streamPage);
+        if (Objects.isNull(streamPageRes)) {
+            throw new BusinessException("查无产品!");
+        }
+        //API调用
+        ArrayList<Object> objects = new ArrayList<>();
+        Object o = apiProxy.rtmpList();
+        log.info("rtmpList:{}", o);
+        return new ArrayList<>() {{
+            add(o);
+        }};
+    }
 
 }

+ 6 - 34
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/service/StreamMediaService.java

@@ -1,47 +1,19 @@
 package com.middle.platform.stream.biz.service;
 
-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.StreamUpdateRes;
-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.PullPara;
-import com.middle.platform.stream.biz.pojo.PushPara;
-import com.middle.platform.stream.biz.pojo.StreamPage;
 import com.middle.platform.stream.biz.pojo.StreamRecordPage;
 
 import java.util.ArrayList;
-import java.util.List;
 
 /**
  * @author xucaiqin
  * @date 2024-04-26 11:21:39
  */
 public interface StreamMediaService {
-    List<Object> rtspPage(StreamPage streamPage);
-
-    List<Object> rtspPull(PullPara pullPara);
-
-
-    List<Object> rtspPush(PushPara pushPara);
-
-
-
-    List<Object> rtmpPage(StreamPage streamPage);
-
-    List<Object> rtmpPull(PullPara pullPara);
-
-
-    List<DevicesVo> getDeviceList(String keywords);
-    List<DevicesPathVo> getDevicePathList(String keywords);
-
-    int add(StreamAddRes streamAddRes);
-
-    int update(StreamUpdateRes streamUpdateRes);
-
-    int updateStatus(StreamUpdateStatusRes streamUpdateStatusRes);
-
-    String getVideoUrl(Long id);
-
+    /**
+     * 录像回放分页查询
+     *
+     * @param streamRecordPage
+     * @return
+     */
     ArrayList<Object> recordPage(StreamRecordPage streamRecordPage);
 }

+ 0 - 162
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/service/impl/StreamMediaServiceImpl.java

@@ -1,33 +1,13 @@
 package com.middle.platform.stream.biz.service.impl;
 
-import cn.hutool.core.bean.BeanUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.middle.platform.common.core.exception.BusinessException;
-import com.middle.platform.manage.api.feign.DeviceApi;
-import com.middle.platform.manage.api.pojo.DevicesNameVo;
-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.StreamUpdateRes;
-import com.middle.platform.stream.biz.domain.req.StreamUpdateStatusRes;
-import com.middle.platform.stream.biz.domain.res.DevicesPathVo;
-import com.middle.platform.stream.biz.domain.res.StreamPageRes;
-import com.middle.platform.stream.biz.entity.SDevice;
-import com.middle.platform.stream.biz.mapper.SDeviceMapper;
-import com.middle.platform.stream.biz.pojo.PullPara;
-import com.middle.platform.stream.biz.pojo.PushPara;
-import com.middle.platform.stream.biz.pojo.StreamPage;
 import com.middle.platform.stream.biz.pojo.StreamRecordPage;
-import com.middle.platform.stream.biz.properties.StreamMediaProperties;
 import com.middle.platform.stream.biz.service.ApiProxy;
 import com.middle.platform.stream.biz.service.StreamMediaService;
-import jakarta.annotation.Resource;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
 
 /**
  * @author xucaiqin
@@ -38,45 +18,7 @@ import java.util.Objects;
 @RequiredArgsConstructor
 public class StreamMediaServiceImpl implements StreamMediaService {
     private final ApiProxy apiProxy;
-    private final SDeviceMapper sDeviceMapper;
-    private final StreamMediaProperties streamMediaProperties;
 
-    @Resource
-    DeviceApi deviceApi;
-
-    @Override
-    public List<Object> rtmpPage(StreamPage streamPage) {
-        log.info("rtmpPage in...");
-        //根据设备名称模糊筛选设备,获得设备id列表
-        String keywords = streamPage.getKeywords();
-        List<Long> ids = new ArrayList<>();
-        if (keywords != null && !keywords.isEmpty()) {
-            //如果有设备,需要先查出设备id
-            DevicesNameVo devicesNameVo = new DevicesNameVo();
-            devicesNameVo.setKeywords(keywords);
-            List<DevicesVo> devicesVos = deviceApi.devicesQuery(devicesNameVo);
-            if (Objects.isNull(devicesVos)) {
-                throw new BusinessException("查无产品");
-            }
-            for (DevicesVo devicesVo : devicesVos) {
-                ids.add(devicesVo.getId());
-            }
-            streamPage.setDeviceIds(ids);
-        }
-        log.info("rtmpList:{}", ids);
-        //数据库查询
-        StreamPageRes streamPageRes = sDeviceMapper.selectStreamPage(streamPage);
-        if (Objects.isNull(streamPageRes)) {
-            throw new BusinessException("查无产品!");
-        }
-        //API调用
-        ArrayList<Object> objects = new ArrayList<>();
-        Object o = apiProxy.rtmpList();
-        log.info("rtmpList:{}", o);
-        return new ArrayList<>() {{
-            add(o);
-        }};
-    }
 
     @Override
     public ArrayList<Object> recordPage(StreamRecordPage streamRecordPage) {
@@ -89,111 +31,7 @@ public class StreamMediaServiceImpl implements StreamMediaService {
         }};
     }
 
-    @Override
-    public List<Object> rtmpPull(PullPara pullPara) {
-        //todo 业务功能增加
-        Object o = apiProxy.rtmpPull(pullPara.getStreamPath(), pullPara.getTarget(), pullPara.getSave());
-
-        return null;
-    }
-
-    @Override
-    public List<Object> rtspPage(StreamPage streamPage) {
-        //todo 查询业务表-拼接数据
-        Object o = apiProxy.rtspList();
-
-        return null;
-    }
-
-    @Override
-    public List<Object> rtspPull(PullPara pullPara) {
-        //todo 业务功能增加
-        Object o = apiProxy.rtspPull(pullPara.getStreamPath(), pullPara.getTarget(), pullPara.getSave());
-
-        return null;
-    }
-
-    @Override
-    public List<Object> rtspPush(PushPara pushPara) {
-        return null;
-    }
-
-    @Override
-    public List<DevicesVo> getDeviceList(String keywords) {
-        DevicesNameVo devicesNameVo = new DevicesNameVo();
-        devicesNameVo.setKeywords(keywords);
-        return deviceApi.devicesQuery(devicesNameVo);
-    }
-
-    @Override
-    public List<DevicesPathVo> getDevicePathList(String keywords) {
-        //查询出所有已新增在流表里的设备id
-        SDevice sDevice = new SDevice();
-        sDevice.setDelFlag(0);
-        sDevice.setUseFlag(1);
-        List<SDevice> sDevices = sDeviceMapper.selectList(new QueryWrapper<>(sDevice));
-        //获取到所有sDevices中的设备id,再去查设备表,获取到设备id和设备name
-        List<DevicesPathVo> devicesPathVos = new ArrayList<>();
-        List<Long> ids = new ArrayList<>();
-        for (SDevice sDevice1 : sDevices) {
-            ids.add(sDevice1.getDeviceId());
-        }
-        //根据设备id查询设备表,获取到设备id和设备name
-        DevicesNameVo devicesNameVo = new DevicesNameVo();
-        devicesNameVo.setIds(ids);
-        List<DevicesVo> devicesVos = deviceApi.devicesQuery(devicesNameVo);
-        //获取到设备id和设备name,再去查设备表,获取到设备id和设备path
-        DevicesPathVo devicesPathVo = new DevicesPathVo();
-        for (DevicesVo devicesVo : devicesVos) {
-            devicesPathVo.setId(devicesVo.getId());
-            devicesPathVo.setName(devicesVo.getName());
-            for (SDevice sDevice2 : sDevices) {
-                if (Objects.equals(sDevice2.getDeviceId(), devicesVo.getId())) {
-                    devicesPathVo.setPath(sDevice2.getPath());
-                    devicesPathVos.add(devicesPathVo);
-                    break;
-                }
-            }
-        }
-        return devicesPathVos;
-    }
-
-    @Override
-    public int add(StreamAddRes streamAddRes) {
-        SDevice sDevice = new SDevice();
-        BeanUtil.copyProperties(streamAddRes, sDevice);
-        return sDeviceMapper.insert(sDevice);
-    }
-
-
-    @Override
-    public int update(StreamUpdateRes streamUpdateRes) {
-        SDevice sDevice = sDeviceMapper.selectById(streamUpdateRes.getId());
-        if (Objects.isNull(sDevice)) {
-            throw new BusinessException("视频流不存在");
-        }
-        BeanUtil.copyProperties(streamUpdateRes, sDevice);
-        return sDeviceMapper.updateById(sDevice);
-    }
 
-    @Override
-    public int updateStatus(StreamUpdateStatusRes streamUpdateStatusRes) {
-        SDevice sDevice = sDeviceMapper.selectById(streamUpdateStatusRes.getId());
-        if (Objects.isNull(sDevice)) {
-            throw new BusinessException("视频流不存在");
-        }
-        BeanUtil.copyProperties(streamUpdateStatusRes, sDevice);
-        return sDeviceMapper.updateById(sDevice);
-    }
-
-    @Override
-    public String getVideoUrl(Long id) {
-        SDevice sDevice = sDeviceMapper.selectById(id);
-        if (Objects.isNull(sDevice)) {
-            throw new BusinessException("视频流不存在");
-        }
-        return streamMediaProperties.getUrl() + sDevice.getPath();
-    }
 
 
 }