修复通道共享的类型选择

pull/1642/head
648540858 2024-09-19 15:55:44 +08:00
parent d925f9003d
commit dc12bcf8f1
5 changed files with 14 additions and 9 deletions

View File

@ -189,6 +189,7 @@ public class PlatformController {
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页条数", required = true) @Parameter(name = "count", description = "每页条数", required = true)
@Parameter(name = "platformId", description = "上级平台的数据ID") @Parameter(name = "platformId", description = "上级平台的数据ID")
@Parameter(name = "channelType", description = "通道类型, 0国标设备1推流设备2拉流代理")
@Parameter(name = "query", description = "查询内容") @Parameter(name = "query", description = "查询内容")
@Parameter(name = "online", description = "是否在线") @Parameter(name = "online", description = "是否在线")
@Parameter(name = "hasShare", description = "是否已经共享") @Parameter(name = "hasShare", description = "是否已经共享")
@ -197,7 +198,7 @@ public class PlatformController {
public PageInfo<PlatformChannel> queryChannelList(int page, int count, public PageInfo<PlatformChannel> queryChannelList(int page, int count,
@RequestParam(required = false) Integer platformId, @RequestParam(required = false) Integer platformId,
@RequestParam(required = false) String query, @RequestParam(required = false) String query,
@RequestParam(required = false) Boolean channelType, @RequestParam(required = false) Integer channelType,
@RequestParam(required = false) Boolean online, @RequestParam(required = false) Boolean online,
@RequestParam(required = false) Boolean hasShare) { @RequestParam(required = false) Boolean hasShare) {
@ -206,7 +207,7 @@ public class PlatformController {
query = null; 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)) @Operation(summary = "向上级平台添加国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))

View File

@ -149,9 +149,13 @@ public interface PlatformChannelMapper {
" <if test='online == false'> AND coalesce(wpgc.status, wdc.gb_status, wdc.status) = 'OFF'</if> " + " <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 == true'> AND wpgc.platform_id = #{platformId}</if> " +
" <if test='hasShare == false'> AND wpgc.platform_id is null</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>") "</script>")
List<PlatformChannel> queryForPlatformForWebList(@Param("platformId") Integer platformId, @Param("query") String query, 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" + @Select("select\n" +
" wdc.id as gb_id,\n" + " wdc.id as gb_id,\n" +

View File

@ -14,7 +14,7 @@ import java.util.List;
*/ */
public interface IPlatformChannelService { 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); int addAllChannel(Integer platformId);

View File

@ -54,9 +54,9 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
@Override @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); 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); return new PageInfo<>(all);
} }

View File

@ -18,9 +18,9 @@
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType" placeholder="请选择" <el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType" placeholder="请选择"
default-first-option> default-first-option>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="国标设备" value="gb"></el-option> <el-option label="国标设备" :value="0"></el-option>
<el-option label="推流设备" value="push"></el-option> <el-option label="推流设备" :value="1"></el-option>
<el-option label="拉流代理" value="proxy"></el-option> <el-option label="拉流代理" :value="2"></el-option>
</el-select> </el-select>
添加状态: 添加状态:
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="hasShare" placeholder="请选择" <el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="hasShare" placeholder="请选择"