From 23b8667b7f6be60858f1149a3a5fdac9daee17c1 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 15 May 2023 16:08:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86sql?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 784b0ea7..19e7d1ab 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java @@ -24,7 +24,8 @@ public interface PlatformCatalogMapper { @Select("SELECT pc.*, count(pc2.id) as children_count from wvp_platform_catalog pc " + "left join wvp_platform_catalog pc2 on pc.id = pc2.parent_id " + - "WHERE pc.parent_id=#{parentId} AND pc.platform_id=#{platformId} group by pc.id") + "WHERE pc.parent_id=#{parentId} AND pc.platform_id=#{platformId} " + + "group by pc.id, pc.name, pc.platform_id, pc.business_group_id, pc.civil_code, pc.parent_id") List selectByParentId(String platformId, String parentId); @Select("SELECT *, (SELECT COUNT(1) from wvp_platform_catalog where parent_id = pc.id) as children_count from wvp_platform_catalog pc WHERE pc.id=#{id}")