Files
vmall/openspec/changes/add-flash-sales/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

22 lines
1.9 KiB
Markdown

## 1. Flash-sale domain and contract
- [ ] 1.1 Add additive migrations for shop flash-sale sessions, SKU activity items, reserved stock, per-customer limits, and order-item activity snapshots.
- [ ] 1.2 Implement the Rust flash-sale module with shop-scoped session/item management and public active-session discovery.
- [ ] 1.3 Add shared flash-sale types, client methods, localized strings, and fixed-data adapter parity.
## 2. Checkout price and inventory resolution
- [ ] 2.1 Resolve active eligible activity items server-side during checkout and snapshot final line pricing and activity identity. Reject coupon selection on any shop order that applied flash pricing; restate coupon persistence for non-flash shop orders.
- [ ] 2.2 Conditionally decrement and restore activity inventory with SKU inventory in deterministic lock order; enforce the per-customer limit. Pending-payment cancellation restores both inventories and any redeemed coupon.
- [ ] 2.3 Add integration tests for inactive-window fallback, cross-shop configuration rejection, overlapping group-buy SKU rejection, final reserved-stock contention, customer limits, coupon rejection on flash-priced shop orders, coupon restore on cancel, and cancellation restoration.
## 3. Merchant and mall surfaces
- [ ] 3.1 Add shop-admin session and activity-item management and a flash-sale nav entry scoped to the authenticated shop.
- [ ] 3.2 Replace the mall flash-sale fixture page with active live sessions, products, price, stock, sell-through, and countdown; show snapshotted activity prices on payment and order-detail views.
- [ ] 3.3 Remove affected direct flash-sale fixture imports while retaining fixed-data adapter support.
## 4. Verification and specification
- [ ] 4.1 Seed an active deterministic flash sale and browser-smoke its discovery and checkout pricing path.
- [ ] 4.2 Run cargo test for vmall-api, builds for mall and shop-admin, and strict validation for this OpenSpec change.