From dd4e0d0d9c75b5216b08644bfe1333a79f794b58 Mon Sep 17 00:00:00 2001
From: hexq <hexiaoqu@visioninsight.com>
Date: 星期六, 20 一月 2024 10:22:34 +0800
Subject: [PATCH] BUGFIX:向下级目录关联通道时,出现“未查询到目录xxx的信息"

---
 src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java
index edd34e5..62d6101 100755
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java
@@ -31,8 +31,8 @@
 
     @Update(value = {" <script>" +
             "UPDATE wvp_platform_catalog " +
-            "SET name=#{name}" +
-            "WHERE id=#{id} and platform_id=#{platformId}"+
+            "SET name=#{platformCatalog.name}" +
+            "WHERE id=#{platformCatalog.id} and platform_id=#{platformCatalog.platformId}"+
             "</script>"})
     int update(@Param("platformCatalog") PlatformCatalog platformCatalog);
 
@@ -51,4 +51,16 @@
             " from wvp_platform_catalog pc " +
             " WHERE pc.id=#{id} and pc.platform_id=#{platformId}")
     PlatformCatalog selectByPlatFormAndCatalogId(@Param("platformId") String platformId, @Param("id") String id);
+
+
+    @Delete("<script> "+
+            "DELETE from wvp_platform_catalog where platform_id=#{platformId} and id in " +
+            "<foreach collection='ids' item='item' open='(' separator=',' close=')'>" +
+            "#{item} " +
+            "</foreach>" +
+            "</script>")
+    int deleteAll(String platformId, List<String> ids);
+
+    @Select("SELECT id from wvp_platform_catalog WHERE platform_id=#{platformId} and parent_id = #{id}")
+    List<String> queryCatalogFromParent(@Param("id") String id, @Param("platformId") String platformId);
 }

--
Gitblit v1.8.0