admin自动审核
This commit is contained in:
@@ -96,4 +96,39 @@ def notify_user_order_shipped(order):
|
||||
|
||||
print(f"准备发送用户发货通知: {order.phone_number}")
|
||||
#send_sms(order.phone_number, "SMS_501650557", params)
|
||||
send_sms(order.phone_number, "SMS_501665569", params)
|
||||
send_sms(order.phone_number, "SMS_501665569", params)
|
||||
|
||||
def notify_user_activity_signup_success(order, signup):
|
||||
"""
|
||||
通知用户活动报名成功 (支付成功后)
|
||||
模板CODE: SMS_501990528
|
||||
模板变量: user_nick, unit_name, time, address
|
||||
"""
|
||||
if not order.phone_number:
|
||||
return
|
||||
|
||||
# 1. user_nick
|
||||
user_nick = order.customer_name
|
||||
if order.wechat_user and order.wechat_user.nickname:
|
||||
user_nick = order.wechat_user.nickname
|
||||
|
||||
# 2. unit_name (Activity Title)
|
||||
unit_name = signup.activity.title
|
||||
|
||||
# 3. time
|
||||
start_time = signup.activity.start_time
|
||||
# Format time as YYYY-MM-DD HH:MM
|
||||
time_str = start_time.strftime("%Y-%m-%d %H:%M") if start_time else "待定"
|
||||
|
||||
# 4. address
|
||||
address = signup.activity.location or "线上活动"
|
||||
|
||||
params = {
|
||||
"user_nick": user_nick or "用户",
|
||||
"unit_name": unit_name,
|
||||
"time": time_str,
|
||||
"address": address
|
||||
}
|
||||
|
||||
print(f"准备发送活动报名成功通知: {order.phone_number}")
|
||||
send_sms(order.phone_number, "SMS_501990528", params)
|
||||
Reference in New Issue
Block a user