解决国标平台通道数统计的错误

This commit is contained in:
panlinlin
2021-04-16 11:21:50 +08:00
parent f1fae7aac6
commit 1f07f4ab4c
3 changed files with 10 additions and 5 deletions

View File

@@ -46,7 +46,14 @@ public interface ParentPlatformMapper {
@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.serverGBId) 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}")