Commit Graph

13 Commits

Author SHA1 Message Date
yuzhiran 2230a95b45 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
2026-07-04 11:12:55 +08:00
yuzhiran 52e5350ba0 补充 VP 模块注册 + 前端 API 封装
- app.module.ts: 注册 VirtualPaymentModule
- config.ts + api.ts: 添加虚拟支付 API 端点
- useGravityPurchase.ts: VP 购买逻辑
- interview.vue / user.vue: 适配 VP 调用
- admin.controller.ts: 管理端虚拟支付相关调整
- payment.controller.spec.ts: 测试适配
2026-06-24 10:35:25 +08:00
yuzhiran 2fbab1072f feat: unified gravity system - VIP members consume gravity instead of unlimited; add monthly gravity top-up cron 2026-06-19 22:43:52 +08:00
yuzhiran 6a3cc8544e fix: handle WeChat Pay public key mode in callback
- verifyAndDecrypt now processes decryption even when signature
  verification fails (decryption key is separate from signature key)
- Notify handler uses returnRaw flag to always decrypt resource
- Loud log when pub_key.pem verification fails, directs admin
  to download correct public key from merchant platform
2026-06-18 19:36:19 +08:00
yuzhiran c161ffbc3c feat: payment refund support + admin payment management
- Add refund()/queryRefund()/downloadPlatformCerts() to WechatPayService
- Add refundId field to PaymentOrder schema
- Fix WeChat Pay callback to auto-download platform certs on verification failure
- Fix syncOrder to handle sprint plan properly
- Add admin refund, refund-query, order-detail endpoints
- Add refund UI (button, modal, query) to admin.vue orders tab
- Fix member.vue MP payment: pass outTradeNo instead of prepayId to pollPayResult
2026-06-18 19:33:10 +08:00
yuzhiran 18c50726cd fix: WeChat login Content-Type header, ASR tiny model, re-upload mini-program v1.0.11 2026-06-15 10:00:22 +08:00
yuzhiran 8191cf4b41 feat: realistic face avatar + voice input + ASR endpoint 2026-06-12 15:32:04 +08:00
yuzhiran d379d181e4 feat: Admin定价管理界面 + 定价DB配置化 (P2) 2026-06-12 09:52:04 +08:00
yuzhiran 065fe7a186 feat: 付费体系重构 P0 - 配额独立化/简历付费下载/PDF生成 2026-06-12 09:31:11 +08:00
yuzhiran e6b79ddb21 v4.3 安全修复+代码质量+测试体系+护城河验证
## 安全修复 (5项)
- CRITICAL JWT 硬编码 fallback(jwt.strategy / app.module / user.module)
- HIGH seed_admin.js MongoDB 凭据泄漏
- MEDIUM 邮箱验证码泄漏
- MEDIUM 支付订单查询 IDOR
- MEDIUM 管理后台 NoSQL 注入

## 代码质量 (14处)
- console.log→Logger(user.service.ts)
- as any 类型化(11处跨7个文件)
- Schema 联合类型修复(progress.schema)
- Module 依赖缺失修复(progress.module)

## 测试体系 (61项)
- 后端单元测试 Jest(43项):BenchmarkService/UserService/PaymentController
- 后端集成测试 Supertest(11项):API 认证/支付/进度/管理
- 前端单元测试 Vitest(7项):配置文件/API端点
- 浏览器自动化 Playwright(7项):API smoke test
- 覆盖率报告 + e2e 配置

## 护城河 P0-P5 启动验证通过 + 编译通过
2026-06-11 10:27:35 +08:00
yuzhiran 9276ab9028 v4.2 冲刺版+每日推送+支付修复+全量代码评审
## 新增功能
- 冲刺版 ¥49.9/月:完整支付→激活→权益扣减链路
- 每日一题定时推送(@nestjs/schedule,早8点微信订阅消息)
- miniprogram-ci 编译上传脚本(scripts/upload-mp.js)

## Bug修复
- 套餐值统一:vip→growth/sprint(interview轮次限制、analyze次数检查)
- member/pay 移除开发绕过:改为订单校验后激活
- progress→report 参数名不匹配:id→interviewId
- result.vue resume.create() 参数传错(对象→独立参数)
- resume.vue analyze请求缺少Authorization header
- bank.vue contribution请求缺少Authorization header
- member.vue startPay() 缺少try/catch导致网络错误崩溃
- login.vue 调试面板 v-if="true" 生产泄漏

## 配置
- 微信支付生产证书就位(商户号1113760598)
- .env 清理冗余文件(删除.example/.production)
- WX_NOTIFY_URL 更新为 zhiyinwx.yzrcloud.cn

## 文档
- PROJECT-STATUS.md v4.1→v4.2,状态全面更新
- DEPLOYMENT.md 新增小程序编译上传章节、清理检查清单
2026-06-09 20:03:05 +08:00
yuzhiran 37cfdfe93c feat: 登录页密码+验证码双模式 / 首页岗位优化 / 法律页面 / 后端接口完善
- 前端:登录页重构,支持密码登录、验证码登录、注册三种模式
- 前端:首页热门岗位添加「参考示例」标签,去虚构数据
- 前端:面试页顶部优化,岗位名+状态标签展示
- 前端:新增用户协议、隐私政策页面及免责声明
- 后端:新增 POST /api/user/register 注册接口
- 后端:新增 POST /api/user/set-password 设置密码接口
- 后端:修复 user.schema.ts unique 索引导致 null 冲突问题
- 后端:新增 payment-order.schema、positions.schema、site-config.schema
- 后端:package.json 新增 postbuild 脚本自动复制证书
- 管理后台:新增订单管理 Tab
2026-06-09 15:39:17 +08:00
yuzhiran 511f60d0db 初始化:职引项目 v1.0 2026-06-08 16:28:00 +08:00