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
@@ -51,6 +51,7 @@ describe('PaymentController', () => {
providers: [
{ provide: getModelToken('User'), useValue: mockUserModel },
{ provide: getModelToken('PaymentOrder'), useValue: mockOrderModel },
{ provide: getModelToken('GravityTransaction'), useValue: { create: jest.fn() } },
{ provide: WechatPayService, useValue: mockWechatPay },
{ provide: QuotaService, useValue: mockQuotaService },
{ provide: PricingService, useValue: mockPricingService },