Files
vmall/openspec/changes/add-points-mall/tasks.md
T
Chengdong ZhangandCursor 53548196f8 docs(openspec): plan shop coupons, accounts, points, flash sales, and group buying
Capture exclusive promotion composition, empty-group cancel, and mall surface scope so the five marketing changes can be implemented without stacking or lifecycle ambiguity.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 17:32:08 +08:00

1.6 KiB

1. Prerequisite and persistence

  • 1.1 Confirm customer-accounts is archived and use its guarded internal points-debit service.
  • 1.2 Add additive migrations for platform points products, redemption orders, redemption items, status constraints, address snapshots, and indexes.
  • 1.3 Implement the Rust points module repositories and services for published catalog reads, admin product management, atomic redemption, history, and validated fulfillment transitions.

2. Contract and backend proof

  • 2.1 Register customer and platform routes with appropriate roles and add shared types, client methods, locales, and fixed-data adapter parity.
  • 2.2 Add integration tests for unpublished-product rejection, insufficient points rollback, concurrent final stock, ownership filtering, and fulfillment transition validation.

3. Application surfaces

  • 3.1 Add platform-admin points-product and redemption-order management screens and admin nav entries using the shared client.
  • 3.2 Replace mall points fixtures with live catalog, address-aware redemption, refreshed balance, and customer redemption history.
  • 3.3 Remove INTEGRAL_PRODUCTS and USER_STATS page imports without deleting fixed-data adapter support.

4. Verification and specification

  • 4.1 Seed deterministic points products and credit demo customer points through the archived customer-accounts credit path (append-only entry, never an absolute balance write). Browser-smoke admin publication and customer redemption.
  • 4.2 Run cargo test for vmall-api, builds for mall and admin, and strict validation for this OpenSpec change.