update
This commit is contained in:
parent
ddef39516f
commit
89cb377026
@ -497,6 +497,7 @@ async def get_order_detail(
|
||||
"original_amount": order.original_amount,
|
||||
"coupon_discount_amount": order.coupon_discount_amount,
|
||||
"point_discount_amount": order.point_discount_amount,
|
||||
"additional_fee_amount": order.additional_fee_amount,
|
||||
"coupon_id": order.coupon_id,
|
||||
"final_amount": order.final_amount,
|
||||
"deliveryman_share": order.delivery_share if order.delivery_share > 0 else calculate_delivery_share(order, current_user),
|
||||
@ -506,6 +507,7 @@ async def get_order_detail(
|
||||
"is_first_order": order.is_first_order,
|
||||
"cancel_reason": order.cancel_reason,
|
||||
"order_additional_fee": order_additional_fee,
|
||||
"pay_amount": order.pay_amount,
|
||||
|
||||
"create_time": order.create_time,
|
||||
"complete_time": order.completed_time,
|
||||
|
||||
@ -148,8 +148,8 @@ async def create_payment(
|
||||
).first()
|
||||
if not order:
|
||||
return error_response(code=404, message="订单不存在")
|
||||
description = "配送费用"
|
||||
amount = order.final_amount
|
||||
description = "蜂快到家-配送费用"
|
||||
amount = order.pay_amount
|
||||
|
||||
elif order_prefix == "M": # 商家商品订单
|
||||
order = db.query(MerchantOrderDB).filter(
|
||||
@ -157,7 +157,7 @@ async def create_payment(
|
||||
).first()
|
||||
if not order:
|
||||
return error_response(code=404, message="订单不存在")
|
||||
description = "商品购买"
|
||||
description = "蜂快到家-商品购买"
|
||||
amount = order.pay_amount
|
||||
|
||||
elif order_prefix == "P": # 商家在线买单
|
||||
@ -166,7 +166,7 @@ async def create_payment(
|
||||
).first()
|
||||
if not order:
|
||||
return error_response(code=404, message="订单不存在")
|
||||
description = "在线买单"
|
||||
description = "蜂快到家-在线买单"
|
||||
amount = order.amount
|
||||
|
||||
else:
|
||||
|
||||
@ -108,6 +108,10 @@ class ShippingOrderDB(Base):
|
||||
@property
|
||||
def original_amount_with_additional_fee(self):
|
||||
return self.original_amount + self.additional_fee_amount
|
||||
|
||||
@property
|
||||
def pay_amount(self):
|
||||
return self.final_amount + self.additional_fee_amount
|
||||
|
||||
class ShippingOrderPackageDB(Base):
|
||||
__tablename__ = "shipping_order_packages"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user