This commit is contained in:
aaron 2025-03-27 23:47:00 +08:00
parent 64421da8f9
commit cfb8794f71
2 changed files with 1 additions and 0 deletions

View File

@ -110,6 +110,7 @@ async def list_merchant_products(
product_info = MerchantProductInfo.model_validate(product)
products.append({
**product_info.model_dump(),
"merchant": MerchantInfo.model_validate(product.merchant),
"delivery_type_name": "配送到家" if product.delivery_type == DeliveryType.DELIVERY else "自提",
"delivery_time_type_name": "小时达" if product.delivery_time_type == DeliveryTimeType.IMMEDIATE else "社区团购",
"pickup_time_format": f"{product.delivery_date.strftime('%m月%d')} {product.pickup_time_from.strftime('%H:%M')}~{product.pickup_time_to.strftime('%H:%M')}" if product.delivery_date and product.pickup_time_from and product.pickup_time_to else None

Binary file not shown.