From 088dc90661e9f03059d296f891910f4ccb63cc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B2=E8=BE=B0=E7=94=9F=E4=BA=A7?= Date: Fri, 20 Mar 2026 01:00:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AE=A1=E7=90=86=E5=91=98=E5=8F=AF?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E7=94=A8=E6=88=B7=E8=97=8F=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=20v1.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/routers/collections.py | 13 +++++++++++++ config/VERSION | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/app/routers/collections.py b/backend/app/routers/collections.py index 983ba1c..04f0481 100644 --- a/backend/app/routers/collections.py +++ b/backend/app/routers/collections.py @@ -101,6 +101,7 @@ def get_next_code( def get_collections( category: Optional[str] = None, status: Optional[str] = None, + user_id: Optional[str] = None, search: Optional[str] = None, page: int = Query(1, ge=1), limit: int = Query(20, ge=1, le=100), @@ -121,6 +122,8 @@ def get_collections( if category: query = query.filter(Collection.f01_03_category == category) + if user_id: + query = query.filter(Collection.f99_91_user_id == user_id) if status: query = query.filter(Collection.f01_04_status == status) if search: @@ -322,10 +325,20 @@ def get_collections_by_user( for c in collections: result.append({ "f99_90_id": c.f99_90_id, + "name": c.f01_01_name, + "code": c.f01_02_code, + "prefixSerial": c.f02_10_prefix_serial, + "version": c.f02_11_version, + "category": c.f01_03_category, + "status": c.f01_04_status, + "packaging": c.f02_12_packaging, + "isGraded": c.f03_20_is_graded, + "costPrice": c.f05_40_cost_price, "f01_01_name": c.f01_01_name, "f02_10_prefix_serial": c.f02_10_prefix_serial, "f02_11_version": c.f02_11_version, "f01_04_status": c.f01_04_status, + "userId": c.f99_91_user_id, "f05_40_cost_price": c.f05_40_cost_price, "f99_92_created_at": c.f99_92_created_at.isoformat() if c.f99_92_created_at else None }) diff --git a/config/VERSION b/config/VERSION index 52cda95..79127d8 100644 --- a/config/VERSION +++ b/config/VERSION @@ -1 +1 @@ -v1.1.22 +v1.2.0