feat(task): 新增定时任务控制系统与分享码配置

- 增加设备持久化、阻抗数据持久化、分享码持久化定时任务
- 通过环境变量 ENABLE_PERSIST_TASK 和 ENABLE_IMPEDANCE_PERSIST_TASK 控制任务启用
- 分享码配置新增最大数量和TTL时间支持多种时间单位(m/h/d)
- 实现任务批量处理、锁机制及失败重试保障数据一致性
- 定时任务启动集成至服务主流程,增强系统可配置性和运维便利性

feat(ota): 新增根据设备型号和版本号查询版本名称接口

- 实现 GET /audio/getVerName 接口返回唯一 OTA 版本名称 verName
- 添加请求参数校验及错误处理逻辑
- 在仓库层新增按型号和版本号查询版本名称的方法
- 完善接口文档及Swagger定义,支持前端调用查询版本名称功能
This commit is contained in:
eafonyang
2026-09-02 11:13:14 +08:00
parent ceea657ccf
commit dd92845bc2
8 changed files with 273 additions and 21 deletions
+48
View File
@@ -252,6 +252,54 @@ const docTemplate = `{
}
}
},
"/audio/getVerName": {
"get": {
"description": "根据设备型号和版本号(verCode)定位唯一 OTA 记录,返回版本名称 verName",
"produces": [
"application/json"
],
"tags": [
"OTA"
],
"summary": "查询版本名称",
"parameters": [
{
"type": "string",
"description": "设备型号",
"name": "model",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "版本号 (verCode)",
"name": "version",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "成功返回 verName",
"schema": {
"type": "object"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object"
}
}
}
}
},
"/audio/modelCurve": {
"get": {
"description": "返回指定机型的频响曲线数据(fr),固定使用 Harman over-ear 2018 target",