修复通道共享的类型选择
This commit is contained in:
@@ -189,6 +189,7 @@ public class PlatformController {
|
||||
@Parameter(name = "page", description = "当前页", required = true)
|
||||
@Parameter(name = "count", description = "每页条数", required = true)
|
||||
@Parameter(name = "platformId", description = "上级平台的数据ID")
|
||||
@Parameter(name = "channelType", description = "通道类型, 0:国标设备,1:推流设备,2:拉流代理")
|
||||
@Parameter(name = "query", description = "查询内容")
|
||||
@Parameter(name = "online", description = "是否在线")
|
||||
@Parameter(name = "hasShare", description = "是否已经共享")
|
||||
@@ -197,7 +198,7 @@ public class PlatformController {
|
||||
public PageInfo<PlatformChannel> queryChannelList(int page, int count,
|
||||
@RequestParam(required = false) Integer platformId,
|
||||
@RequestParam(required = false) String query,
|
||||
@RequestParam(required = false) Boolean channelType,
|
||||
@RequestParam(required = false) Integer channelType,
|
||||
@RequestParam(required = false) Boolean online,
|
||||
@RequestParam(required = false) Boolean hasShare) {
|
||||
|
||||
@@ -206,7 +207,7 @@ public class PlatformController {
|
||||
query = null;
|
||||
}
|
||||
|
||||
return platformChannelService.queryChannelList(page, count, query, online, platformId, hasShare);
|
||||
return platformChannelService.queryChannelList(page, count, query, channelType, online, platformId, hasShare);
|
||||
}
|
||||
|
||||
@Operation(summary = "向上级平台添加国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
|
||||
@@ -149,9 +149,13 @@ public interface PlatformChannelMapper {
|
||||
" <if test='online == false'> AND coalesce(wpgc.status, wdc.gb_status, wdc.status) = 'OFF'</if> " +
|
||||
" <if test='hasShare == true'> AND wpgc.platform_id = #{platformId}</if> " +
|
||||
" <if test='hasShare == false'> AND wpgc.platform_id is null</if> " +
|
||||
" <if test='channelType == 0'> AND wdc.device_db_id is not null</if> " +
|
||||
" <if test='channelType == 1'> AND wdc.stream_push_id is not null</if> " +
|
||||
" <if test='channelType == 2'> AND wdc.stream_proxy_id is not null</if> " +
|
||||
"</script>")
|
||||
List<PlatformChannel> queryForPlatformForWebList(@Param("platformId") Integer platformId, @Param("query") String query,
|
||||
@Param("online") Boolean online, @Param("hasShare") Boolean hasShare);
|
||||
@Param("channelType") Integer channelType, @Param("online") Boolean online,
|
||||
@Param("hasShare") Boolean hasShare);
|
||||
|
||||
@Select("select\n" +
|
||||
" wdc.id as gb_id,\n" +
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IPlatformChannelService {
|
||||
|
||||
PageInfo<PlatformChannel> queryChannelList(int page, int count, String query, Boolean online, Integer platformId, Boolean hasShare);
|
||||
PageInfo<PlatformChannel> queryChannelList(int page, int count, String query, Integer channelType, Boolean online, Integer platformId, Boolean hasShare);
|
||||
|
||||
int addAllChannel(Integer platformId);
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<PlatformChannel> queryChannelList(int page, int count, String query, Boolean online, Integer platformId, Boolean hasShare) {
|
||||
public PageInfo<PlatformChannel> queryChannelList(int page, int count, String query, Integer channelType, Boolean online, Integer platformId, Boolean hasShare) {
|
||||
PageHelper.startPage(page, count);
|
||||
List<PlatformChannel> all = platformChannelMapper.queryForPlatformForWebList(platformId, query, online, hasShare);
|
||||
List<PlatformChannel> all = platformChannelMapper.queryForPlatformForWebList(platformId, query, channelType, online, hasShare);
|
||||
return new PageInfo<>(all);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user