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": {