Files
Chengdong Zhang 9e3abf95ef feat(marketing): add threshold promotions (满减)
Shop-scoped threshold rules with bilingual names, integer
threshold/reduction (reduction < threshold), active windows and display
order. Checkout applies the best eligible rule per shop with currency
conversion; coupon/threshold/activity pricing are mutually exclusive per
shop order. Reduction persists in orders.discount_minor +
threshold_promotion_id and flows into payment totals; checkout
idempotency covers the threshold selection. Delete archives referenced
rules, hard-deletes unreferenced ones.

- migration 0026: threshold_promotions + orders.threshold_promotion_id
  + coupon/threshold exclusivity CHECK
- api: modules/promotion (CRUD, preview, checkout integration)
- shared: ThresholdPromotion types, shop CRUD + preview client methods,
  checkout threshold_by_shop
- shop-admin: promotions page + nav + en/zh locales
- mall: exclusive promotion radio on checkout, live preview wiring,
  threshold label on order detail
- tests: promotions.rs (scoping, validation, best-rule, exclusivity,
  activity-priced 409, totals, replay, archive-vs-delete)
- openspec: archived 2026-10-19-add-threshold-promotions; spec
  threshold-promotions created, order/frontend specs updated
2026-10-19 18:14:38 +08:00

39 lines
2.1 KiB
Markdown

# Index: Console apps (shop-admin, admin)
Both are live-only (no mock adapter), Tailwind-token layouts, auth middleware
per page. Navigation is a static list in each `app.vue`.
## apps/shop-admin (merchant console, :3001)
| Page | Domain |
|---|---|
| `pages/index.vue` | dashboard counters |
| `pages/products/{index,new,[id]}.vue` + `components/ProductForm.vue` | product/SKU CRUD, freight template link, SKU weight |
| `pages/orders/` | order list/detail + shipment creation (company selector) |
| `pages/shipments.vue` | shipment list, mark shipped |
| `pages/aftersales/` | after-sale processing workspace |
| `pages/reviews.vue` | review list + one-time reply |
| `pages/coupons.vue`, `promotions.vue`, `flash-sales.vue`, `group-buying.vue` | merchant marketing |
| `pages/invoices.vue` | invoice issuing |
| `pages/freight-templates.vue` | freight templates + region rules |
| `pages/shop-profile.vue` | own shop profile self-edit |
| `pages/settlements.vue` | own-shop statements: list/detail, idempotent generation |
| `pages/shop-account.vue` | shop-owner wallet summary, withdrawal request/history, fund entries |
## apps/admin (platform console, :3002)
| Page | Domain |
|---|---|
| `pages/index.vue` | platform overview |
| `pages/users.vue`, `pages/shops.vue` | users/roles, shop lifecycle |
| `pages/orders.vue` | read-only orders |
| `pages/aftersales.vue` | monitoring + dispute arbitration |
| `pages/reviews.vue` | moderation (hide/delete) |
| `pages/content.vue`, `pages/brands.vue` | storefront content, brand registry |
| `pages/currencies.vue` | currency registry + rates |
| `pages/points-products.vue`, `pages/points-orders.vue` | points mall ops |
| `pages/withdrawals.vue` | withdrawal review queue (approve/reject once, 409 feedback) |
| `pages/settlements.vue` | commission rate, statement list/detail, idempotent generation, one-time payout confirmation |
| `pages/merchant-applications.vue` | merchant application review queue, detail, approve/reject, one-time owner credentials |
| `pages/member-levels.vue` + `components/MemberLevelForm.vue` | member level catalog CRUD (bilingual, unique threshold, in-use delete rejection) |