add merchant id

This commit is contained in:
aaron 2025-02-14 12:00:25 +08:00
parent 5cd8ce0f35
commit b1d702b363

View File

@ -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,