admin自动审核

This commit is contained in:
jeremygan2021
2026-02-23 17:15:29 +08:00
parent e59ae5abbe
commit 5095e27391
3 changed files with 54 additions and 3 deletions

View File

@@ -541,6 +541,14 @@ def payment_finish(request):
signup.status = new_status
signup.save()
print(f"活动报名状态已更新: {signup.id} -> {new_status}")
# Send Activity SMS
try:
from .sms_utils import notify_user_activity_signup_success
notify_user_activity_signup_success(order, signup)
except Exception as sms_e:
print(f"发送活动报名短信失败: {str(sms_e)}")
else:
print(f"Error: No ActivitySignup found for paid order {order.id}")
@@ -644,6 +652,16 @@ def payment_finish(request):
import traceback
traceback.print_exc()
# 发送普通商品/课程购买的短信通知(排除活动报名,避免重复发送)
# 活动报名的短信已经在上面发送过了
if not (hasattr(order, 'activity') and order.activity):
try:
from .sms_utils import notify_admins_order_paid, notify_user_order_paid
notify_admins_order_paid(order)
notify_user_order_paid(order)
except Exception as e:
print(f"发送短信通知失败: {str(e)}")
except Exception as e:
print(f"订单更新失败: {str(e)}")