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
+32
View File
@@ -162,6 +162,38 @@ paths:
summary: 获取耳机原始频响 CSV 数据
tags:
- Curve
/audio/getVerName:
get:
description: 根据设备型号和版本号(verCode)定位唯一 OTA 记录,返回版本名称 verName
parameters:
- description: 设备型号
in: query
name: model
required: true
type: string
- description: 版本号 (verCode)
in: query
name: version
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 成功返回 verName
schema:
type: object
"400":
description: Bad Request
schema:
type: object
"500":
description: Internal Server Error
schema:
type: object
summary: 查询版本名称
tags:
- OTA
/audio/modelCurve:
get:
description: 返回指定机型的频响曲线数据(fr),固定使用 Harman over-ear 2018 target