update
This commit is contained in:
parent
ab79cb05a7
commit
8b0cddf7e2
@ -350,7 +350,8 @@ async def get_order_detail(
|
||||
if not order:
|
||||
return error_response(code=404, message="订单不存在")
|
||||
|
||||
deliveryman_share = 0
|
||||
# 计算配送员分账金额
|
||||
deliveryman_share = round(order.original_amount * (current_user.delivery_commission_rate / 100.0), 1)
|
||||
|
||||
# 如果有配送员 id,则获取配送员信息
|
||||
if order.deliveryman_user_id:
|
||||
@ -366,9 +367,6 @@ async def get_order_detail(
|
||||
ShippingOrderDB.deliveryman_user_id == order.deliveryman_user_id,
|
||||
ShippingOrderDB.status == OrderStatus.COMPLETED
|
||||
).count()
|
||||
|
||||
# 计算配送员分账金额
|
||||
deliveryman_share = round(order.original_amount * (current_user.delivery_commission_rate / 100.0), 1)
|
||||
else:
|
||||
delivery_count = 0
|
||||
deliveryman_user_name = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user