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
+425
View File
@@ -1743,6 +1743,36 @@ const docTemplate = `{
}
}
},
"/radio/analytics/vip-stats": {
"get": {
"tags": [
"数据分析"
],
"summary": "获取VIP统计数据",
"parameters": [
{
"type": "string",
"description": "开始日期",
"name": "startDate",
"in": "query"
},
{
"type": "string",
"description": "结束日期",
"name": "endDate",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/category/delete": {
"post": {
"produces": [
@@ -2201,6 +2231,12 @@ const docTemplate = `{
"name": "id",
"in": "query",
"required": true
},
{
"type": "string",
"description": "音色(默认 zh_male_dayi_uranus_bigtts)",
"name": "speaker",
"in": "query"
}
],
"responses": {
@@ -2377,6 +2413,274 @@ const docTemplate = `{
}
}
},
"/radio/user/list": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户管理"
],
"summary": "获取电台用户列表(含订阅/收听统计)",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "current",
"in": "query"
},
{
"type": "integer",
"description": "每页大小",
"name": "pageSize",
"in": "query"
},
{
"type": "string",
"description": "搜索关键字",
"name": "keyword",
"in": "query"
},
{
"type": "integer",
"description": "VIP筛选: 0全部 1VIP 2非VIP",
"name": "isVip",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/default": {
"get": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取默认音色",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/delete": {
"post": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "删除音色",
"parameters": [
{
"description": "音色ID列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.IdsReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/detail": {
"get": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取音色详情",
"parameters": [
{
"type": "string",
"description": "音色ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/list": {
"post": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取音色列表",
"parameters": [
{
"description": "分页查询",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.GetVoiceList"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/options": {
"get": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取音色选项列表",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/save": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "保存音色",
"parameters": [
{
"description": "音色信息",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.SaveVoice"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/set-default": {
"post": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "设置默认音色",
"parameters": [
{
"type": "string",
"description": "音色ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/update": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "更新音色",
"parameters": [
{
"description": "音色信息",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.UpdateVoice"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/role/delete": {
"post": {
"description": "删除角色",
@@ -3394,6 +3698,9 @@ const docTemplate = `{
"description": "页码",
"type": "integer"
},
"isVip": {
"type": "integer"
},
"keyword": {
"description": "关键字",
"type": "string"
@@ -3407,6 +3714,31 @@ const docTemplate = `{
}
}
},
"request.GetVoiceList": {
"type": "object",
"properties": {
"current": {
"description": "页码",
"type": "integer"
},
"keyword": {
"description": "关键字",
"type": "string"
},
"name": {
"description": "音色名称",
"type": "string"
},
"pageSize": {
"description": "每页大小",
"type": "integer"
},
"status": {
"description": "状态",
"type": "integer"
}
}
},
"request.GrantMenu": {
"type": "object",
"properties": {
@@ -3600,6 +3932,51 @@ const docTemplate = `{
}
}
},
"request.SaveVoice": {
"type": "object",
"required": [
"name",
"speakerId"
],
"properties": {
"audioId": {
"description": "试听音频OSS ID",
"type": "string"
},
"description": {
"description": "音色描述",
"type": "string"
},
"gender": {
"description": "性别: male/female/neutral",
"type": "string"
},
"icon": {
"description": "音色图标URL",
"type": "string"
},
"isDefault": {
"description": "是否默认音色",
"type": "integer"
},
"name": {
"description": "音色名称",
"type": "string"
},
"sort": {
"description": "排序",
"type": "integer"
},
"speakerId": {
"description": "音色ID",
"type": "string"
},
"status": {
"description": "状态",
"type": "integer"
}
}
},
"request.ToggleLike": {
"type": "object",
"required": [
@@ -3767,6 +4144,54 @@ const docTemplate = `{
}
}
},
"request.UpdateVoice": {
"type": "object",
"required": [
"id"
],
"properties": {
"audioId": {
"description": "试听音频OSS ID",
"type": "string"
},
"description": {
"description": "音色描述",
"type": "string"
},
"gender": {
"description": "性别",
"type": "string"
},
"icon": {
"description": "音色图标URL",
"type": "string"
},
"id": {
"description": "音色ID",
"type": "string"
},
"isDefault": {
"description": "是否默认音色",
"type": "integer"
},
"name": {
"description": "音色名称",
"type": "string"
},
"sort": {
"description": "排序",
"type": "integer"
},
"speakerId": {
"description": "音色ID",
"type": "string"
},
"status": {
"description": "状态",
"type": "integer"
}
}
},
"response.CaptchaRes": {
"type": "object",
"properties": {
+425
View File
@@ -1736,6 +1736,36 @@
}
}
},
"/radio/analytics/vip-stats": {
"get": {
"tags": [
"数据分析"
],
"summary": "获取VIP统计数据",
"parameters": [
{
"type": "string",
"description": "开始日期",
"name": "startDate",
"in": "query"
},
{
"type": "string",
"description": "结束日期",
"name": "endDate",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/category/delete": {
"post": {
"produces": [
@@ -2194,6 +2224,12 @@
"name": "id",
"in": "query",
"required": true
},
{
"type": "string",
"description": "音色(默认 zh_male_dayi_uranus_bigtts)",
"name": "speaker",
"in": "query"
}
],
"responses": {
@@ -2370,6 +2406,274 @@
}
}
},
"/radio/user/list": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户管理"
],
"summary": "获取电台用户列表(含订阅/收听统计)",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "current",
"in": "query"
},
{
"type": "integer",
"description": "每页大小",
"name": "pageSize",
"in": "query"
},
{
"type": "string",
"description": "搜索关键字",
"name": "keyword",
"in": "query"
},
{
"type": "integer",
"description": "VIP筛选: 0全部 1VIP 2非VIP",
"name": "isVip",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/default": {
"get": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取默认音色",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/delete": {
"post": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "删除音色",
"parameters": [
{
"description": "音色ID列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.IdsReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/detail": {
"get": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取音色详情",
"parameters": [
{
"type": "string",
"description": "音色ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/list": {
"post": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取音色列表",
"parameters": [
{
"description": "分页查询",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.GetVoiceList"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/options": {
"get": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "获取音色选项列表",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/save": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "保存音色",
"parameters": [
{
"description": "音色信息",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.SaveVoice"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/set-default": {
"post": {
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "设置默认音色",
"parameters": [
{
"type": "string",
"description": "音色ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/radio/voice/update": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"音色管理"
],
"summary": "更新音色",
"parameters": [
{
"description": "音色信息",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.UpdateVoice"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/role/delete": {
"post": {
"description": "删除角色",
@@ -3387,6 +3691,9 @@
"description": "页码",
"type": "integer"
},
"isVip": {
"type": "integer"
},
"keyword": {
"description": "关键字",
"type": "string"
@@ -3400,6 +3707,31 @@
}
}
},
"request.GetVoiceList": {
"type": "object",
"properties": {
"current": {
"description": "页码",
"type": "integer"
},
"keyword": {
"description": "关键字",
"type": "string"
},
"name": {
"description": "音色名称",
"type": "string"
},
"pageSize": {
"description": "每页大小",
"type": "integer"
},
"status": {
"description": "状态",
"type": "integer"
}
}
},
"request.GrantMenu": {
"type": "object",
"properties": {
@@ -3593,6 +3925,51 @@
}
}
},
"request.SaveVoice": {
"type": "object",
"required": [
"name",
"speakerId"
],
"properties": {
"audioId": {
"description": "试听音频OSS ID",
"type": "string"
},
"description": {
"description": "音色描述",
"type": "string"
},
"gender": {
"description": "性别: male/female/neutral",
"type": "string"
},
"icon": {
"description": "音色图标URL",
"type": "string"
},
"isDefault": {
"description": "是否默认音色",
"type": "integer"
},
"name": {
"description": "音色名称",
"type": "string"
},
"sort": {
"description": "排序",
"type": "integer"
},
"speakerId": {
"description": "音色ID",
"type": "string"
},
"status": {
"description": "状态",
"type": "integer"
}
}
},
"request.ToggleLike": {
"type": "object",
"required": [
@@ -3760,6 +4137,54 @@
}
}
},
"request.UpdateVoice": {
"type": "object",
"required": [
"id"
],
"properties": {
"audioId": {
"description": "试听音频OSS ID",
"type": "string"
},
"description": {
"description": "音色描述",
"type": "string"
},
"gender": {
"description": "性别",
"type": "string"
},
"icon": {
"description": "音色图标URL",
"type": "string"
},
"id": {
"description": "音色ID",
"type": "string"
},
"isDefault": {
"description": "是否默认音色",
"type": "integer"
},
"name": {
"description": "音色名称",
"type": "string"
},
"sort": {
"description": "排序",
"type": "integer"
},
"speakerId": {
"description": "音色ID",
"type": "string"
},
"status": {
"description": "状态",
"type": "integer"
}
}
},
"response.CaptchaRes": {
"type": "object",
"properties": {
+282
View File
@@ -241,6 +241,8 @@ definitions:
current:
description: 页码
type: integer
isVip:
type: integer
keyword:
description: 关键字
type: string
@@ -250,6 +252,24 @@ definitions:
phone:
type: string
type: object
request.GetVoiceList:
properties:
current:
description: 页码
type: integer
keyword:
description: 关键字
type: string
name:
description: 音色名称
type: string
pageSize:
description: 每页大小
type: integer
status:
description: 状态
type: integer
type: object
request.GrantMenu:
properties:
menuIds:
@@ -385,6 +405,39 @@ definitions:
- channelId
- title
type: object
request.SaveVoice:
properties:
audioId:
description: 试听音频OSS ID
type: string
description:
description: 音色描述
type: string
gender:
description: '性别: male/female/neutral'
type: string
icon:
description: 音色图标URL
type: string
isDefault:
description: 是否默认音色
type: integer
name:
description: 音色名称
type: string
sort:
description: 排序
type: integer
speakerId:
description: 音色ID
type: string
status:
description: 状态
type: integer
required:
- name
- speakerId
type: object
request.ToggleLike:
properties:
programId:
@@ -504,6 +557,41 @@ definitions:
- id
- price
type: object
request.UpdateVoice:
properties:
audioId:
description: 试听音频OSS ID
type: string
description:
description: 音色描述
type: string
gender:
description: 性别
type: string
icon:
description: 音色图标URL
type: string
id:
description: 音色ID
type: string
isDefault:
description: 是否默认音色
type: integer
name:
description: 音色名称
type: string
sort:
description: 排序
type: integer
speakerId:
description: 音色ID
type: string
status:
description: 状态
type: integer
required:
- id
type: object
response.CaptchaRes:
properties:
captcha:
@@ -1738,6 +1826,25 @@ paths:
summary: 获取用户留存分析 (Cohort)
tags:
- 数据分析
/radio/analytics/vip-stats:
get:
parameters:
- description: 开始日期
in: query
name: startDate
type: string
- description: 结束日期
in: query
name: endDate
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 获取VIP统计数据
tags:
- 数据分析
/radio/category/delete:
post:
parameters:
@@ -2028,6 +2135,10 @@ paths:
name: id
required: true
type: string
- description: 音色(默认 zh_male_dayi_uranus_bigtts)
in: query
name: speaker
type: string
produces:
- application/json
responses:
@@ -2143,6 +2254,177 @@ paths:
summary: 解锁频道
tags:
- 订阅管理
/radio/user/list:
get:
consumes:
- application/json
parameters:
- description: 页码
in: query
name: current
type: integer
- description: 每页大小
in: query
name: pageSize
type: integer
- description: 搜索关键字
in: query
name: keyword
type: string
- description: 'VIP筛选: 0全部 1VIP 2非VIP'
in: query
name: isVip
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 获取电台用户列表(含订阅/收听统计)
tags:
- 用户管理
/radio/voice/default:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 获取默认音色
tags:
- 音色管理
/radio/voice/delete:
post:
parameters:
- description: 音色ID列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 删除音色
tags:
- 音色管理
/radio/voice/detail:
get:
parameters:
- description: 音色ID
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 获取音色详情
tags:
- 音色管理
/radio/voice/list:
post:
parameters:
- description: 分页查询
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GetVoiceList'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 获取音色列表
tags:
- 音色管理
/radio/voice/options:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 获取音色选项列表
tags:
- 音色管理
/radio/voice/save:
post:
consumes:
- application/json
parameters:
- description: 音色信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.SaveVoice'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 保存音色
tags:
- 音色管理
/radio/voice/set-default:
post:
parameters:
- description: 音色ID
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 设置默认音色
tags:
- 音色管理
/radio/voice/update:
post:
consumes:
- application/json
parameters:
- description: 音色信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateVoice'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
summary: 更新音色
tags:
- 音色管理
/role/delete:
post:
consumes: