|
@@ -2329,7 +2329,7 @@ class InitInfoView(View):
|
|
|
now_time = int(time.time())
|
|
|
if all([token_val, push_type, appBundleId, userID]):
|
|
|
self.save_push_config(userID, appBundleId, push_type, token_val, m_code, lang, tz)
|
|
|
- self.save_or_creat_uid_push(userID, appBundleId, push_type, token_val, m_code, lang, tz)
|
|
|
+ self.save_or_creat_uid_push(userID, appBundleId, push_type, token_val, m_code, lang, tz, now_time)
|
|
|
if appBundleId:
|
|
|
user_ex_qs = UserExModel.objects.filter(userID_id=userID)
|
|
|
user_ex = None
|
|
@@ -2392,7 +2392,7 @@ class InitInfoView(View):
|
|
|
print('出错了~异步保存配置信息错误,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
|
|
|
@staticmethod
|
|
|
- def save_or_creat_uid_push(user_id, app_bundle_id, push_type, token_val, m_code, lang, tz):
|
|
|
+ def save_or_creat_uid_push(user_id, app_bundle_id, push_type, token_val, m_code, lang, tz, now_time):
|
|
|
"""
|
|
|
异步保存推送配置
|
|
|
@param user_id: 用户id
|
|
@@ -2406,7 +2406,6 @@ class InitInfoView(View):
|
|
|
"""
|
|
|
try:
|
|
|
app_type = 1 if push_type == 0 else 2
|
|
|
- now_time = int(time.time())
|
|
|
device_info = Device_Info.objects.filter(userID=user_id).values('UID')
|
|
|
if device_info.exists():
|
|
|
uid_set = UidSetModel.objects.filter(uid__in=device_info).values('id')
|