class GbStreamController {

    private final static Logger logger = LoggerFactory.getLogger(GbStreamController.class);

    @Autowired
    private IGbStreamService gbStreamService;

    @Autowired
    private IStreamPushService service;

    @Autowired
    private IPlatformService platformService;


    /**
     * 查询国标通道
     * @param page 当前页
     * @param count 每页条数
     * @param platformId 平台ID
     * @return
     */
    @Operation(summary = "查询国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
    @Parameter(name = "page", description = "当前页", required = true)
    @Parameter(name = "count", description = "每页条数", required = true)
    @Parameter(name = "platformId", description = "平台ID", required = true)
    @Parameter(name = "catalogId", description = "目录ID")
    @Parameter(name = "query", description = "查询内容")
    @Parameter(name = "mediaServerId", description = "流媒体ID")
    @GetMapping(value = "/list")
    @ResponseBody
    public PageInfo<GbStream> list(@RequestParam(required = true)Integer page,
                                   @RequestParam(required = true)Integer count,
                                   @RequestParam(required = true)String platformId,
                                   @RequestParam(required = false)String catalogId,
                                   @RequestParam(required = false)String query,
                                   @RequestParam(required = false)String mediaServerId){
        if (ObjectUtils.isEmpty(catalogId)) {
            catalogId = null;
        }
        if (ObjectUtils.isEmpty(query)) {
            query = null;
        }
        if (ObjectUtils.isEmpty(mediaServerId)) {
            mediaServerId = null;
        }

        // catalogId 为null 查询未在平台下分配的数据
        // catalogId 不为null 查询平台下这个，目录下的通道
        return gbStreamService.getAll(page, count, platformId, catalogId, query, mediaServerId);
    }


    /**
     * 移除国标关联
     * @param gbStreamParam
     * @return
     */
    @Operation(summary = "移除国标关联", security = @SecurityRequirement(name = JwtUtils.HEADER))
    @DeleteMapping(value = "/del")
    @ResponseBody
    public void del(@RequestBody GbStreamParam gbStreamParam){

        if (gbStreamParam.getGbStreams() == null || gbStreamParam.getGbStreams().isEmpty()) {
            if (gbStreamParam.isAll()) {
                gbStreamService.delAllPlatformInfo(gbStreamParam.getPlatformId(), gbStreamParam.getCatalogId());
            }
        }else {
            gbStreamService.delPlatformInfo(gbStreamParam.getPlatformId(), gbStreamParam.getGbStreams());
        }

    }

    /**
     * 保存国标关联
     * @param gbStreamParam
     * @return
     */
    @Operation(summary = "保存国标关联", security = @SecurityRequirement(name = JwtUtils.HEADER))
    @PostMapping(value = "/add")
    @ResponseBody
    public void add(@RequestBody GbStreamParam gbStreamParam){<FILL_FUNCTION_BODY>}

    /**
     * 保存国标关联
     * @param gbId
     * @return
     */
    @Operation(summary = "保存国标关联", security = @SecurityRequirement(name = JwtUtils.HEADER))
    @GetMapping(value = "/addWithGbid")
    @ResponseBody
    public void add(String gbId, String platformGbId, @RequestParam(required = false) String catalogGbId){
        List<GbStream> gbStreams = gbStreamService.getGbChannelWithGbid(gbId);
        if (gbStreams.isEmpty()) {
            throw new ControllerException(ErrorCode.ERROR100.getCode(), "gbId的信息未找到");
        }
        gbStreamService.addPlatformInfo(gbStreams, platformGbId, catalogGbId);
    }
}

        if (gbStreamParam.getGbStreams() == null || gbStreamParam.getGbStreams().isEmpty()) {
            if (gbStreamParam.isAll()) {
                List<GbStream> allGBChannels = gbStreamService.getAllGBChannels(gbStreamParam.getPlatformId());
                gbStreamService.addPlatformInfo(allGBChannels, gbStreamParam.getPlatformId(), gbStreamParam.getCatalogId());
            }
        }else {
            gbStreamService.addPlatformInfo(gbStreamParam.getGbStreams(), gbStreamParam.getPlatformId(), gbStreamParam.getCatalogId());
        }
    
<no_super_class>