From f58290cad307c9bb8018ae53cf2bf93bbe9d7bf5 Mon Sep 17 00:00:00 2001 From: 64850858 <648540858@qq.com> Date: 星期一, 26 七月 2021 17:53:02 +0800 Subject: [PATCH] 更新版本信息 --- src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 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 149b22a..bb81171 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,13 +46,13 @@ @Delete("DELETE FROM parent_platform WHERE serverGBId=#{serverGBId}") int delParentPlatform(ParentPlatform parentPlatform); - @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 " + + @Select("SELECT *, ((SELECT count(0)\n" + + " FROM platform_gb_channel pc\n" + + " WHERE pc.platformId = pp.serverGBId)\n" + + " +\n" + + " (SELECT count(0)\n" + + " FROM platform_gb_stream pgs\n" + + " WHERE pgs.platformId = pp.serverGBId)) as channelCount\n" + "FROM parent_platform pp ") List<ParentPlatform> getParentPlatformList(); @@ -66,5 +66,8 @@ ParentPlatform getParentPlatById(int id); @Update("UPDATE parent_platform SET status=false" ) - void outlineForAllParentPlatform(); + int outlineForAllParentPlatform(); + + @Update("UPDATE parent_platform SET status=#{online} WHERE serverGBId=#{platformGbID}" ) + int updateParentPlatformStatus(String platformGbID, boolean online); } -- Gitblit v1.8.0