| 
					
				 | 
			
			
				@@ -17,7 +17,7 @@ import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 public interface PlatformGbStreamMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Insert("REPLACE INTO platform_gb_stream (gbStreamId, platformId, catalogId) VALUES" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "( #{gbStreamId}, #{platformId}, #{catalogId})") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "( #{gbId}, #{platformId}, #{catalogId})") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     int add(PlatformGbStream platformGbStream); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -26,12 +26,12 @@ public interface PlatformGbStreamMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "(gbStreamId, platformId, catalogId) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "values " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<foreach collection='streamPushItems' index='index' item='item' separator=','> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "(${item.gbStreamId}, '${item.platformId}', '${item.catalogId}')" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "(#{item.gbId}, #{item.platformId}, #{item.catalogId})" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</foreach> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</script>") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     int batchAdd(List<StreamPushItem> streamPushItems); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Delete("DELETE FROM platform_gb_stream WHERE gbStreamId = (select gbStreamId from gb_stream where app=#{app} AND stream=#{stream})") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Delete("DELETE FROM platform_gb_stream WHERE gbStreamId = (select gbId from gb_stream where app=#{app} AND stream=#{stream})") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     int delByAppAndStream(String app, String stream); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Delete("DELETE FROM platform_gb_stream WHERE platformId=#{platformId}") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -42,28 +42,28 @@ public interface PlatformGbStreamMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "FROM " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "platform_gb_stream pgs " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "LEFT JOIN parent_platform pp ON pp.serverGBId = pgs.platformId " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "LEFT JOIN gb_stream gs ON gs.gbStreamId = pgs.gbStreamId " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "LEFT JOIN gb_stream gs ON gs.gbId = pgs.gbStreamId " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "WHERE " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "gs.app =#{app} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "AND gs.stream =#{stream} ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<ParentPlatform> selectByAppAndStream(String app, String stream); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Select("SELECT pgs.*, gs.gbId  FROM platform_gb_stream pgs " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "LEFT JOIN gb_stream gs ON pgs.gbStreamId = gs.gbStreamId  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "LEFT JOIN gb_stream gs ON pgs.gbStreamId = gs.gbId  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "WHERE gs.app=#{app} AND gs.stream=#{stream} AND pgs.platformId=#{serverGBId}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     StreamProxyItem selectOne(String app, String stream, String serverGBId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Select("select gs.* \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "from gb_stream gs\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    left join platform_gb_stream pgs\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "        on gs.gbStreamId = pgs.gbStreamId\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "        on gs.gbId = pgs.gbStreamId\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where pgs.platformId=#{platformId} and pgs.catalogId=#{catalogId}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<GbStream> queryChannelInParentPlatformAndCatalog(String platformId, String catalogId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Select("select gs.gbId as id, gs.name as name, pgs.platformId as platformId, pgs.catalogId as catalogId , 0 as childrenCount, 2 as type\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "from gb_stream gs\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    left join platform_gb_stream pgs\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "        on gs.gbStreamId = pgs.gbStreamId\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "        on gs.gbId = pgs.gbStreamId\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where pgs.platformId=#{platformId} and pgs.catalogId=#{catalogId}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<PlatformCatalog> queryChannelInParentPlatformAndCatalogForCatalog(String platformId, String catalogId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -78,7 +78,7 @@ public interface PlatformGbStreamMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "left join platform_gb_stream pgs on " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "pp.serverGBId = pgs.platformId " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "left join gb_stream gs " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "gs.gbStreamId = pgs.gbStreamId " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "gs.gbId = pgs.gbStreamId " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "WHERE " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "gs.app = #{app} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "AND gs.stream = #{stream}" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -87,13 +87,13 @@ public interface PlatformGbStreamMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</script> ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<ParentPlatform> queryPlatFormListForGBWithGBId(String app, String stream, List<String> platforms); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Delete("DELETE FROM platform_gb_stream WHERE gbStreamId = (select id from gb_stream where app=#{app} AND stream=#{stream}) AND platformId=#{platformId}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Delete("DELETE FROM platform_gb_stream WHERE gbStreamId = (select gbId from gb_stream where app=#{app} AND stream=#{stream}) AND platformId=#{platformId}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     int delByAppAndStreamAndPlatform(String app, String stream, String platformId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Delete("<script> "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "DELETE FROM platform_gb_stream where gbStreamId in " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<foreach collection='gbStreams' item='item' open='(' separator=',' close=')' >" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "#{item.gbStreamId}" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "#{item.gbId}" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</foreach>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</script>") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     void delByGbStreams(List<GbStream> gbStreams); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -101,7 +101,7 @@ public interface PlatformGbStreamMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Delete("<script> "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "DELETE FROM platform_gb_stream where platformId=#{platformId} and gbStreamId in " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<foreach collection='gbStreams' item='item' open='(' separator=',' close=')'>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "#{item.gbStreamId} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "#{item.gbId} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</foreach>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</script>") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     void delByAppAndStreamsByPlatformId(List<GbStream> gbStreams, String platformId); 
			 |