From 0f9b99d5430a60ed1f5a7d337cd28bbfd37a6f31 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 11 Jan 2025 22:56:54 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=94=B9=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=AE=A2=E5=8D=95=E7=9A=84=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/order/afdian/query_order.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/order/afdian/query_order.py b/src/order/afdian/query_order.py index 1b71ac4..6694869 100644 --- a/src/order/afdian/query_order.py +++ b/src/order/afdian/query_order.py @@ -14,17 +14,13 @@ async def query_order(order_id: str): bill = Bill.get(Bill.platform == "afdian", Bill.order_id == order_id) except Exception as e: logger.error(f"Query bill failed, order_id: {order_id}, error: {e}") - return {"ec": 500, "msg": "Query bill failed"} - - if not bill: - logger.error(f"Bill not found, order_id: {order_id}") return {"ec": 404, "msg": "Bill not found"} try: plan = Plan.get(Plan.platform == "afdian", Plan.plan_id == bill.plan_id) except Exception as e: - logger.error(f"Query plan failed, order_id: {order_id}, error: {e}") - return {"ec": 500, "msg": "Query plan failed"} + logger.error(f"Plan not found, order_id: {order_id}, error: {e}") + return {"ec": 403, "msg": "Plan not found"} return { "ec": 200,