iotsaas/backend/sql/V14__add_xfyun_platform_config.sql
2995840376 0ce191c448 chore: 初始化 iotsaas 版本库基线
纳入范围:
- backend/  Spring Boot 多模块后端(iot-common/device/rule/data/alarm/auth)
- frontend/admin/  Vue3 + Element Plus 管理后台
- Android/   涂鸦原生 APP (com.xhai.iot)
- backend/sql/  Flyway 风格迁移脚本(V2~V21)
- docs/       对接文档与设计文档

排除范围:
- 构建产物: node_modules/ target/ build/ dist/ .gradle/
- 签名密钥: *.jks *.keystore (严禁入库)
- 本机配置: Android/local.properties
- 运行日志: logs/ *.log
- AI 协作本地数据 .codebuddy/ 与第三方 demo tuya-demo/

.gitattributes 统一以 LF 存储, Windows 批处理保留 CRLF
2026-10-27 12:00:41 +08:00

18 lines
1.2 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- V14: 新增「讯飞(语音听写)」平台配置
-- 用途:在后台管理页面「平台集成」中维护讯飞语音听写凭证,
-- 供 APP 端 AI 助手的语音输入使用(长按麦克风说话 → 讯飞流式识别)。
-- 字段映射(复用现有列,无需 ALTER):access_id=APPID,api_key=APIKey,access_secret=APISecret
-- 安全设计:APISecret 只存于服务端,APP 通过 GET /api/v1/ai/speech/auth 领取
-- 带签名的临时 wss 地址后直连讯飞,凭证不下发到客户端。
-- 优先级:platform_config(xfyun, enabled=1 且三项齐全) > application.yml 的 ai.xfyun.* > 语音识别不可用(回退系统识别/键盘)
INSERT INTO `platform_config`
(`id`, `platform_code`, `platform_name`, `tenant_id`, `enabled`, `access_id`, `access_secret`,
`api_key`, `model_name`, `base_url`, `timeout_ms`, `api_region`, `region`, `remark`,
`create_time`, `update_time`, `deleted`)
VALUES
(3, 'xfyun', '讯飞(语音听写)', 0, 0, '', '',
'', '', '', 3000, 'cn', '',
'在讯飞开放平台(console.xfyun.cn)创建应用并开通「语音听写(流式版)」后,填入 APPID/APIKey/APISecret 并启用,用于 APP 端 AI 助手语音输入',
NOW(), NOW(), 0);