Skip to content

Commit

Permalink
chore: 更改两个查询订单的状态码
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Jan 11, 2025
1 parent a95d0e6 commit 0f9b99d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/order/afdian/query_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0f9b99d

Please sign in to comment.