From 42a2772d1aa7493bcc4fac3e24ee8eda4eebc23d Mon Sep 17 00:00:00 2001 From: xubinbin <1323875150@qq.com> Date: 星期二, 12 十二月 2023 17:09:04 +0800 Subject: [PATCH] bugfix:请求头带token, SecurityUtils 获取用户id 一直为0 #1195 --- src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) 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 old mode 100644 new mode 100755 index 1b2a8f3..870dee0 --- 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 @@ -403,8 +403,12 @@ if (platform == null) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "骞冲彴鏈壘鍒�"); } - if (platformId.equals(parentId)) { - parentId = platform.getDeviceGBId(); +// if (platformId.equals(parentId)) { +// parentId = platform.getDeviceGBId(); +// } + + if (platformId.equals(platform.getDeviceGBId())) { + parentId = null; } return storager.getChildrenCatalogByPlatform(platformId, parentId); @@ -424,7 +428,7 @@ if (logger.isDebugEnabled()) { logger.debug("娣诲姞鐩綍,{}", JSON.toJSONString(platformCatalog)); } - PlatformCatalog platformCatalogInStore = storager.getCatalog(platformCatalog.getId()); + PlatformCatalog platformCatalogInStore = storager.getCatalog(platformCatalog.getPlatformId(), platformCatalog.getId()); if (platformCatalogInStore != null) { throw new ControllerException(ErrorCode.ERROR100.getCode(), platformCatalog.getId() + " already exists"); @@ -449,7 +453,7 @@ if (logger.isDebugEnabled()) { logger.debug("缂栬緫鐩綍,{}", JSON.toJSONString(platformCatalog)); } - PlatformCatalog platformCatalogInStore = storager.getCatalog(platformCatalog.getId()); + PlatformCatalog platformCatalogInStore = storager.getCatalog(platformCatalog.getPlatformId(), platformCatalog.getId()); if (platformCatalogInStore == null) { throw new ControllerException(ErrorCode.ERROR100.getCode(), platformCatalog.getId() + " not exists"); @@ -482,7 +486,7 @@ throw new ControllerException(ErrorCode.ERROR400); } - int delResult = storager.delCatalog(id); + int delResult = storager.delCatalog(platformId, id); // 濡傛灉鍒犻櫎鐨勬槸榛樿鐩綍鍒欐牴鐩綍璁剧疆涓洪粯璁ょ洰褰� PlatformCatalog parentPlatform = storager.queryDefaultCatalogInPlatform(platformId); -- Gitblit v1.8.0