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