feat: 音色管理

This commit is contained in:
Blizzard
2026-04-28 10:16:23 +08:00
parent 5f4f739f16
commit 141424878c
11 changed files with 1148 additions and 387 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ import (
type ChannelService struct{}
func (s *ChannelService) GetFreeChannelList(req common.PageInfo) ([]radio.RadioChannel, int64, error) {
db := global.DB.Model(&radio.RadioChannel{}).Where("is_free = 1")
db := global.DB.Model(&radio.RadioChannel{}).Where("is_free = 1").Where("status = ?", 1)
var list []radio.RadioChannel
var total int64
err := db.Count(&total).Error
@@ -33,7 +33,7 @@ func (s *ChannelService) GetFreeChannelList(req common.PageInfo) ([]radio.RadioC
// GetChannelList 获取频道列表
func (s *ChannelService) GetChannelList(userId string, info radioReq.GetChannelList) ([]radio.RadioChannel, int64, error) {
db := global.DB.Model(&radio.RadioChannel{})
db := global.DB.Model(&radio.RadioChannel{}).Where("status = ?", 1)
var list []radio.RadioChannel
var total int64