|  |  | 
 |  |  |  | 
 |  |  |     @Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp,  " + | 
 |  |  |             "            devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, " + | 
 |  |  |             "            status) " + | 
 |  |  |             "            status, shareAllLiveStream, catalogId) " + | 
 |  |  |             "            VALUES (${enable}, '${name}', '${serverGBId}', '${serverGBDomain}', '${serverIP}', ${serverPort}, '${deviceGBId}', '${deviceIp}', " + | 
 |  |  |             "            '${devicePort}', '${username}', '${password}', '${expires}', '${keepTimeout}', '${transport}', '${characterSet}', ${ptz}, ${rtcp}, " + | 
 |  |  |             "            ${status})") | 
 |  |  |             "            ${status}, ${shareAllLiveStream}, #{catalogId})") | 
 |  |  |     int addParentPlatform(ParentPlatform parentPlatform); | 
 |  |  |  | 
 |  |  |     @Update("UPDATE parent_platform " + | 
 |  |  | 
 |  |  |             "characterSet=#{characterSet}, " + | 
 |  |  |             "ptz=#{ptz}, " + | 
 |  |  |             "rtcp=#{rtcp}, " + | 
 |  |  |             "status=#{status} " + | 
 |  |  |             "status=#{status}, " + | 
 |  |  |             "shareAllLiveStream=#{shareAllLiveStream}, " + | 
 |  |  |             "catalogId=#{catalogId} " + | 
 |  |  |             "WHERE id=#{id}") | 
 |  |  |     int updateParentPlatform(ParentPlatform parentPlatform); | 
 |  |  |  | 
 |  |  | 
 |  |  |     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); | 
 |  |  |  | 
 |  |  |     @Select("SELECT * FROM parent_platform WHERE shareAllLiveStream=true") | 
 |  |  |     List<ParentPlatform> selectAllAhareAllLiveStream(); | 
 |  |  |  | 
 |  |  |     @Update(value = {" <script>" + | 
 |  |  |             "UPDATE parent_platform " + | 
 |  |  |             "SET catalogId=#{catalogId}" + | 
 |  |  |             "WHERE serverGBId=#{platformId}"+ | 
 |  |  |             "</script>"}) | 
 |  |  |     int setDefaultCatalog(String platformId, String catalogId); | 
 |  |  | } |