From f382c27200ea49e154d02f37041ed5e4d48eacf1 Mon Sep 17 00:00:00 2001 From: sulaimaannaasif6866 Date: Sun, 21 Jun 2026 01:45:28 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E6=A6=82=E8=A7=88/?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97/=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=20+=20=E9=A6=96=E9=A1=B5=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 后台新增「数据概览」(商品/合格/按状态/品牌/分类/待审核) 与「操作日志」(全局审计分页);商品列表支持多选批量改状态/分类。公开首页标题改为「天工」并展示合格档案数;新增公开接口 /api/v1/stats 与后台 /api/stats、/api/audit、/api/products/bulk。合格口径=quality_score≥0.6 且在用。 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- admin-frontend/src/App.tsx | 39 ++++- admin-frontend/src/api.ts | 18 ++ .../src/components/AuditLogPage.tsx | 115 +++++++++++++ admin-frontend/src/components/ProductList.tsx | 155 +++++++++++++++++- admin-frontend/src/components/StatsPage.tsx | 125 ++++++++++++++ admin-frontend/src/types.ts | 21 +++ api/internal/adminhandler/handler.go | 73 +++++++++ api/internal/adminstore/bulk.go | 80 +++++++++ api/internal/adminstore/stats.go | 61 +++++++ api/internal/adminstore/stats_bulk_test.go | 71 ++++++++ api/internal/adminstore/write.go | 38 +++++ api/internal/handler/handler.go | 14 ++ api/internal/store/store.go | 18 ++ public-frontend/src/api.ts | 7 + public-frontend/src/components/Home.tsx | 21 ++- 15 files changed, 847 insertions(+), 9 deletions(-) create mode 100644 admin-frontend/src/components/AuditLogPage.tsx create mode 100644 admin-frontend/src/components/StatsPage.tsx create mode 100644 api/internal/adminstore/bulk.go create mode 100644 api/internal/adminstore/stats.go create mode 100644 api/internal/adminstore/stats_bulk_test.go diff --git a/admin-frontend/src/App.tsx b/admin-frontend/src/App.tsx index 80db3cb..2b0ecfd 100644 --- a/admin-frontend/src/App.tsx +++ b/admin-frontend/src/App.tsx @@ -7,9 +7,18 @@ import SubmissionsPage from "./components/SubmissionsPage"; import ApiKeysPage from "./components/ApiKeysPage"; import CategoriesPage from "./components/CategoriesPage"; import BrandsPage from "./components/BrandsPage"; -import { FolderTree, Inbox, KeyRound, LogOut, Package, Tag } from "lucide-react"; +import StatsPage from "./components/StatsPage"; +import AuditLogPage from "./components/AuditLogPage"; +import { BarChart3, FolderTree, Inbox, KeyRound, LogOut, Package, ScrollText, Tag } from "lucide-react"; -type Tab = "products" | "submissions" | "categories" | "brands" | "keys"; +type Tab = + | "overview" + | "products" + | "submissions" + | "categories" + | "brands" + | "audit" + | "keys"; type View = { name: "list" } | { name: "detail"; id: string }; export default function App() { @@ -74,6 +83,16 @@ export default function App() { 天工商品档案公共仓 · 后台