From 41b33536131379a76a71ba54372671f93c058ab7 Mon Sep 17 00:00:00 2001 From: socool Date: Fri, 24 Apr 2026 11:20:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=A7=BB=E9=99=A4=E7=BD=91=E7=BB=9C=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E5=AE=9E=E6=97=B6=E8=AE=A1=E7=AE=97=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E5=8D=87=E5=8A=A0=E8=BD=BD=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - seek.py /list 端点不再实时计算 network_matched_count - 网络匹配仅在点击时通过 /network-match/{id} 单独查询 --- backend/app/routers/seek.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/backend/app/routers/seek.py b/backend/app/routers/seek.py index 93a2d81..f419071 100644 --- a/backend/app/routers/seek.py +++ b/backend/app/routers/seek.py @@ -102,15 +102,7 @@ def get_seek_list( user = db.query(User).filter(User.f99_90_id == item.user_id).first() user_name = user.f01_01_name if user else '匿名用户' - # 计算匹配数量 - matched_count = 0 - network_matched_count = 0 - if item.expect_number and len(item.expect_number) == 10: - if current_user and current_user.f99_90_id: - matched_count = match_self_collections_count(db, current_user.f99_90_id, item.expect_number) - network_matched_count = match_collections_count_from_coolbot(item.expect_number) - - # 构建响应 + # 构建响应(不实时计算网络匹配,网络匹配在点击时再查) result.append(SeekInfoResponse( id=item.id, user_id=item.user_id, @@ -131,8 +123,8 @@ def get_seek_list( created_at=item.created_at, updated_at=item.updated_at, user_name=user_name, - matched_count=matched_count, - network_matched_count=network_matched_count + matched_count=0, + network_matched_count=0 )) return result