update
This commit is contained in:
parent
5b6459c220
commit
32d85cf692
@ -906,12 +906,13 @@ async def cancel_order(
|
||||
|
||||
db.commit()
|
||||
|
||||
wechat = WeChatClient()
|
||||
await wechat.apply_refund(
|
||||
order_id=order.orderid,
|
||||
total_amount=int(float(order.final_amount) * 100) if not settings.DEBUG else 1, # 转换为分
|
||||
reason="用户取消订单"
|
||||
)
|
||||
if order.final_amount > 0:
|
||||
wechat = WeChatClient()
|
||||
await wechat.apply_refund(
|
||||
order_id=order.orderid,
|
||||
total_amount=int(float(order.final_amount) * 100) if not settings.DEBUG else 1, # 转换为分
|
||||
reason="用户取消订单"
|
||||
)
|
||||
|
||||
# 发送企业微信消息
|
||||
wecom_bot = WecomBot()
|
||||
@ -1167,12 +1168,13 @@ async def deliveryman_cancel_order(
|
||||
|
||||
db.commit()
|
||||
|
||||
wechat = WeChatClient()
|
||||
await wechat.apply_refund(
|
||||
order_id=order.orderid,
|
||||
total_amount=int(float(order.final_amount) * 100) if not settings.DEBUG else 1, # 转换为分
|
||||
reason="配送员取消订单"
|
||||
)
|
||||
if order.final_amount > 0:
|
||||
wechat = WeChatClient()
|
||||
await wechat.apply_refund(
|
||||
order_id=order.orderid,
|
||||
total_amount=int(float(order.final_amount) * 100) if not settings.DEBUG else 1, # 转换为分
|
||||
reason="配送员取消订单"
|
||||
)
|
||||
|
||||
# 发送企业微信消息
|
||||
wecom_bot = WecomBot()
|
||||
|
||||
BIN
jobs.sqlite
BIN
jobs.sqlite
Binary file not shown.
Loading…
Reference in New Issue
Block a user