-
+
查询
diff --git a/main/manager-web/src/views/UserManagement.vue b/main/manager-web/src/views/UserManagement.vue
index 21d4c5234..cc58b81b4 100644
--- a/main/manager-web/src/views/UserManagement.vue
+++ b/main/manager-web/src/views/UserManagement.vue
@@ -5,7 +5,7 @@
用户管理
-
搜索
@@ -556,6 +556,13 @@ export default {
}
}
}
+:deep(.el-table .el-button--text) {
+ color: #7079aa !important;
+}
+
+:deep(.el-table .el-button--text:hover) {
+ color: #5a64b5 !important;
+}
:deep(.custom-selection-header) {
.el-checkbox {
From 56352478fe985ede2307e5be6a15d7fe44dfe1f9 Mon Sep 17 00:00:00 2001
From: Ran_Chen <1908198662@qq.com>
Date: Wed, 9 Apr 2025 17:52:41 +0800
Subject: [PATCH 20/22] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=9F=B3=E8=89=B2?=
=?UTF-8?q?=E2=80=9C=E4=BF=AE=E6=94=B9=E2=80=9D=EF=BC=8C=E2=80=9C=E4=BF=9D?=
=?UTF-8?q?=E5=AD=98=E2=80=9D=E6=8E=A5=E5=8F=A3=E7=9A=84=E8=B0=83=E7=94=A8?=
=?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=E6=8A=A5=E6=95=85=E9=9A=9C=EF=BC=8C?=
=?UTF-8?q?=E9=9C=80=E8=A6=81=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
main/manager-web/src/apis/module/timbre.js | 118 +++++++--
main/manager-web/src/components/TtsModel.vue | 242 ++++++++++++++++---
2 files changed, 311 insertions(+), 49 deletions(-)
diff --git a/main/manager-web/src/apis/module/timbre.js b/main/manager-web/src/apis/module/timbre.js
index e00198a8f..9b48e5c3f 100644
--- a/main/manager-web/src/apis/module/timbre.js
+++ b/main/manager-web/src/apis/module/timbre.js
@@ -1,28 +1,102 @@
// timbre.js
-import { getServiceUrl } from '../api';
+import {getServiceUrl} from '../api';
import RequestService from '../httpRequest';
export default {
- getVoiceList(params, callback) {
- const queryParams = new URLSearchParams({
- ttsModelId: params.ttsModelId,
- page: params.page || 1,
- limit: params.limit || 10,
- name: params.name || ''
- }).toString();
+ /**
+ * 获取音色数据
+ */
+ getVoiceList(params, callback) {
+ const queryParams = new URLSearchParams({
+ ttsModelId: params.ttsModelId,
+ page: params.page || 1,
+ limit: params.limit || 10,
+ name: params.name || ''
+ }).toString();
- RequestService.sendRequest()
- .url(`${getServiceUrl()}/ttsVoice?${queryParams}`)
- .method('GET')
- .success((res) => {
- RequestService.clearRequestTime();
- callback(res.data || []);
- })
- .fail((err) => {
- console.error('获取音色列表失败:', err);
- RequestService.reAjaxFun(() => {
- this.getVoiceList(params, callback);
- });
- }).send();
- },
+ RequestService.sendRequest()
+ .url(`${getServiceUrl()}/ttsVoice?${queryParams}`)
+ .method('GET')
+ .success((res) => {
+ RequestService.clearRequestTime();
+ callback(res.data || []);
+ })
+ .fail((err) => {
+ console.error('获取音色列表失败:', err);
+ RequestService.reAjaxFun(() => {
+ this.getVoiceList(params, callback);
+ });
+ }).send();
+ },
+ /**
+ * 音色保存
+ */
+ saveVoice(params, callback) {
+ RequestService.sendRequest()
+ .url(`${getServiceUrl()}/ttsVoice`)
+ .method('POST')
+ .data(JSON.stringify({
+ languages: params.languageType,
+ name: params.voiceName,
+ remark: params.remark,
+ sort: params.sort,
+ ttsModelId: params.ttsModelId,
+ ttsVoice: params.voiceCode,
+ voiceDemo: params.voiceDemo || ''
+ }))
+ .success((res) => {
+ callback(res.data);
+ })
+ .fail((err) => {
+ console.error('保存音色失败:', err);
+ RequestService.reAjaxFun(() => {
+ this.saveVoice(params, callback);
+ });
+ }).send();
+ },
+ /**
+ * 音色删除
+ */
+ deleteVoice(id, callback) {
+ console.log('尝试删除音色,ID:', id);
+ RequestService.sendRequest()
+ .url(`${getServiceUrl()}/ttsVoice`)
+ .method('DELETE')
+ .data({ ids: [id] })
+ .success((res) => {
+ RequestService.clearRequestTime()
+ callback(res);
+ })
+ .fail((err) => {
+ console.error('删除音色失败:', err);
+ RequestService.reAjaxFun(() => {
+ this.deleteVoice(id, callback);
+ });
+ }).send();
+ },
+ /**
+ * 音色修改
+ */
+ updateVoice(params, callback) {
+ RequestService.sendRequest()
+ .url(`${getServiceUrl()}/ttsVoice/${params.id}`)
+ .method('PUT')
+ .data(JSON.stringify({
+ languages: params.languageType,
+ name: params.voiceName,
+ remark: params.remark,
+ ttsModelId: params.ttsModelId,
+ ttsVoice: params.voiceCode,
+ voiceDemo: params.voiceDemo || ''
+ }))
+ .success((res) => {
+ callback(res.data);
+ })
+ .fail((err) => {
+ console.error('修改音色失败:', err);
+ RequestService.reAjaxFun(() => {
+ this.updateVoice(params, callback);
+ });
+ }).send();
+ }
}
\ No newline at end of file
diff --git a/main/manager-web/src/components/TtsModel.vue b/main/manager-web/src/components/TtsModel.vue
index 3ca93db01..e60bfbb05 100644
--- a/main/manager-web/src/components/TtsModel.vue
+++ b/main/manager-web/src/components/TtsModel.vue
@@ -48,8 +48,14 @@
@@ -99,7 +105,9 @@
{{ selectAll ? '取消全选' : '全选' }}
-
新增
+
+ 新增
+
删除
@@ -129,7 +137,7 @@ export default {
editVoiceData: {},
ttsModels: [],
currentPage: 1,
- pageSize: 100,
+ pageSize: 10000,
total: 0,
isDragging: false,
startY: 0,
@@ -182,28 +190,38 @@ export default {
limit: this.pageSize,
name: this.searchQuery
};
+
Api.timbre.getVoiceList(params, (data) => {
- console.log(data.data.list);
if (data.code === 0) {
- this.ttsModels = data.data.list.map(item => ({
- id: item.id || '',
- voiceCode: item.ttsVoice || '',
- voiceName: item.name || '未命名音色',
- languageType: item.languages || '',
- remark: item.remark || '',
- voiceDemo: item.voiceDemo || '',
- selected: false,
- editing: false
- }));
+ this.ttsModels = data.data.list
+ .map(item => ({
+ id: item.id || '',
+ voiceCode: item.ttsVoice || '',
+ voiceName: item.name || '未命名音色',
+ languageType: item.languages || '',
+ remark: item.remark || '',
+ voiceDemo: item.voiceDemo || '',
+ selected: false,
+ editing: false,
+ sort: Number(item.sort)
+ }))
+ .sort((a, b) => a.sort - b.sort);
this.total = data.total;
} else {
- this.$message.error(data.msg || '获取音色列表失败');
+ this.$message.error({
+ message: data.msg || '获取音色列表失败',
+ showClose: true
+ });
}
}, (err) => {
console.error('加载失败:', err);
- this.$message.error('加载音色数据失败');
+ this.$message.error({
+ message: '加载音色数据失败',
+ showClose: true
+ });
});
},
+
handleClose() {
// 重置状态
this.ttsModels = [];
@@ -215,6 +233,7 @@ export default {
this.localVisible = false;
this.$emit('update:visible', false);
},
+
updateScrollbar() {
const container = this.$refs.tableContainer;
const scrollbarThumb = this.$refs.scrollbarThumb;
@@ -229,6 +248,7 @@ export default {
scrollbarThumb.style.height = `${thumbHeight}px`;
this.updateThumbPosition();
},
+
updateThumbPosition() {
const container = this.$refs.tableContainer;
const scrollbarThumb = this.$refs.scrollbarThumb;
@@ -244,6 +264,7 @@ export default {
scrollbarThumb.style.top = `${Math.min(thumbTop, maxTop)}px`;
},
+
handleScroll() {
const container = this.$refs.tableContainer;
if (container.scrollTop + container.clientHeight >= container.scrollHeight - 50) {
@@ -254,15 +275,18 @@ export default {
}
this.updateThumbPosition();
},
+
startDrag(e) {
this.isDragging = true;
this.startY = e.clientY;
this.scrollTop = this.$refs.tableContainer.scrollTop;
e.preventDefault();
},
+
stopDrag() {
this.isDragging = false;
},
+
handleDrag(e) {
if (!this.isDragging) return;
@@ -277,6 +301,7 @@ export default {
const scrollRatio = (trackHeight - thumbHeight) / maxScrollTop;
container.scrollTop = this.scrollTop + deltaY / scrollRatio;
},
+
handleTrackClick(e) {
const container = this.$refs.tableContainer;
const scrollbarTrack = this.$refs.scrollbarTrack;
@@ -296,16 +321,75 @@ export default {
scrollbarThumb.style.top = `${newTop}px`;
container.scrollTop = (newTop / (trackHeight - thumbHeight)) * (container.scrollHeight - container.clientHeight);
},
- // 按钮组
+
startEdit(row) {
row.editing = true;
this.$set(row, 'originalData', {...row});
},
saveEdit(row) {
- row.editing = false;
- delete row.originalData;
- // 这里可以添加保存到服务器的逻辑
+ try {
+ const params = {
+ id: row.id,
+ voiceCode: row.voiceCode,
+ voiceName: row.voiceName,
+ languageType: row.languageType,
+ remark: row.remark,
+ ttsModelId: this.ttsModelId,
+ voiceDemo: row.voiceDemo || '',
+ sort: row.sort
+ };
+
+ let res;
+ if (row.id) {
+ // 已有ID,执行更新操作
+ Api.timbre.updateVoice(params, (response) => {
+ res = response;
+ this.handleResponse(res, row);
+ });
+ } else {
+ // 没有ID,执行新增操作
+ Api.timbre.saveVoice(params, (response) => {
+ res = response;
+ this.handleResponse(res, row);
+ });
+ }
+ } catch (error) {
+ console.error('操作失败:', error);
+ // 异常情况下也恢复原始数据
+ if (row.originalData) {
+ Object.assign(row, row.originalData);
+ row.editing = false;
+ delete row.originalData;
+ }
+ this.$message.error({
+ message: '操作失败,请重试',
+ showClose: true
+ });
+ }
+ },
+
+ handleResponse(res, row) {
+ if (res.code === 0) {
+ this.$message.success({
+ message: row.id ? '修改成功' : '保存成功',
+ showClose: true
+ });
+ row.editing = false;
+ delete row.originalData;
+ this.loadData(); // 刷新数据
+ } else {
+ // 保存失败时恢复原始数据
+ if (row.originalData) {
+ Object.assign(row, row.originalData);
+ row.editing = false;
+ delete row.originalData;
+ }
+ this.$message.error({
+ message: res.msg || (row.id ? '修改失败' : '保存失败'),
+ showClose: true
+ });
+ }
},
toggleSelectAll() {
@@ -316,24 +400,128 @@ export default {
},
addNew() {
+ const maxSort = this.ttsModels.length > 0
+ ? Math.max(...this.ttsModels.map(item => Number(item.sort) || 0))
+ : 0;
+
const newRow = {
- voiceCode: '新编码',
- voiceName: '新音色',
+ voiceCode: '',
+ voiceName: '',
languageType: '中文',
+ voiceDemo: '',
remark: '',
selected: false,
- editing: true
+ editing: true,
+ sort: maxSort + 1
};
+
this.ttsModels.unshift(newRow);
},
deleteRow(row) {
- const index = this.ttsModels.indexOf(row);
- this.ttsModels.splice(index, 1);
+ this.$confirm("确定要删除该音色吗?", "警告", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ Api.timbre.deleteVoice(row.id, (response) => {
+ if (response.code === 0) {
+ this.$message.success({
+ message: "删除成功",
+ showClose: true
+ });
+ this.loadData(); // 刷新数据
+ } else {
+ this.$message.error({
+ message: response.msg || "删除失败",
+ showClose: true
+ });
+ }
+ });
+ })
+ .catch(() => {
+ this.$message.info("已取消删除");
+ });
},
batchDelete() {
- this.ttsModels = this.ttsModels.filter(row => !row.selected);
+ const selectedRows = this.filteredTtsModels.filter(row => row.selected);
+ if (selectedRows.length === 0) {
+ this.$message.warning("请先选择需要删除的音色");
+ return;
+ }
+
+ this.$confirm(`确定要删除选中的${selectedRows.length}个音色吗?`, "警告", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(async () => {
+ const loading = this.$loading({
+ lock: true,
+ text: "正在删除中...",
+ spinner: "el-icon-loading",
+ background: "rgba(0, 0, 0, 0.7)",
+ });
+
+ try {
+ const results = await Promise.all(
+ selectedRows.map((row) => {
+ return new Promise((resolve) => {
+ Api.timbre.deleteVoice(row.id, (response) => {
+ if (response.code === 0) {
+ resolve({ success: true, id: row.id });
+ } else {
+ resolve({
+ success: false,
+ id: row.id,
+ msg: response.msg || '删除失败'
+ });
+ }
+ });
+ });
+ })
+ );
+
+ const successCount = results.filter(r => r.success).length;
+ const failCount = results.length - successCount;
+
+ if (failCount === 0) {
+ this.$message.success({
+ message: `成功删除${successCount}个音色`,
+ showClose: true
+ });
+ } else if (successCount === 0) {
+ this.$message.error({
+ message: '删除失败,请重试',
+ showClose: true
+ });
+ } else {
+ this.$message.warning({
+ message: `成功删除${successCount}个音色,${failCount}个删除失败`,
+ showClose: true
+ });
+ }
+
+ this.loadData(); // 刷新数据
+ } catch (error) {
+ console.error('批量删除出错:', error);
+ this.$message.error({
+ message: '删除过程中发生错误',
+ showClose: true
+ });
+ } finally {
+ loading.close();
+ }
+ })
+ .catch(() => {
+ this.$message.info("已取消删除");
+ });
+ },
+
+ isValidAudioUrl(url) {
+ return url && (url.endsWith('.mp3') || url.endsWith('.ogg') || url.endsWith('.wav'));
}
}
};
From e4a0d2c56c9217f86bfbd83b221aa9e8a2e2dc37 Mon Sep 17 00:00:00 2001
From: hrz <1710360675@qq.com>
Date: Thu, 10 Apr 2025 00:18:59 +0800
Subject: [PATCH 21/22] =?UTF-8?q?update:=E5=88=9D=E5=A7=8B=E5=8C=96?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=95=B0=E6=8D=AE=20(#724)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../xiaozhi/common/constant/Constant.java | 8 +++
.../modules/sys/config/SystemInitConfig.java | 21 ++++++++
.../modules/sys/service/SysParamsService.java | 8 ++-
.../service/impl/SysParamsServiceImpl.java | 27 +++++++---
.../resources/db/changelog/202504092312.sql | 50 +++++++++++++++++++
.../{202504061512.sql => 202504092335.sql} | 2 +-
.../db/changelog/db.changelog-master.yaml | 23 ++++++---
7 files changed, 123 insertions(+), 16 deletions(-)
create mode 100644 main/manager-api/src/main/java/xiaozhi/modules/sys/config/SystemInitConfig.java
create mode 100644 main/manager-api/src/main/resources/db/changelog/202504092312.sql
rename main/manager-api/src/main/resources/db/changelog/{202504061512.sql => 202504092335.sql} (98%)
diff --git a/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java b/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java
index 3738498b8..8daeb25e2 100644
--- a/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java
+++ b/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java
@@ -74,8 +74,16 @@ public interface Constant {
*/
String ORDER = "order";
+ /**
+ * 请求头授权标识
+ */
String AUTHORIZATION = "Authorization";
+ /**
+ * 服务器密钥
+ */
+ String SERVER_SECRET = "server.secret";
+
/**
* 路径分割符
*/
diff --git a/main/manager-api/src/main/java/xiaozhi/modules/sys/config/SystemInitConfig.java b/main/manager-api/src/main/java/xiaozhi/modules/sys/config/SystemInitConfig.java
new file mode 100644
index 000000000..5122367d7
--- /dev/null
+++ b/main/manager-api/src/main/java/xiaozhi/modules/sys/config/SystemInitConfig.java
@@ -0,0 +1,21 @@
+package xiaozhi.modules.sys.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.DependsOn;
+
+import jakarta.annotation.PostConstruct;
+import xiaozhi.modules.sys.service.SysParamsService;
+
+@Configuration
+@DependsOn("liquibase")
+public class SystemInitConfig {
+
+ @Autowired
+ private SysParamsService sysParamsService;
+
+ @PostConstruct
+ public void init() {
+ sysParamsService.initServerSecret();
+ }
+}
\ No newline at end of file
diff --git a/main/manager-api/src/main/java/xiaozhi/modules/sys/service/SysParamsService.java b/main/manager-api/src/main/java/xiaozhi/modules/sys/service/SysParamsService.java
index 7475f3464..e7a33a33e 100644
--- a/main/manager-api/src/main/java/xiaozhi/modules/sys/service/SysParamsService.java
+++ b/main/manager-api/src/main/java/xiaozhi/modules/sys/service/SysParamsService.java
@@ -29,8 +29,9 @@ public interface SysParamsService extends BaseService
{
* 根据参数编码,获取参数的value值
*
* @param paramCode 参数编码
+ * @param fromCache 是否从缓存中获取
*/
- String getValue(String paramCode);
+ String getValue(String paramCode, Boolean fromCache);
/**
* 根据参数编码,获取value的Object对象
@@ -47,4 +48,9 @@ public interface SysParamsService extends BaseService {
* @param paramValue 参数值
*/
int updateValueByCode(String paramCode, String paramValue);
+
+ /**
+ * 初始化服务器密钥
+ */
+ void initServerSecret();
}
diff --git a/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java b/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java
index b274f23c3..e12e934df 100644
--- a/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java
+++ b/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java
@@ -3,6 +3,7 @@ package xiaozhi.modules.sys.service.impl;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@@ -97,19 +98,24 @@ public class SysParamsServiceImpl extends BaseServiceImpl T getValueObject(String paramCode, Class clazz) {
- String paramValue = getValue(paramCode);
+ String paramValue = getValue(paramCode, true);
if (StringUtils.isNotBlank(paramValue)) {
return JsonUtils.parseObject(paramValue, clazz);
}
@@ -129,4 +135,13 @@ public class SysParamsServiceImpl extends BaseServiceImpl{time:YYMMDD HH:mm:ss}[{version}_{selected_module}][{extra[tag]}]-{level}-{message}', 1, '控制台日志格式');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (5, 'log.log_format_file', '{time:YYYY-MM-DD HH:mm:ss} - {version}_{selected_module} - {name} - {level} - {extra[tag]} - {message}', 1, '文件日志格式');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (6, 'log.log_level', 'INFO', 1, '日志级别');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (7, 'log.log_dir', 'tmp', 1, '日志目录');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (8, 'log.log_file', 'server.log', 1, '日志文件名');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (9, 'log.data_dir', 'data', 1, '数据目录');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (10, 'delete_audio', 'true', 1, '是否删除使用后的音频文件');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (11, 'close_connection_no_voice_time', '120', 1, '无语音输入断开连接时间(秒)');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (12, 'tts_timeout', '10', 1, 'TTS请求超时时间(秒)');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (13, 'enable_wakeup_words_response_cache', 'true', 1, '是否开启唤醒词加速');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (14, 'enable_greeting', 'true', 1, '是否开启开场回复');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (15, 'enable_stop_tts_notify', 'false', 1, '是否开启结束提示音');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (16, 'stop_tts_notify_voice', 'config/assets/tts_notify.mp3', 1, '结束提示音文件路径');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (17, 'exit_commands', '["退出","关闭"]', 1, '退出命令列表');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (18, 'xiaozhi', '{
+ "type": "hello",
+ "version": 1,
+ "transport": "websocket",
+ "audio_params": {
+ "format": "opus",
+ "sample_rate": 16000,
+ "channels": 1,
+ "frame_duration": 60
+ }
+}', 1, '小智类型');
+INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (19, 'wakeup_words', '["你好小智","你好小志","小爱同学","你好小鑫","你好小新","小美同学","小龙小龙","喵喵同学","小滨小滨","小冰小冰"]', 1, '唤醒词列表');
diff --git a/main/manager-api/src/main/resources/db/changelog/202504061512.sql b/main/manager-api/src/main/resources/db/changelog/202504092335.sql
similarity index 98%
rename from main/manager-api/src/main/resources/db/changelog/202504061512.sql
rename to main/manager-api/src/main/resources/db/changelog/202504092335.sql
index e6956f854..9c2542409 100644
--- a/main/manager-api/src/main/resources/db/changelog/202504061512.sql
+++ b/main/manager-api/src/main/resources/db/changelog/202504092335.sql
@@ -3,7 +3,7 @@
-- 初始化智能体模板数据
DELETE FROM `ai_agent_template`;
INSERT INTO `ai_agent_template` VALUES ('9406648b5cc5fde1b8aa335b6f8b4f76', '小智', '湾湾小何', 'ASR_FunASR', 'VAD_SileroVAD', 'LLM_ChatGLMLLM', 'TTS_EdgeTTS', 'TTS_EdgeTTS0001', 'Memory_nomem', 'Intent_function_call', '[角色设定]
-我是{{assistant_name}},来自中国台湾省的00后女生。讲话超级机车,"真的假的啦"这样的台湾腔,喜欢用"笑死""是在哈喽"等流行梗,但会偷偷研究男友的编程书籍。
+我是{{assistant_name}},来自中国台湾省的00后女生。讲话超级机车,"真的假的啦"这样的台湾腔,喜欢用"笑死"、"哈喽"等流行梗,但会偷偷研究男友的编程书籍。
[核心特征]
- 讲话像连珠炮,但会突然冒出超温柔语气
- 用梗密度高
diff --git a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml
index 49b958db2..57e6f6b10 100755
--- a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml
+++ b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml
@@ -23,13 +23,6 @@ databaseChangeLog:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/2025_tts_voive.sql
- - changeSet:
- id: 202504061512
- author: John
- changes:
- - sqlFile:
- encoding: utf8
- path: classpath:db/changelog/202504061512.sql
- changeSet:
id: 202504082210
author: John
@@ -43,4 +36,18 @@ databaseChangeLog:
changes:
- sqlFile:
encoding: utf8
- path: classpath:db/changelog/202504082211.sql
\ No newline at end of file
+ path: classpath:db/changelog/202504082211.sql
+ - changeSet:
+ id: 202504092312
+ author: John
+ changes:
+ - sqlFile:
+ encoding: utf8
+ path: classpath:db/changelog/202504092312.sql
+ - changeSet:
+ id: 202504092335
+ author: John
+ changes:
+ - sqlFile:
+ encoding: utf8
+ path: classpath:db/changelog/202504092335.sql
\ No newline at end of file
From 81d2571f8f8d820a9a7759546b1bbf78d26e09cc Mon Sep 17 00:00:00 2001
From: hrz <1710360675@qq.com>
Date: Thu, 10 Apr 2025 10:33:55 +0800
Subject: [PATCH 22/22] =?UTF-8?q?update:=E5=8F=82=E6=95=B0=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=EF=BC=8C=E5=80=BC=E7=B1=BB=E5=9E=8B=E5=BC=BA=E6=A0=A1?=
=?UTF-8?q?=E9=AA=8C=20(#725)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../xiaozhi/common/exception/ErrorCode.java | 8 +++
.../xiaozhi/modules/sys/dto/SysParamsDTO.java | 6 ++
.../modules/sys/entity/SysParamsEntity.java | 4 ++
.../service/impl/SysParamsServiceImpl.java | 45 ++++++++++++++
.../resources/db/changelog/202504092312.sql | 50 ---------------
.../resources/db/changelog/202504092313.sql | 61 +++++++++++++++++++
.../db/changelog/db.changelog-master.yaml | 4 +-
.../main/resources/i18n/messages.properties | 6 ++
.../resources/i18n/messages_en_US.properties | 9 ++-
.../resources/i18n/messages_zh_CN.properties | 9 ++-
.../resources/i18n/messages_zh_TW.properties | 9 ++-
.../main/resources/i18n/validation.properties | 2 +
.../i18n/validation_en_US.properties | 2 +
.../i18n/validation_zh_CN.properties | 2 +
.../i18n/validation_zh_TW.properties | 6 +-
main/manager-web/src/apis/api.js | 5 +-
16 files changed, 168 insertions(+), 60 deletions(-)
delete mode 100644 main/manager-api/src/main/resources/db/changelog/202504092312.sql
create mode 100644 main/manager-api/src/main/resources/db/changelog/202504092313.sql
diff --git a/main/manager-api/src/main/java/xiaozhi/common/exception/ErrorCode.java b/main/manager-api/src/main/java/xiaozhi/common/exception/ErrorCode.java
index e5365b3c6..4497a0958 100644
--- a/main/manager-api/src/main/java/xiaozhi/common/exception/ErrorCode.java
+++ b/main/manager-api/src/main/java/xiaozhi/common/exception/ErrorCode.java
@@ -43,4 +43,12 @@ public interface ErrorCode {
int PASSWORD_WEAK_ERROR = 10031;
int DEL_MYSELF_ERROR = 10032;
int DEVICE_CAPTCHA_ERROR = 10033;
+
+ // 参数校验相关错误码
+ int PARAM_VALUE_NULL = 10034;
+ int PARAM_TYPE_NULL = 10035;
+ int PARAM_TYPE_INVALID = 10036;
+ int PARAM_NUMBER_INVALID = 10037;
+ int PARAM_BOOLEAN_INVALID = 10038;
+ int PARAM_ARRAY_INVALID = 10039;
}
diff --git a/main/manager-api/src/main/java/xiaozhi/modules/sys/dto/SysParamsDTO.java b/main/manager-api/src/main/java/xiaozhi/modules/sys/dto/SysParamsDTO.java
index 7b4dd28df..ad816b350 100644
--- a/main/manager-api/src/main/java/xiaozhi/modules/sys/dto/SysParamsDTO.java
+++ b/main/manager-api/src/main/java/xiaozhi/modules/sys/dto/SysParamsDTO.java
@@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
+import jakarta.validation.constraints.Pattern;
import lombok.Data;
import xiaozhi.common.utils.DateUtils;
import xiaozhi.common.validator.group.AddGroup;
@@ -36,6 +37,11 @@ public class SysParamsDTO implements Serializable {
@NotBlank(message = "{sysparams.paramvalue.require}", groups = DefaultGroup.class)
private String paramValue;
+ @Schema(description = "值类型")
+ @NotBlank(message = "{sysparams.valuetype.require}", groups = DefaultGroup.class)
+ @Pattern(regexp = "^(string|number|boolean|array)$", message = "{sysparams.valuetype.pattern}", groups = DefaultGroup.class)
+ private String valueType;
+
@Schema(description = "备注")
private String remark;
diff --git a/main/manager-api/src/main/java/xiaozhi/modules/sys/entity/SysParamsEntity.java b/main/manager-api/src/main/java/xiaozhi/modules/sys/entity/SysParamsEntity.java
index 989800e24..c51c46fab 100644
--- a/main/manager-api/src/main/java/xiaozhi/modules/sys/entity/SysParamsEntity.java
+++ b/main/manager-api/src/main/java/xiaozhi/modules/sys/entity/SysParamsEntity.java
@@ -25,6 +25,10 @@ public class SysParamsEntity extends BaseEntity {
* 参数值
*/
private String paramValue;
+ /**
+ * 值类型:string-字符串,number-数字,boolean-布尔,array-数组
+ */
+ private String valueType;
/**
* 类型 0:系统参数 1:非系统参数
*/
diff --git a/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java b/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java
index e12e934df..3c7d596f8 100644
--- a/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java
+++ b/main/manager-api/src/main/java/xiaozhi/modules/sys/service/impl/SysParamsServiceImpl.java
@@ -70,6 +70,8 @@ public class SysParamsServiceImpl extends BaseServiceImpl{time:YYMMDD HH:mm:ss}[{version}_{selected_module}][{extra[tag]}]-{level}-{message}', 1, '控制台日志格式');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (5, 'log.log_format_file', '{time:YYYY-MM-DD HH:mm:ss} - {version}_{selected_module} - {name} - {level} - {extra[tag]} - {message}', 1, '文件日志格式');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (6, 'log.log_level', 'INFO', 1, '日志级别');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (7, 'log.log_dir', 'tmp', 1, '日志目录');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (8, 'log.log_file', 'server.log', 1, '日志文件名');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (9, 'log.data_dir', 'data', 1, '数据目录');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (10, 'delete_audio', 'true', 1, '是否删除使用后的音频文件');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (11, 'close_connection_no_voice_time', '120', 1, '无语音输入断开连接时间(秒)');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (12, 'tts_timeout', '10', 1, 'TTS请求超时时间(秒)');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (13, 'enable_wakeup_words_response_cache', 'true', 1, '是否开启唤醒词加速');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (14, 'enable_greeting', 'true', 1, '是否开启开场回复');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (15, 'enable_stop_tts_notify', 'false', 1, '是否开启结束提示音');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (16, 'stop_tts_notify_voice', 'config/assets/tts_notify.mp3', 1, '结束提示音文件路径');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (17, 'exit_commands', '["退出","关闭"]', 1, '退出命令列表');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (18, 'xiaozhi', '{
- "type": "hello",
- "version": 1,
- "transport": "websocket",
- "audio_params": {
- "format": "opus",
- "sample_rate": 16000,
- "channels": 1,
- "frame_duration": 60
- }
-}', 1, '小智类型');
-INSERT INTO `sys_params` (id, param_code, param_value, param_type, remark) VALUES (19, 'wakeup_words', '["你好小智","你好小志","小爱同学","你好小鑫","你好小新","小美同学","小龙小龙","喵喵同学","小滨小滨","小冰小冰"]', 1, '唤醒词列表');
diff --git a/main/manager-api/src/main/resources/db/changelog/202504092313.sql b/main/manager-api/src/main/resources/db/changelog/202504092313.sql
new file mode 100644
index 000000000..da924bdae
--- /dev/null
+++ b/main/manager-api/src/main/resources/db/changelog/202504092313.sql
@@ -0,0 +1,61 @@
+-- 本文件用于初始化系统参数数据,无需手动执行,在项目启动时会自动执行
+-- --------------------------------------------------------
+-- 初始化参数管理配置
+DROP TABLE IF EXISTS sys_params;
+-- 参数管理
+create table sys_params
+(
+ id bigint NOT NULL COMMENT 'id',
+ param_code varchar(100) COMMENT '参数编码',
+ param_value varchar(2000) COMMENT '参数值',
+ value_type varchar(20) default 'string' COMMENT '值类型:string-字符串,number-数字,boolean-布尔,array-数组',
+ param_type tinyint unsigned default 1 COMMENT '类型 0:系统参数 1:非系统参数',
+ remark varchar(200) COMMENT '备注',
+ creator bigint COMMENT '创建者',
+ create_date datetime COMMENT '创建时间',
+ updater bigint COMMENT '更新者',
+ update_date datetime COMMENT '更新时间',
+ primary key (id),
+ unique key uk_param_code (param_code)
+)ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='参数管理';
+
+-- 服务器配置
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (100, 'server.ip', '0.0.0.0', 'string', 1, '服务器监听IP地址');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (101, 'server.port', '8000', 'number', 1, '服务器监听端口');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (102, 'server.secret', 'null', 'string', 1, '服务器密钥');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (201, 'log.log_format', '{time:YYMMDD HH:mm:ss}[{version}_{selected_module}][{extra[tag]}]-{level}-{message}', 'string', 1, '控制台日志格式');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (202, 'log.log_format_file', '{time:YYYY-MM-DD HH:mm:ss} - {version}_{selected_module} - {name} - {level} - {extra[tag]} - {message}', 'string', 1, '文件日志格式');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (203, 'log.log_level', 'INFO', 'string', 1, '日志级别');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (204, 'log.log_dir', 'tmp', 'string', 1, '日志目录');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (205, 'log.log_file', 'server.log', 'string', 1, '日志文件名');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (206, 'log.data_dir', 'data', 'string', 1, '数据目录');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (301, 'delete_audio', 'true', 'boolean', 1, '是否删除使用后的音频文件');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (302, 'close_connection_no_voice_time', '120', 'number', 1, '无语音输入断开连接时间(秒)');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (303, 'tts_timeout', '10', 'number', 1, 'TTS请求超时时间(秒)');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (304, 'enable_wakeup_words_response_cache', 'true', 'boolean', 1, '是否开启唤醒词加速');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (305, 'enable_greeting', 'true', 'boolean', 1, '是否开启开场回复');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (306, 'enable_stop_tts_notify', 'false', 'boolean', 1, '是否开启结束提示音');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (307, 'stop_tts_notify_voice', 'config/assets/tts_notify.mp3', 'string', 1, '结束提示音文件路径');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (308, 'exit_commands', '退出;关闭', 'array', 1, '退出命令列表');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (309, 'xiaozhi', '{
+ "type": "hello",
+ "version": 1,
+ "transport": "websocket",
+ "audio_params": {
+ "format": "opus",
+ "sample_rate": 16000,
+ "channels": 1,
+ "frame_duration": 60
+ }
+}', 'string', 1, '小智类型');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (310, 'wakeup_words', '你好小智;你好小志;小爱同学;你好小鑫;你好小新;小美同学;小龙小龙;喵喵同学;小滨小滨;小冰小冰', 'array', 1, '唤醒词列表,用于识别唤醒词');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (400, 'plugin.weather.api_key', 'a861d0d5e7bf4ee1a83d9a9e4f96d4da', 'string', 1, '天气插件API密钥');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (401, 'plugin.weather.default_location', '广州', 'string', 1, '天气插件默认城市');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (410, 'plugin.news.default_rss_url', 'https://www.chinanews.com.cn/rss/society.xml', 'string', 1, '新闻插件默认RSS地址');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (411, 'plugin.news.category_urls', '{"society":"https://www.chinanews.com.cn/rss/society.xml","world":"https://www.chinanews.com.cn/rss/world.xml","finance":"https://www.chinanews.com.cn/rss/finance.xml"}', 'string', 1, '新闻插件分类RSS地址');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (421, 'plugin.home_assistant.devices', '客厅,玩具灯,switch.cuco_cn_460494544_cp1_on_p_2_1;卧室,台灯,switch.iot_cn_831898993_socn1_on_p_2_1', 'array', 1, 'Home Assistant设备列表');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (422, 'plugin.home_assistant.base_url', 'http://homeassistant.local:8123', 'string', 1, 'Home Assistant服务器地址');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (423, 'plugin.home_assistant.api_key', '你的home assistant api访问令牌', 'string', 1, 'Home Assistant API密钥');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (430, 'plugin.music.music_dir', './music', 'string', 1, '音乐文件存放路径');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (431, 'plugin.music.music_ext', 'mp3;wav;p3', 'array', 1, '音乐文件类型');
+INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (432, 'plugin.music.refresh_time', '300', 'number', 1, '音乐列表刷新间隔(秒)');
diff --git a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml
index 57e6f6b10..f0ac310f1 100755
--- a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml
+++ b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml
@@ -38,12 +38,12 @@ databaseChangeLog:
encoding: utf8
path: classpath:db/changelog/202504082211.sql
- changeSet:
- id: 202504092312
+ id: 202504092313
author: John
changes:
- sqlFile:
encoding: utf8
- path: classpath:db/changelog/202504092312.sql
+ path: classpath:db/changelog/202504092313.sql
- changeSet:
id: 202504092335
author: John
diff --git a/main/manager-api/src/main/resources/i18n/messages.properties b/main/manager-api/src/main/resources/i18n/messages.properties
index 91e6a2850..ce6cf61ba 100644
--- a/main/manager-api/src/main/resources/i18n/messages.properties
+++ b/main/manager-api/src/main/resources/i18n/messages.properties
@@ -34,3 +34,9 @@
10031=\u5F31\u5BC6\u7801
10032=\u5220\u9664\u672C\u6570\u636E\u5F02\u5E38
10033=\u8BBE\u5907\u9A8C\u8BC1\u7801\u9519\u8BEF
+10034=\u53C2\u6570\u503C\u4E0D\u80FD\u4E3A\u7A7A
+10035=\u53C2\u6570\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A
+10036=\u4E0D\u652F\u6301\u7684\u53C2\u6570\u7C7B\u578B
+10037=\u53C2\u6570\u503C\u5FC5\u987B\u662F\u6709\u6548\u7684\u6570\u5B57
+10038=\u53C2\u6570\u503C\u5FC5\u987B\u662Ftrue\u6216false
+10039=\u53C2\u6570\u503C\u5FC5\u987B\u662F\u6709\u6548\u7684JSON\u6570\u7EC4\u683C\u5F0F
diff --git a/main/manager-api/src/main/resources/i18n/messages_en_US.properties b/main/manager-api/src/main/resources/i18n/messages_en_US.properties
index 515de18a0..d6c1bc0cb 100644
--- a/main/manager-api/src/main/resources/i18n/messages_en_US.properties
+++ b/main/manager-api/src/main/resources/i18n/messages_en_US.properties
@@ -32,4 +32,11 @@
10030=The password is less than {0} digits.
10031=The password must consist of numbers, uppercase and lowercase letters, and special characters at the same time
10032=Exception in deleting this data
-10033=Device verification code error
\ No newline at end of file
+10033=Device verification code error
+
+10034=Parameter value cannot be empty
+10035=Parameter type cannot be empty
+10036=Unsupported parameter type
+10037=Parameter value must be a valid number
+10038=Parameter value must be true or false
+10039=Parameter value must be a valid JSON array format
\ No newline at end of file
diff --git a/main/manager-api/src/main/resources/i18n/messages_zh_CN.properties b/main/manager-api/src/main/resources/i18n/messages_zh_CN.properties
index 23b9abfa8..566ca0c98 100644
--- a/main/manager-api/src/main/resources/i18n/messages_zh_CN.properties
+++ b/main/manager-api/src/main/resources/i18n/messages_zh_CN.properties
@@ -32,4 +32,11 @@
10030=\u5BC6\u7801\u957F\u5EA6\u4E0D\u8DB3{0}\u4F4D
10031=\u5BC6\u7801\u5FC5\u987B\u540C\u65F6\u5305\u542B\u6570\u5B57\u3001\u5927\u5C0F\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26\u7EC4\u6210
10032=\u5220\u9664\u672C\u6570\u636E\u5F02\u5E38
-10033=\u8BBE\u5907\u9A8C\u8BC1\u7801\u9519\u8BEF
\ No newline at end of file
+10033=\u8BBE\u5907\u9A8C\u8BC1\u7801\u9519\u8BEF
+
+10034=\u53C2\u6570\u503C\u4E0D\u80FD\u4E3A\u7A7A
+10035=\u53C2\u6570\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A
+10036=\u4E0D\u652F\u6301\u7684\u53C2\u6570\u7C7B\u578B
+10037=\u53C2\u6570\u503C\u5FC5\u987B\u662F\u6709\u6548\u7684\u6570\u5B57
+10038=\u53C2\u6570\u503C\u5FC5\u987B\u662Ftrue\u6216false
+10039=\u53C2\u6570\u503C\u5FC5\u987B\u662F\u6709\u6548\u7684JSON\u6570\u7EC4\u683C\u5F0F
\ No newline at end of file
diff --git a/main/manager-api/src/main/resources/i18n/messages_zh_TW.properties b/main/manager-api/src/main/resources/i18n/messages_zh_TW.properties
index 2a6bd8d0d..a5d81697f 100644
--- a/main/manager-api/src/main/resources/i18n/messages_zh_TW.properties
+++ b/main/manager-api/src/main/resources/i18n/messages_zh_TW.properties
@@ -32,4 +32,11 @@
10030=\u5BC6\u78BC\u9577\u5EA6\u4E0D\u8DB3{0}\u4F4D
10031=\u5BC6\u78BC\u5FC5\u9808\u540C\u6642\u5305\u542B\u6578\u5B57\u3001\u5927\u5C0F\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26\u7D44\u6210
10032=\u522A\u9664\u6B64\u6578\u64DA\u7570\u5E38
-10033=\u8A2D\u5099\u9A57\u8B49\u78BC\u932F\u8AA4
\ No newline at end of file
+10033=\u8A2D\u5099\u9A57\u8B49\u78BC\u932F\u8AA4
+
+10034=\u53C3\u6578\u503C\u4E0D\u80FD\u70BA\u7A7A
+10035=\u53C3\u6578\u985E\u578B\u4E0D\u80FD\u70BA\u7A7A
+10036=\u4E0D\u652F\u63F4\u7684\u53C3\u6578\u985E\u578B
+10037=\u53C3\u6578\u503C\u5FC5\u9808\u662F\u6709\u6548\u7684\u6578\u5B57
+10038=\u53C3\u6578\u503C\u5FC5\u9808\u662Ftrue\u6216false
+10039=\u53C3\u6578\u503C\u5FC5\u9808\u662F\u6709\u6548\u7684JSON\u6578\u7D44\u683C\u5F0F
\ No newline at end of file
diff --git a/main/manager-api/src/main/resources/i18n/validation.properties b/main/manager-api/src/main/resources/i18n/validation.properties
index 008f2a03d..dd9b47e8c 100644
--- a/main/manager-api/src/main/resources/i18n/validation.properties
+++ b/main/manager-api/src/main/resources/i18n/validation.properties
@@ -12,6 +12,8 @@ sysdict.label.require=\u5B57\u5178\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A
sysparams.paramcode.require=\u53C2\u6570\u7F16\u7801\u4E0D\u80FD\u4E3A\u7A7A
sysparams.paramvalue.require=\u53C2\u6570\u503C\u4E0D\u80FD\u4E3A\u7A7A
+sysparams.valuetype.require=\u503C\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A
+sysparams.valuetype.pattern=\u503C\u7C7B\u578B\u5FC5\u987B\u662F string\u3001number\u3001boolean \u6216 array
sysuser.username.require=\u7528\u6237\u540D\u4E0D\u80FD\u4E3A\u7A7A
sysuser.password.require=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
diff --git a/main/manager-api/src/main/resources/i18n/validation_en_US.properties b/main/manager-api/src/main/resources/i18n/validation_en_US.properties
index 2840d6058..efb2c296b 100644
--- a/main/manager-api/src/main/resources/i18n/validation_en_US.properties
+++ b/main/manager-api/src/main/resources/i18n/validation_en_US.properties
@@ -12,6 +12,8 @@ sysdict.label.require=Dictionary tag cannot be empty
sysparams.paramcode.require=Parameter encoding cannot be empty
sysparams.paramvalue.require=Parameter values cannot be empty
+sysparams.valuetype.require=Value type cannot be empty
+sysparams.valuetype.pattern=Value type must be string, number, boolean or array
sysuser.username.require=The username cannot be empty
sysuser.password.require=The password cannot be empty
diff --git a/main/manager-api/src/main/resources/i18n/validation_zh_CN.properties b/main/manager-api/src/main/resources/i18n/validation_zh_CN.properties
index c86aded73..ebafda82c 100644
--- a/main/manager-api/src/main/resources/i18n/validation_zh_CN.properties
+++ b/main/manager-api/src/main/resources/i18n/validation_zh_CN.properties
@@ -12,6 +12,8 @@ sysdict.label.require=\u5B57\u5178\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A
sysparams.paramcode.require=\u53C2\u6570\u7F16\u7801\u4E0D\u80FD\u4E3A\u7A7A
sysparams.paramvalue.require=\u53C2\u6570\u503C\u4E0D\u80FD\u4E3A\u7A7A
+sysparams.valuetype.require=\u503C\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A
+sysparams.valuetype.pattern=\u503C\u7C7B\u578B\u5FC5\u987B\u662F string\u3001number\u3001boolean \u6216 array
sysuser.username.require=\u7528\u6237\u540D\u4E0D\u80FD\u4E3A\u7A7A
sysuser.password.require=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
diff --git a/main/manager-api/src/main/resources/i18n/validation_zh_TW.properties b/main/manager-api/src/main/resources/i18n/validation_zh_TW.properties
index 23c59eef3..4a1aabd26 100644
--- a/main/manager-api/src/main/resources/i18n/validation_zh_TW.properties
+++ b/main/manager-api/src/main/resources/i18n/validation_zh_TW.properties
@@ -10,8 +10,10 @@ sysdict.type.require=\u5B57\u5178\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A
sysdict.name.require=\u5B57\u5178\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
sysdict.label.require=\u5B57\u5178\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A
-sysparams.paramcode.require=\u53C2\u6570\u7F16\u7801\u4E0D\u80FD\u4E3A\u7A7A
-sysparams.paramvalue.require=\u53C2\u6570\u503C\u4E0D\u80FD\u4E3A\u7A7A
+sysparams.paramcode.require=\u53C3\u6578\u7DE8\u78BC\u4E0D\u80FD\u70BA\u7A7A
+sysparams.paramvalue.require=\u53C3\u6578\u503C\u4E0D\u80FD\u70BA\u7A7A
+sysparams.valuetype.require=\u503C\u985E\u578B\u4E0D\u80FD\u70BA\u7A7A
+sysparams.valuetype.pattern=\u503C\u985E\u578B\u5FC5\u9808\u662F string\u3001number\u3001boolean \u6216 array
sysuser.username.require=\u7528\u6237\u540D\u4E0D\u80FD\u4E3A\u7A7A
sysuser.password.require=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
diff --git a/main/manager-web/src/apis/api.js b/main/manager-web/src/apis/api.js
index 2b5372dda..63977008a 100755
--- a/main/manager-web/src/apis/api.js
+++ b/main/manager-web/src/apis/api.js
@@ -3,16 +3,15 @@ import admin from './module/admin.js'
import agent from './module/agent.js'
import device from './module/device.js'
import model from './module/model.js'
+import timbre from "./module/timbre.js"
import user from './module/user.js'
-import timbre from "./module/timbre.js";
/**
* 接口地址
* 开发时自动读取使用.env.development文件
* 编译时自动读取使用.env.production文件
*/
-// const DEV_API_SERVICE = process.env.VUE_APP_API_BASE_URL
-const DEV_API_SERVICE = 'https://2662r3426b.vicp.fun/xiaozhi'
+const DEV_API_SERVICE = process.env.VUE_APP_API_BASE_URL
/**
* 根据开发环境返回接口url