From 1f89eeddb0da7200e165c9e3142c24b42ace4f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Sat, 15 Aug 2026 10:54:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(api):=20/api/customers=20=E5=8A=A0=20frien?= =?UTF-8?q?d=5Fid=20=E7=AD=9B=E9=80=89(=E7=94=A8=E4=BA=8E=E6=9F=A5?= =?UTF-8?q?=E5=8D=95=E4=B8=AA=E5=AE=A2=E6=88=B7=E6=98=B5=E7=A7=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- yunke-server/app/api/routers/customer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yunke-server/app/api/routers/customer.py b/yunke-server/app/api/routers/customer.py index 37a6725..6d42e55 100644 --- a/yunke-server/app/api/routers/customer.py +++ b/yunke-server/app/api/routers/customer.py @@ -35,6 +35,7 @@ async def list_customers( channel: Annotated[str | None, Query()] = None, department_id: Annotated[str | None, Query()] = None, owner_account_id: Annotated[str | None, Query()] = None, + friend_id: Annotated[str | None, Query()] = None, user_id: Annotated[str | None, Query()] = None, add_time_since: Annotated[int | None, Query(ge=0)] = None, last_chat_since: Annotated[int | None, Query(ge=0)] = None, @@ -51,6 +52,8 @@ async def list_customers( Staff.dept_id == department_id ) conditions.append(Customer.user_id.in_(dept_user_ids)) + if friend_id is not None: + conditions.append(Customer.friend_id == friend_id) if user_id is not None: conditions.append(Customer.user_id == user_id) if add_time_since is not None: