From 3f5e885e82953d55cb808624800f302886a11777 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 21 Jan 2022 14:10:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E9=BB=98=E8=AE=A4=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=A2=AB=E5=88=A0=E9=99=A4=E6=97=B6=EF=BC=8C=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E9=BB=98=E8=AE=A4=E8=8A=82=E7=82=B9=E4=B8=BA=E6=A0=B9?= =?UTF-8?q?=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transmit/cmd/impl/SIPCommanderFroPlatform.java | 4 ++-- .../vmanager/gb28181/platform/PlatformController.java | 11 +++++++++++ src/main/resources/application-dev.yml | 5 +++++ src/main/resources/application-docker.yml | 5 +++++ .../src/components/dialog/chooseChannelForCatalog.vue | 3 +++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java index e15853db..b83e70b0 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java @@ -415,7 +415,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader); transmitRequest(parentPlatform, request); - Thread.sleep(100); + Thread.sleep(10); } catch (SipException | ParseException | InvalidArgumentException e) { e.printStackTrace(); return false; @@ -459,7 +459,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader); transmitRequest(parentPlatform, request); - Thread.sleep(100); + Thread.sleep(200); } catch (SipException | ParseException | InvalidArgumentException e) { e.printStackTrace(); return false; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java index 4929dad0..c486b42e 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java @@ -407,6 +407,17 @@ public class PlatformController { if (logger.isDebugEnabled()) { logger.debug("删除目录,{}", id); } + // 如果删除的是默认目录则根目录设置为默认目录 + PlatformCatalog catalog = storager.getCatalog(id); + if (catalog != null) { + ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(catalog.getPlatformId()); + if (parentPlatform != null) { + if (id.equals(parentPlatform.getCatalogId())) { + storager.setDefaultCatalog(parentPlatform.getServerGBId(), parentPlatform.getServerGBId()); + } + } + } + int delResult = storager.delCatalog(id); WVPResult> result = new WVPResult<>(); result.setCode(0); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 02461612..d0c039c8 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,4 +1,9 @@ spring: + # 上传文件大小限制 + servlet: + multipart: + max-file-size: 10MB + max-request-size: 100MB # REDIS数据库配置 redis: # [必须修改] Redis服务器IP, REDIS安装在本机的,使用127.0.0.1 diff --git a/src/main/resources/application-docker.yml b/src/main/resources/application-docker.yml index 9e48bc58..56efb463 100644 --- a/src/main/resources/application-docker.yml +++ b/src/main/resources/application-docker.yml @@ -1,4 +1,9 @@ spring: + # 上传文件大小限制 + servlet: + multipart: + max-file-size: 10MB + max-request-size: 100MB # REDIS数据库配置 redis: # [必须修改] Redis服务器IP, REDIS安装在本机的,使用127.0.0.1 diff --git a/web_src/src/components/dialog/chooseChannelForCatalog.vue b/web_src/src/components/dialog/chooseChannelForCatalog.vue index 8446c2a6..4e4339f5 100644 --- a/web_src/src/components/dialog/chooseChannelForCatalog.vue +++ b/web_src/src/components/dialog/chooseChannelForCatalog.vue @@ -161,6 +161,9 @@ export default { console.log("移除成功") node.parent.loaded = false node.parent.expand(); + if(this.defaultCatalogId === id) { + this.defaultCatalogId = this.platformId; + } } }) .catch(function (error) {