sms 活动短信
All checks were successful
Deploy to Server / deploy (push) Successful in 28s

This commit is contained in:
jeremygan2021
2026-02-23 17:22:10 +08:00
parent 204ec48933
commit 6b1fd43ec6
2 changed files with 22 additions and 5 deletions

View File

@@ -661,6 +661,12 @@ def payment_finish(request):
notify_user_order_paid(order)
except Exception as e:
print(f"发送短信通知失败: {str(e)}")
else:
# 额外保险:如果是活动订单,手动标记不触发 signals 中的支付/发货通知
# 因为 signals 可能会在 save() 时触发
order._was_paid = False
order._was_shipped = False
# order.save() # 不需要再 save因为已经是 post-save 或者不影响数据库的标记
except Exception as e:
print(f"订单更新失败: {str(e)}")