From eea94ec381f098289b79eed0c10581cd6265aa1f 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, 24 Apr 2026 10:46:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Aseek/match=20API?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=94=AF=E6=8C=81information=E5=92=8Cseek=5F?= =?UTF-8?q?info=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/routers/information.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/app/routers/information.py b/backend/app/routers/information.py index e9392de..0e14fe5 100644 --- a/backend/app/routers/information.py +++ b/backend/app/routers/information.py @@ -646,11 +646,17 @@ def get_seek_match( if not current_user: raise HTTPException(status_code=401, detail="请先登录") + # 先查 information 表 info = db.query(Information).filter( Information.id == info_id, Information.info_type == "seek" ).first() + # 如果 information 表没有,尝试 seek_info 表 + if not info: + from app.models.seek import SeekInfo + info = db.query(SeekInfo).filter(SeekInfo.id == info_id).first() + if not info: raise HTTPException(status_code=404, detail="寻配号信息不存在")