From 1f07f4ab4ceeb6029d3717cc4cb597d1ad6e7e67 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: Fri, 16 Apr 2021 11:21:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=BD=E6=A0=87=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E9=80=9A=E9=81=93=E6=95=B0=E7=BB=9F=E8=AE=A1=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/storager/dao/ParentPlatformMapper.java | 9 ++++++++- web_src/src/components/ParentPlatformList.vue | 4 +--- web_src/src/components/dialog/chooseChannel.vue | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java index 43be9572..149b22a6 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java @@ -46,7 +46,14 @@ public interface ParentPlatformMapper { @Delete("DELETE FROM parent_platform WHERE serverGBId=#{serverGBId}") int delParentPlatform(ParentPlatform parentPlatform); - @Select("SELECT *,( SELECT count(0) FROM platform_gb_channel pc WHERE pc.platformId = pp.serverGBId) as channelCount FROM parent_platform pp ") + @Select("SELECT *,(" + + "select sum(sum1) from ( " + + "SELECT count(0) as sum1 FROM platform_gb_channel pc WHERE pc.platformId = pp.serverGBId " + + "union all " + + "SELECT count(0) as sum1 FROM platform_gb_stream pgs WHERE pgs.platformId = pp.serverGBId " + + ") " + + ") as channelCount " + + "FROM parent_platform pp ") List getParentPlatformList(); @Select("SELECT * FROM parent_platform WHERE enable=#{enable}") diff --git a/web_src/src/components/ParentPlatformList.vue b/web_src/src/components/ParentPlatformList.vue index 47ffe2d6..c4e6b0a5 100644 --- a/web_src/src/components/ParentPlatformList.vue +++ b/web_src/src/components/ParentPlatformList.vue @@ -138,9 +138,7 @@ export default { }); }, chooseChannel: function(platform) { - this.$refs.chooseChannelDialog.openDialog(platform.serverGBId, ()=>{ - this.initData() - }) + this.$refs.chooseChannelDialog.openDialog(platform.serverGBId, this.initData) }, initData: function() { this.getPlatformList(); diff --git a/web_src/src/components/dialog/chooseChannel.vue b/web_src/src/components/dialog/chooseChannel.vue index a6b9b444..87fc62e4 100644 --- a/web_src/src/components/dialog/chooseChannel.vue +++ b/web_src/src/components/dialog/chooseChannel.vue @@ -62,7 +62,7 @@ export default { this.closeCallback = closeCallback }, close: function() { - + this.closeCallback() }, search: function() {