feat(ECR-009): Ops-D order filters, plan display prices, refund status

LOOP-RUN-002 sample: admin order multi-filter, membership display
price catalog, read-only refund_status. No real payment or RBAC.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-07 02:45:32 +08:00
co-authored by Cursor
parent 7ab9add5dd
commit ca3b13554c
37 changed files with 2169 additions and 25 deletions
+24
View File
@@ -0,0 +1,24 @@
{
"artifact_schema": {
"version": 1
},
"decision": "PASS",
"findings": [
{
"kind": "design_alignment",
"severity": "info",
"detail": "Scope matches plan.yaml Ops-D"
},
{
"kind": "architecture",
"severity": "info",
"detail": "Handler\u2192Service\u2192Repository preserved"
},
{
"kind": "coverage",
"severity": "info",
"detail": "TestOpsCommercePhaseD covers prices + order filter"
}
],
"notes": "LOOP-RUN-002 Code Review"
}
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
{
"ecr": "ECR-009",
"result": "BLOCK",
"ess_version": "v1.0",
"gate_version": "0.1.2",
"project_profile": "unknown",
"checks": {
"artifact": false,
"role_boundary": true,
"backend_boundary": true,
"traceability": false,
"tests": true
},
"violations": [
{
"rule": "ART-BD-002",
"description": "BACKEND_DESIGN must be Status Approved before implementation",
"fix_required": [
"Set BD Status to Approved",
"Re-run ess-gate-check"
],
"detail": "BD-2026-009-ops-commerce.md",
"check": "artifact-check"
},
{
"rule": "TR-COMMIT-001",
"description": "Trace chain requires implementation commit evidence",
"fix_required": [
"Record commit sha in TRACEABILITY or TEST_REPORT",
"Re-run gate"
],
"detail": "ECR-009",
"check": "traceability-check"
}
],
"errors": [
"[artifact-check] BLOCK [ART-BD-002]: BACKEND_DESIGN must be Status Approved before implementation \u2014 BD-2026-009-ops-commerce.md",
"[traceability-check] BLOCK [TR-COMMIT-001]: Trace chain requires implementation commit evidence \u2014 ECR-009"
],
"warnings": [],
"timestamp": "2026-08-06T18:45:04Z"
}
+48
View File
@@ -0,0 +1,48 @@
artifact_schema:
version: 1
scope:
files:
- .ai/product/feature-spec/ops-commerce.md
- .ai/product/feature-map.md
- .ai/product/feature-spec/README.md
- docs/ECR/ECR-009-ops-commerce.md
- docs/BACKEND_DESIGN/BD-2026-009-ops-commerce.md
- docs/PRODUCT_SPEC/ECR-009-ops-commerce.md
- docs/ENGINEERING_SPEC/ECR-009-ops-commerce.md
- docs/HANDOFF/ECR-009-architect-to-engineer.md
- docs/TASKS/TASK-009-ECR009.yaml
- docs/STATE/ECR-009.md
- docs/TRACEABILITY.md
- docs/CHANGELOG.md
- apps/api/migrations/000015_ops_commerce.up.sql
- apps/api/migrations/000015_ops_commerce.down.sql
- apps/api/internal/repository/admin_repo.go
- apps/api/internal/service/admin/service.go
- apps/api/internal/handler/admin.go
- apps/api/internal/integration/ops_commerce_test.go
- apps/admin-h5/src/pages/OrdersPage.vue
- apps/admin-h5/src/pages/PricingPage.vue
- apps/admin-h5/src/api/client.ts
- apps/admin-h5/src/router/index.ts
- apps/admin-h5/src/layouts/AdminShell.vue
- proto/openapi.yaml
boundary:
forbidden:
- engineering-spec-system/
- real payment gateway
- RBAC matrix (Ops-E)
- UGC / 达人
acceptance:
- "GET /admin/orders supports status,kind,from,to,user_id filters"
- "refund_status returned read-only on orders"
- "admin can GET/PUT membership plan display prices"
- "admin-h5 Orders filters + Pricing page"
- "integration test ops_commerce"
- "ess-gate-check ECR-009"
risks: |
- Do not enable real refunds or payment capture
- Display price is catalog only; order.amount_cents remains source of truth for paid orders
notes: |
LOOP-RUN-002 Planner Artifact. Builder implements only this scope.
No interactive Plan Mode confirmation.
+16
View File
@@ -0,0 +1,16 @@
{
"artifact_schema": {
"version": 1
},
"result": "PASS",
"tests": {
"total": 1,
"failed": 0,
"passed": 1
},
"commands": [
"go test ./internal/integration/ -run TestOpsCommercePhaseD",
"npm run build (admin-h5)"
],
"notes": "LOOP-RUN-002 Validator"
}