From 5639719879759c287a0c020818104b9e72ffc292 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 29 五月 2023 09:25:45 +0800 Subject: [PATCH] Merge branch 'postgresql' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java | 82 ++++++++++++++++++++-------------------- 1 files changed, 41 insertions(+), 41 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 89ebd69..056b409 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 @@ -14,88 +14,88 @@ @Repository public interface ParentPlatformMapper { - @Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp, " + - " devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, asMessageChannel, " + - " status, startOfflinePush, catalogId, administrativeDivision, catalogGroup, createTime, updateTime, treeType) " + + @Insert("INSERT INTO wvp_platform (enable, name, server_gb_id, server_gb_domain, server_ip, server_port,device_gb_id,device_ip,"+ + "device_port,username,password,expires,keep_timeout,transport,character_set,ptz,rtcp,as_message_channel,"+ + "status,start_offline_push,catalog_id,administrative_division,catalog_group,create_time,update_time,tree_type) " + " VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " + " #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, #{rtcp}, #{asMessageChannel}, " + " #{status}, #{startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime}, #{treeType})") int addParentPlatform(ParentPlatform parentPlatform); - @Update("UPDATE parent_platform " + + @Update("UPDATE wvp_platform " + "SET enable=#{enable}, " + "name=#{name}," + - "deviceGBId=#{deviceGBId}," + - "serverGBId=#{serverGBId}, " + - "serverGBDomain=#{serverGBDomain}, " + - "serverIP=#{serverIP}," + - "serverPort=#{serverPort}, " + - "deviceIp=#{deviceIp}, " + - "devicePort=#{devicePort}, " + + "device_gb_id=#{deviceGBId}," + + "server_gb_id=#{serverGBId}, " + + "server_gb_domain=#{serverGBDomain}, " + + "server_ip=#{serverIP}," + + "server_port=#{serverPort}, " + + "device_ip=#{deviceIp}, " + + "device_port=#{devicePort}, " + "username=#{username}, " + "password=#{password}, " + "expires=#{expires}, " + - "keepTimeout=#{keepTimeout}, " + + "keep_timeout=#{keepTimeout}, " + "transport=#{transport}, " + - "characterSet=#{characterSet}, " + + "character_set=#{characterSet}, " + "ptz=#{ptz}, " + "rtcp=#{rtcp}, " + - "asMessageChannel=#{asMessageChannel}, " + + "as_message_channel=#{asMessageChannel}, " + "status=#{status}, " + - "startOfflinePush=#{startOfflinePush}, " + - "catalogGroup=#{catalogGroup}, " + - "administrativeDivision=#{administrativeDivision}, " + - "createTime=#{createTime}, " + - "updateTime=#{updateTime}, " + - "treeType=#{treeType}, " + - "catalogId=#{catalogId} " + + "start_offline_push=#{startOfflinePush}, " + + "catalog_group=#{catalogGroup}, " + + "administrative_division=#{administrativeDivision}, " + + "create_time=#{createTime}, " + + "update_time=#{updateTime}, " + + "tree_type=#{treeType}, " + + "catalog_id=#{catalogId} " + "WHERE id=#{id}") int updateParentPlatform(ParentPlatform parentPlatform); - @Delete("DELETE FROM parent_platform WHERE serverGBId=#{serverGBId}") + @Delete("DELETE FROM wvp_platform WHERE server_gb_id=#{serverGBId}") int delParentPlatform(ParentPlatform parentPlatform); @Select("SELECT *, ((SELECT count(0)\n" + - " FROM platform_gb_channel pc\n" + - " WHERE pc.platformId = pp.serverGBId)\n" + + " FROM wvp_platform_gb_channel pc\n" + + " WHERE pc.platform_id = pp.server_gb_id)\n" + " +\n" + " (SELECT count(0)\n" + - " FROM platform_gb_stream pgs\n" + - " WHERE pgs.platformId = pp.serverGBId)\n" + + " FROM wvp_platform_gb_stream pgs\n" + + " WHERE pgs.platform_id = pp.server_gb_id)\n" + " +\n" + " (SELECT count(0)\n" + - " FROM platform_catalog pgc\n" + - " WHERE pgc.platformId = pp.serverGBId)) as channelCount\n" + - "FROM parent_platform pp ") + " FROM wvp_platform_catalog pgc\n" + + " WHERE pgc.platform_id = pp.server_gb_id)) as channel_count\n" + + "FROM wvp_platform pp ") List<ParentPlatform> getParentPlatformList(); - @Select("SELECT * FROM parent_platform WHERE enable=#{enable} ") + @Select("SELECT * FROM wvp_platform WHERE enable=#{enable} ") List<ParentPlatform> getEnableParentPlatformList(boolean enable); - @Select("SELECT * FROM parent_platform WHERE enable=1 and asMessageChannel = 1") + @Select("SELECT * FROM wvp_platform WHERE enable=true and as_message_channel=true") List<ParentPlatform> queryEnablePlatformListWithAsMessageChannel(); - @Select("SELECT * FROM parent_platform WHERE serverGBId=#{platformGbId}") + @Select("SELECT * FROM wvp_platform WHERE server_gb_id=#{platformGbId}") ParentPlatform getParentPlatByServerGBId(String platformGbId); - @Select("SELECT * FROM parent_platform WHERE id=#{id}") + @Select("SELECT * FROM wvp_platform WHERE id=#{id}") ParentPlatform getParentPlatById(int id); - @Update("UPDATE parent_platform SET status=false" ) + @Update("UPDATE wvp_platform SET status=false" ) int outlineForAllParentPlatform(); - @Update("UPDATE parent_platform SET status=#{online} WHERE serverGBId=#{platformGbID}" ) + @Update("UPDATE wvp_platform SET status=#{online} WHERE server_gb_id=#{platformGbID}" ) int updateParentPlatformStatus(String platformGbID, boolean online); @Update(value = {" <script>" + - "UPDATE parent_platform " + - "SET catalogId=#{catalogId}, updateTime=#{updateTime}" + - "WHERE serverGBId=#{platformId}"+ + "UPDATE wvp_platform " + + "SET catalog_id=#{catalogId}, update_time=#{updateTime}" + + "WHERE server_gb_id=#{platformId}"+ "</script>"}) int setDefaultCatalog(String platformId, String catalogId, String updateTime); - @Select("select 'channel' as name, count(pgc.platformId) count from platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId where pgc.platformId=#{platformId} and dc.channelId =#{gbId} " + + @Select("select 'channel' as name, count(pgc.platform_id) count from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id where pgc.platform_id=#{platform_id} and dc.channel_id =#{gbId} " + "union " + - "select 'stream' as name, count(pgs.platformId) count from platform_gb_stream pgs left join gb_stream gs on pgs.gbStreamId = gs.gbStreamId where pgs.platformId=#{platformId} and gs.gbId = #{gbId}") - List<ChannelSourceInfo> getChannelSource(String platformId, String gbId); + "select 'stream' as name, count(pgs.platform_id) count from wvp_platform_gb_stream pgs left join wvp_gb_stream gs on pgs.gb_stream_id = gs.gb_stream_id where pgs.platform_id=#{platform_id} and gs.gb_id #{gbId}") + List<ChannelSourceInfo> getChannelSource(String platform_id, String gbId); } -- Gitblit v1.8.0