|
@@ -1282,9 +1282,6 @@ class InitInfoView(View):
|
|
lang = request_dict.get('lang', '') # 语言区域
|
|
lang = request_dict.get('lang', '') # 语言区域
|
|
# region = request_dict.get('region', '') # 语言区域
|
|
# region = request_dict.get('region', '') # 语言区域
|
|
nowTime = int(time.time())
|
|
nowTime = int(time.time())
|
|
- print(token_val)
|
|
|
|
- print(push_type)
|
|
|
|
- print(appBundleId)
|
|
|
|
if all([token_val, push_type, appBundleId]):
|
|
if all([token_val, push_type, appBundleId]):
|
|
push_type = int(push_type)
|
|
push_type = int(push_type)
|
|
if push_type == 0:
|
|
if push_type == 0:
|
|
@@ -1299,7 +1296,6 @@ class InitInfoView(View):
|
|
else:
|
|
else:
|
|
return response.json(444,'push_type')
|
|
return response.json(444,'push_type')
|
|
uid_list = ModelService.get_uid_list(userID=userID)
|
|
uid_list = ModelService.get_uid_list(userID=userID)
|
|
- print('1111111111')
|
|
|
|
if uid_list:
|
|
if uid_list:
|
|
# 获取设备推送状态
|
|
# 获取设备推送状态
|
|
update_dict = {
|
|
update_dict = {
|
|
@@ -1310,8 +1306,6 @@ class InitInfoView(View):
|
|
# 更新当前用户推送设备状态
|
|
# 更新当前用户推送设备状态
|
|
UidPushModel.objects.filter(userID_id=userID, m_code=m_code,uid_set__detect_status=1).update(**update_dict)
|
|
UidPushModel.objects.filter(userID_id=userID, m_code=m_code,uid_set__detect_status=1).update(**update_dict)
|
|
if appBundleId:
|
|
if appBundleId:
|
|
- print('222222222222')
|
|
|
|
-
|
|
|
|
user_extend_qs = UserExtendModel.objects.filter(userID_id=userID)
|
|
user_extend_qs = UserExtendModel.objects.filter(userID_id=userID)
|
|
if user_extend_qs.exists():
|
|
if user_extend_qs.exists():
|
|
update_dict = {
|
|
update_dict = {
|
|
@@ -1320,13 +1314,8 @@ class InitInfoView(View):
|
|
'region': lang
|
|
'region': lang
|
|
# 'is_cn':
|
|
# 'is_cn':
|
|
}
|
|
}
|
|
- print(update_dict)
|
|
|
|
- is_update = user_extend_qs.update(**update_dict)
|
|
|
|
- print('isiis')
|
|
|
|
- print(is_update)
|
|
|
|
-
|
|
|
|
|
|
+ user_extend_qs.update(**update_dict)
|
|
else:
|
|
else:
|
|
- print('is_create')
|
|
|
|
create_dict = {
|
|
create_dict = {
|
|
'addTime': nowTime,
|
|
'addTime': nowTime,
|
|
'updTime': nowTime,
|
|
'updTime': nowTime,
|
|
@@ -1335,7 +1324,6 @@ class InitInfoView(View):
|
|
'region': lang
|
|
'region': lang
|
|
}
|
|
}
|
|
UserExtendModel.objects.create(**create_dict)
|
|
UserExtendModel.objects.create(**create_dict)
|
|
-
|
|
|
|
res = {
|
|
res = {
|
|
'usmsg': sm_count
|
|
'usmsg': sm_count
|
|
}
|
|
}
|