feat: gravity transaction logging + user-facing history popup

- New GravityTransaction schema tracks all gravity changes (registration,
  interview/optimize/download deduction, purchase, monthly topup, migration)
- GravityTopUpService: bulk log for monthly VIP topup
- PaymentController.activateMembership: log plan_set transactions
- QuotaService: add logTransaction, wire into all gravity-modifying methods
- UserService: log registration grants (phone/wx/email/password)
- GET /user/gravity-transactions?page=&limit= API
- Frontend: user.vue '明细' button + paginated popup
- Docs: update PROJECT-STATUS v4.10, FEATURE-LIST, DEPLOYMENT
This commit is contained in:
yuzhiran
2026-07-04 11:12:55 +08:00
parent d8a7872cd2
commit 2230a95b45
14 changed files with 268 additions and 38 deletions
+9 -6
View File
@@ -1,8 +1,8 @@
# 职引项目 · 状态报告 v4.9
# 职引项目 · 状态报告 v4.10
> **项目版本**: v4.9
> **更新时间**: 2026-06-22
> **项目状态**: ✅ Mongoose 8 兼容修复 + v1.0.17 发布
> **项目版本**: v4.10
> **更新时间**: 2026-07-04
> **项目状态**: ✅ 引力值变动记录系统 + 前端 401/错误处理完善 + v1.0.21 发布
---
@@ -16,7 +16,7 @@
| 定价 | 免费版 / 按量购买引力值(¥5/份) |
| AI 模型 | DeepSeek V4-Flash(主) + Step-3.5-Flash(备) |
| ASR | whisper.cpp(本地部署,tiny/base 模型,无需 API Key |
| 后端模块 | user, interview, resume, member, payment, positions, ai, analyze, upload, admin, email, progress, contribution, daily-question, schedule, interview-review, career-advice |
| 后端模块 | user, interview, resume, member, payment, positions, ai, analyze, upload, admin, email, progress, contribution, daily-question, schedule, interview-review, career-advice, gravity-transaction |
---
@@ -29,6 +29,7 @@
| AI 面试模拟 | **95%** | 多轮对话 + 评分 + 报告 + 进度追踪 |
| 简历诊断/优化 | **95%** | 文件上传 + AI 分析 + 下载 |
| 支付系统(微信) | **95%** | API v3 完整对接,含真实证书,H5 扫码支付可用 |
| 引力值变动记录 | **100%** | 全量日志(注册/消耗/购买/补给/迁移)+ 前端分页查看 |
| 会员系统 | **100%** | 改为按量购买引力值体系(¥5/份),免费版注册送 5 引力值 |
| 护城河 P0-P5 | **100%** | AI 结构化 / 行业基准 / VIP 过期 / 分享卡片 / 打卡积分 / 岗位匹配 |
| 面试复盘 | **100%** | 音频上传 → whisper.cpp ASR → AI 评析 → 口语分析 |
@@ -182,6 +183,7 @@
| `interview-review` | controller + service + schema + asr service | ✅ | 面试复盘:音频 ASR + AI 评析 + 口语分析 |
| `career-advice` | controller + service + module | ✅ | AI 择业顾问:专业分析 + 岗位匹配 + 多轮对话 |
| `admin` | controller + module | ✅ | 管理后台 |
| `gravity-transaction` | schema (shared) | ✅ | 引力值变动全量日志:注册/面试消耗/购买/月度补给/迁移等 |
| `email` | module + service | ✅ | 邮件发送 |
| `upload` | controller + module | ✅ | 文件上传 |
@@ -196,7 +198,7 @@
| 面试模拟 | interview/interview | ✅ 多轮对话 + 计时 |
| 面试报告 | report/report | ✅ 评分/分析/全文回放/分享卡片 |
| 历史记录 | history/history | ✅ 筛选/统计 |
| 个人中心 | user/user | ✅ 引力值卡片 + 信息/统计/管理员入口 + 面试复盘入口 + 择业顾问入口 + 客服按钮 |
| 个人中心 | user/user | ✅ 引力值卡片(含明细弹窗)+ 信息/统计/管理员入口 + 面试复盘入口 + 择业顾问入口 + 客服按钮 |
| 会员中心 | member/member | ✅ 引力值按量购买(H5 扫码支付/小程序剪贴板链路) |
| 进步轨迹 | progress/progress | ✅ 雷达图 + 打卡日历 |
| 面经贡献 | contribute/contribute | ✅ 表单提交 |
@@ -224,6 +226,7 @@
| 日期 | 版本 | 变更内容 | 操作者 |
|------|------|----------|--------|
| 2026-07-04 | **v4.10** | **引力值变动记录系统**:新建 GravityTransaction schema + 全量日志埋点(注册/面试消耗/购买/月度补给/迁移/套餐设置等);新增 `GET /user/gravity-transactions` 接口;用户端「引力值明细」弹窗(分页);前端 401/错误处理完善(checkAuth 全局检测);面试创建 201 状态码兼容 fix;AI 错误友好提示 | AI |
| 2026-06-22 | **v4.9** | **Mongoose 8 兼容修复**pre-save hook 回调→async);v1.0.17 tag 发布;测试账号 test@yzrcloud.cn 重建 | AI |
| 2026-06-21 | **v4.8** | **SEO 全量优化**canonical URL、robots.txt、sitemap.xml、结构化数据);**微信分享全面开启**(13 个页面 onShareAppMessage + onShareTimeline);**版本号自动注入**Vite define __APP_VERSION__);**导航栏/Tab标题关键词优化**;manifest 描述更新;页面描述统一增强 | AI |
| 2026-06-21 | v4.7 | 按量购买引力值体系重构(¥5/份取代月订阅);member.vue 完全重写;微信小程序剪贴板购买链路;客服按钮;管理后台字段全面完善;代码清理;测试数据清理;后端/H5/小程序全量部署上线 | AI |