This commit is contained in:
mk1990 2022-03-28 14:36:13 +08:00
commit 87f16e594b
2 changed files with 21 additions and 1 deletions

View File

@ -112,6 +112,26 @@ public interface DeviceChannelMapper {
" </script>"})
List<ChannelReduce> queryChannelListInAll(String query, Boolean online, Boolean hasSubChannel, String platformId, String catalogId);
@Select(value = {" <script>" +
"SELECT " +
" dc.id,\n" +
" dc.channelId,\n" +
" dc.deviceId,\n" +
" dc.name,\n" +
" de.manufacturer,\n" +
" de.hostAddress,\n" +
" dc.subCount,\n" +
" pgc.platformId as platformId,\n" +
" pgc.catalogId as catalogId " +
" FROM device_channel dc " +
" LEFT JOIN device de ON dc.deviceId = de.deviceId " +
" LEFT JOIN platform_gb_channel pgc on pgc.deviceChannelId = dc.id " +
" WHERE pgc.platformId = #{platformId} " +
" ORDER BY dc.deviceId, dc.channelId ASC" +
" </script>"})
List<ChannelReduce> queryChannelByPlatformId(String platformId);
@Select("SELECT * FROM device_channel WHERE channelId=#{channelId}")
List<DeviceChannel> queryChannelByChannelId( String channelId);

View File

@ -614,7 +614,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
@Override
public List<ChannelReduce> queryChannelListInParentPlatform(String platformId) {
return deviceChannelMapper.queryChannelListInAll(null, null, null, platformId, platformId);
return deviceChannelMapper.queryChannelByPlatformId( platformId);
}
@Override