feat: P1-P3 全栈集成 — 数据库基础 + DWS 扩展 + 小程序鉴权 + 工程化体系

## P1 数据库基础
- zqyy_app: 创建 auth/biz schema、FDW 连接 etl_feiqiu
- etl_feiqiu: 创建 app schema RLS 视图、商品库存预警表
- 清理 assistant_abolish 残留数据

## P2 ETL/DWS 扩展
- 新增 DWS 助教订单贡献度表 (dws.assistant_order_contribution)
- 新增 assistant_order_contribution_task 任务及 RLS 视图
- member_consumption 增加充值字段、assistant_daily 增加处罚字段
- 更新 ODS/DWD/DWS 任务文档及业务规则文档
- 更新 consistency_checker、flow_runner、task_registry 等核心模块

## P3 小程序鉴权系统
- 新增 xcx_auth 路由/schema(微信登录 + JWT)
- 新增 wechat/role/matching/application 服务层
- zqyy_app 鉴权表迁移 + 角色权限种子数据
- auth/dependencies.py 支持小程序 JWT 鉴权

## 文档与审计
- 新增 DOCUMENTATION-MAP 文档导航
- 新增 7 份 BD_Manual 数据库变更文档
- 更新 DDL 基线快照(etl_feiqiu 6 schema + zqyy_app auth)
- 新增全栈集成审计记录、部署检查清单更新
- 新增 BACKLOG 路线图、FDW→Core 迁移计划

## Kiro 工程化
- 新增 5 个 Spec(P1/P2/P3/全栈集成/核心业务)
- 新增审计自动化脚本(agent_on_stop/build_audit_context/compliance_prescan)
- 新增 6 个 Hook(合规检查/会话日志/提交审计等)
- 新增 doc-map steering 文件

## 运维与测试
- 新增 ops 脚本:迁移验证/API 健康检查/ETL 监控/集成报告
- 新增属性测试:test_dws_contribution / test_auth_system
- 清理过期 export 报告文件
- 更新 .gitignore 排除规则
This commit is contained in:
Neo
2026-02-26 08:03:53 +08:00
parent fafc95e64c
commit b25308c3f4
224 changed files with 17660 additions and 32198 deletions

49
docs/h5_ui/js/ai-icons.js Normal file
View File

@@ -0,0 +1,49 @@
/**
* AI Icon 通用初始化脚本
* - 页面加载时随机分配配色
* - 嵌入 Icon 注入机器人 SVG
* - 渲染星级评价组件
*/
(function () {
var ROBOT_SVG = '<svg viewBox="0 0 24 24" fill="none"><rect x="5" y="7" width="14" height="12" rx="4" fill="white"/><path d="M12 7V4" stroke="white" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="3" r="1.5" fill="white"/><circle cx="9" cy="11.5" r="2" fill="#667eea"/><circle cx="15" cy="11.5" r="2" fill="#667eea"/><circle cx="9.5" cy="11" r="0.7" fill="white"/><circle cx="15.5" cy="11" r="0.7" fill="white"/><path d="M9.5 15C10 16 14 16 14.5 15" stroke="#667eea" stroke-width="1.5" stroke-linecap="round"/><circle cx="7" cy="13.5" r="1" fill="#f5a0c0" opacity="0.6"/><circle cx="17" cy="13.5" r="1" fill="#f5a0c0" opacity="0.6"/><rect x="3" y="10" width="2" height="4" rx="1" fill="white"/><rect x="19" y="10" width="2" height="4" rx="1" fill="white"/></svg>';
var COLOR_CLASSES = [
'ai-color-red', 'ai-color-orange', 'ai-color-yellow',
'ai-color-blue', 'ai-color-indigo', 'ai-color-purple'
];
// 随机选一个配色(同一页面统一)
var pick = COLOR_CLASSES[Math.floor(Math.random() * COLOR_CLASSES.length)];
// 给所有嵌入 Icon 和 title badge 加上配色 class
document.querySelectorAll('.ai-inline-icon, .ai-title-badge').forEach(function (el) {
el.classList.add(pick);
});
// 嵌入 Icon如果内部没有 SVG自动注入机器人
document.querySelectorAll('.ai-inline-icon').forEach(function (el) {
if (!el.querySelector('svg')) {
el.innerHTML = ROBOT_SVG;
}
});
// 渲染星级评价
document.querySelectorAll('.star-rating').forEach(function (container) {
var score = parseInt(container.getAttribute('data-score') || '0', 10);
score = Math.max(0, Math.min(10, score));
var fullStars = Math.floor(score / 2);
var halfStar = score % 2 === 1;
var html = '';
for (var i = 0; i < 5; i++) {
var fillWidth = '0%';
if (i < fullStars) fillWidth = '100%';
else if (i === fullStars && halfStar) fillWidth = '50%';
html += '<span class="star">'
+ '<svg class="star-empty" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>'
+ '<span class="star-fill" style="width:' + fillWidth + '">'
+ '<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>'
+ '</span></span>';
}
container.innerHTML = html;
});
})();