update
This commit is contained in:
parent
b3f6b12f14
commit
07c4f76701
@ -855,6 +855,9 @@ async def cancel_order(
|
||||
if order.status not in [OrderStatus.CREATED, OrderStatus.UNPAID]:
|
||||
return error_response(code=400, message="当前订单状态不可取消")
|
||||
|
||||
if order.deliveryman_user_id:
|
||||
return error_response(code=400, message="当前订单已接单,无法取消")
|
||||
|
||||
try:
|
||||
# 更新订单状态、取消原因和取消用户
|
||||
order.status = OrderStatus.CANCELLED
|
||||
|
||||
BIN
jobs.sqlite
BIN
jobs.sqlite
Binary file not shown.
Loading…
Reference in New Issue
Block a user