From b17280522b3569b49c0d524b7ed7fb45ef0e991a Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期五, 02 四月 2021 19:04:01 +0800
Subject: [PATCH] 增加推流转发到国标,尚不完善

---
 src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java |   11 +++++------
 1 files changed, 5 insertions(+), 6 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 efc7426..257ca9e 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
@@ -24,7 +24,7 @@
     @Update("UPDATE parent_platform " +
             "SET enable=#{enable}, " +
             "name=#{name}," +
-            "serverGBId=#{serverGBId}," +
+            "deviceGBId=#{deviceGBId}," +
             "serverGBDomain=#{serverGBDomain}, " +
             "serverIP=#{serverIP}," +
             "serverPort=#{serverPort}, " +
@@ -39,20 +39,19 @@
             "PTZEnable=#{PTZEnable}, " +
             "rtcp=#{rtcp}, " +
             "status=#{status} " +
-            "WHERE deviceGBId=#{deviceGBId}")
+            "WHERE serverGBId=#{serverGBId}")
     int updateParentPlatform(ParentPlatform parentPlatform);
 
-    @Delete("DELETE FROM parent_platform WHERE deviceGBId=#{deviceGBId}")
+    @Delete("DELETE FROM parent_platform WHERE serverGBId=#{serverGBId}")
     int delParentPlatform(ParentPlatform parentPlatform);
 
-
-    @Select("SELECT * FROM parent_platform")
+    @Select("SELECT *,( SELECT count(0) FROM platform_gb_channel pc WHERE pc.platformId = pp.serverGBId) as channelCount FROM parent_platform pp ")
     List<ParentPlatform> getParentPlatformList();
 
     @Select("SELECT * FROM parent_platform WHERE enable=#{enable}")
     List<ParentPlatform> getEnableParentPlatformList(boolean enable);
 
-    @Select("SELECT * FROM parent_platform WHERE deviceGBId=#{platformGbId}")
+    @Select("SELECT * FROM parent_platform WHERE serverGBId=#{platformGbId}")
     ParentPlatform getParentPlatById(String platformGbId);
 
     @Update("UPDATE parent_platform SET status=false" )

--
Gitblit v1.8.0