From b1d702b3633d4e1b7943b85f9a4ca9072993b236 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 14 Feb 2025 12:00:25 +0800 Subject: [PATCH] add merchant id --- app/api/endpoints/merchant_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/endpoints/merchant_order.py b/app/api/endpoints/merchant_order.py index d8ac305..aa85b8f 100644 --- a/app/api/endpoints/merchant_order.py +++ b/app/api/endpoints/merchant_order.py @@ -106,7 +106,8 @@ async def get_user_orders( MerchantDB.name.label('merchant_name'), MerchantDB.latitude.label('merchant_latitude'), MerchantDB.longitude.label('merchant_longitude'), - MerchantDB.phone.label('merchant_phone') + MerchantDB.phone.label('merchant_phone'), + MerchantDB.id.label('merchant_id') ).join( MerchantProductDB, MerchantOrderDB.merchant_product_id == MerchantProductDB.id @@ -137,6 +138,7 @@ async def get_user_orders( "product_image": process_image(order.product_image).thumbnail(width=450, height=450).format(ImageFormat.WEBP).build(), "product_tags": order.product_tags, # 商家信息 + "merchant_id": order.merchant_id, "merchant_name": order.merchant_name, "merchant_latitude": order.merchant_latitude, "merchant_longitude": order.merchant_longitude,