add message

This commit is contained in:
baoliang 2020-11-18 17:31:01 +08:00
parent ead6de5bf1
commit ad2e4279d5
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def process_notify_task():
return return
if hour < 8 or hour > 20: if hour < 8 or hour > 20:
return return
print('============', phone, n.type) print('============', phone, n.type, n.id)
SMSNotifyRecord.objects.create(phone=phone, notice_id=n.id) SMSNotifyRecord.objects.create(phone=phone, notice_id=n.id)
sent_sms_notify(phone, n.type) sent_sms_notify(phone, n.type)
print('end task', time.process_time() - start) print('end task', time.process_time() - start)

View File

@ -17,7 +17,7 @@ def sent_sms_code(phone, code):
def sent_sms_notify(phone, type): def sent_sms_notify(phone, type):
clnt = YunpianClient('304eb08353f7ebf00596737acfc31f53') clnt = YunpianClient('304eb08353f7ebf00596737acfc31f53')
if type == 0: if type == 1:
param = {YC.MOBILE: phone ,YC.TEXT:'【甘肃大未来科技】政务新媒体管理APP有新消息请及时登录处理。若其他管理员已处理请忽略*测试*'} param = {YC.MOBILE: phone ,YC.TEXT:'【甘肃大未来科技】政务新媒体管理APP有新消息请及时登录处理。若其他管理员已处理请忽略*测试*'}
else: else:
param = {YC.MOBILE: phone ,YC.TEXT:'【甘肃大未来科技】政务新媒体管理APP有新任务请及时登录处理。'} param = {YC.MOBILE: phone ,YC.TEXT:'【甘肃大未来科技】政务新媒体管理APP有新任务请及时登录处理。'}