| | |
| | | public interface ParentPlatformMapper { |
| | | |
| | | @Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp, " + |
| | | " devicePort, username, password, expires, keepTimeout, transport, characterSet, PTZEnable, rtcp, " + |
| | | " devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, " + |
| | | " status) " + |
| | | " VALUES (${enable}, '${name}', '${serverGBId}', '${serverGBDomain}', '${serverIP}', ${serverPort}, '${deviceGBId}', '${deviceIp}', " + |
| | | " '${devicePort}', '${username}', '${password}', '${expires}', '${keepTimeout}', '${transport}', '${characterSet}', ${PTZEnable}, ${rtcp}, " + |
| | | " '${devicePort}', '${username}', '${password}', '${expires}', '${keepTimeout}', '${transport}', '${characterSet}', ${ptz}, ${rtcp}, " + |
| | | " ${status})") |
| | | int addParentPlatform(ParentPlatform parentPlatform); |
| | | |
| | | @Update("UPDATE parent_platform " + |
| | | "SET enable=#{enable}, " + |
| | | "name=#{name}," + |
| | | "serverGBId=#{serverGBId}," + |
| | | "deviceGBId=#{deviceGBId}," + |
| | | "serverGBId=#{serverGBId}, " + |
| | | "serverGBDomain=#{serverGBDomain}, " + |
| | | "serverIP=#{serverIP}," + |
| | | "serverPort=#{serverPort}, " + |
| | |
| | | "keepTimeout=#{keepTimeout}, " + |
| | | "transport=#{transport}, " + |
| | | "characterSet=#{characterSet}, " + |
| | | "PTZEnable=#{PTZEnable}, " + |
| | | "ptz=#{ptz}, " + |
| | | "rtcp=#{rtcp}, " + |
| | | "status=#{status} " + |
| | | "WHERE deviceGBId=#{deviceGBId}") |
| | | "WHERE id=#{id}") |
| | | 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 *,( SELECT count(0) FROM platform_gb_channel pc WHERE pc.platformId = pp.deviceGBId) 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<ParentPlatform> getParentPlatformList(); |
| | | |
| | | @Select("SELECT * FROM parent_platform WHERE enable=#{enable}") |
| | | List<ParentPlatform> getEnableParentPlatformList(boolean enable); |
| | | |
| | | @Select("SELECT * FROM parent_platform WHERE serverGBId=#{platformGbId}") |
| | | ParentPlatform getParentPlatById(String platformGbId); |
| | | ParentPlatform getParentPlatByServerGBId(String platformGbId); |
| | | |
| | | @Select("SELECT * FROM parent_platform WHERE id=#{id}") |
| | | ParentPlatform getParentPlatById(int id); |
| | | |
| | | @Update("UPDATE parent_platform SET status=false" ) |
| | | void outlineForAllParentPlatform(); |