feat: 订阅列表和免费列表

This commit is contained in:
Blizzard
2026-03-03 17:09:37 +08:00
parent d79beb4663
commit 042c99aa46
21 changed files with 4182 additions and 209 deletions
+30
View File
@@ -14,6 +14,36 @@ import (
type ChannelApi struct{}
// GetFreeChannelList 获取免费频道列表
// @Tags 频道管理
// @Summary 获取频道列表
// @Accept application/json
// @Produce application/json
// @Param data body request.GetChannelList true "分页查询"
// @Success 200 {object} response.Response
// @Router /radio/channel/freeList [post]
func (a *ChannelApi) GetFreeChannelList(c *gin.Context) {
var req common.PageInfo
err := c.ShouldBindJSON(&req)
if err != nil {
response.FailWithMsg("参数错误: "+err.Error(), c)
return
}
list, total, err := channelService.GetFreeChannelList(req)
if err != nil {
global.Logger.Error("获取频道列表失败!", zap.Error(err))
response.FailWithMsg(err.Error(), c)
return
}
response.OkWithData(response.PageResult{
List: list,
Total: total,
Page: req.Current,
PageSize: req.PageSize,
}, c)
}
// GetChannelList 获取频道列表
// @Tags 频道管理
// @Summary 获取频道列表