diff --git a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java index a92ceaff9..1761c63fa 100755 --- a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java @@ -146,15 +146,14 @@ public class StreamProxyServiceImpl implements IStreamProxyService { @Override @Transactional public void add(StreamProxy streamProxy) { - StreamProxy streamProxyInDb = streamProxyMapper.selectOneByAppAndStream(streamProxy.getApp(), streamProxy.getStream()); - if (streamProxyInDb != null) { - throw new ControllerException(ErrorCode.ERROR100.getCode(), "APP+STREAM已经存在"); - } - // 自动生成 camera_code(日期+序号格式) String cameraCode = CameraCodeUtil.generate(streamProxyMapper); streamProxy.setCameraCode(cameraCode); + // app/stream 自动生成唯一值(不再依赖前端传入) + streamProxy.setApp("camera"); + streamProxy.setStream(cameraCode); + // camera_name 必填校验 if (streamProxy.getCameraName() == null || streamProxy.getCameraName().trim().isEmpty()) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "摄像头名称不能为空");