|
@@ -16,6 +16,7 @@ import oss2
|
|
from django.http import JsonResponse
|
|
from django.http import JsonResponse
|
|
from Object.RedisObject import RedisObject
|
|
from Object.RedisObject import RedisObject
|
|
|
|
|
|
|
|
+
|
|
# 查询用户设备
|
|
# 查询用户设备
|
|
def queryUserEquipmentInterface(request):
|
|
def queryUserEquipmentInterface(request):
|
|
request.encoding = 'utf-8'
|
|
request.encoding = 'utf-8'
|
|
@@ -715,10 +716,13 @@ def queryInterface(request):
|
|
nowTime = int(time.time())
|
|
nowTime = int(time.time())
|
|
data = []
|
|
data = []
|
|
# 设备拓展信息表
|
|
# 设备拓展信息表
|
|
- us_qs = UidSetModel.objects.filter(uid__in=uid_list).values('uid', 'version', 'nickname')
|
|
|
|
|
|
+ us_qs = UidSetModel.objects.filter(uid__in=uid_list).\
|
|
|
|
+ values('uid', 'version', 'nickname', 'detect_interval')
|
|
uv_dict = {}
|
|
uv_dict = {}
|
|
for us in us_qs:
|
|
for us in us_qs:
|
|
- uv_dict[us['uid']] = {'version': us['version'], 'nickname': us['nickname']}
|
|
|
|
|
|
+ uv_dict[us['uid']] = {'version': us['version'],
|
|
|
|
+ 'nickname': us['nickname'],
|
|
|
|
+ 'detect_interval': us['detect_interval']}
|
|
for p in dvls:
|
|
for p in dvls:
|
|
p['vod'] = []
|
|
p['vod'] = []
|
|
for dm in ubqs:
|
|
for dm in ubqs:
|
|
@@ -735,6 +739,7 @@ def queryInterface(request):
|
|
if p_uid in uv_dict:
|
|
if p_uid in uv_dict:
|
|
# 设备版本号
|
|
# 设备版本号
|
|
p['uid_version'] = uv_dict[p_uid]['version']
|
|
p['uid_version'] = uv_dict[p_uid]['version']
|
|
|
|
+ p['detect_interval'] = uv_dict[p_uid]['detect_interval']
|
|
# 设备昵称 调用影子信息昵称,先阶段不可
|
|
# 设备昵称 调用影子信息昵称,先阶段不可
|
|
if uv_dict[p_uid]['nickname']:
|
|
if uv_dict[p_uid]['nickname']:
|
|
p['NickName'] = uv_dict[p_uid]['nickname']
|
|
p['NickName'] = uv_dict[p_uid]['nickname']
|
|
@@ -766,7 +771,7 @@ def uid_status(request):
|
|
# 判断用户是否绑定设备
|
|
# 判断用户是否绑定设备
|
|
qs = UidSetModel.objects.filter(uid=uid).values('uid', 'detect_status', 'detect_interval', 'version', 'ucode',
|
|
qs = UidSetModel.objects.filter(uid=uid).values('uid', 'detect_status', 'detect_interval', 'version', 'ucode',
|
|
'p2p_region', 'tz', 'video_code', 'channel', 'cloud_vod', 'id',
|
|
'p2p_region', 'tz', 'video_code', 'channel', 'cloud_vod', 'id',
|
|
- 'detect_group','is_alexa','region_alexa')
|
|
|
|
|
|
+ 'detect_group', 'is_alexa', 'region_alexa')
|
|
# 判断uid配置表信息是否存在
|
|
# 判断uid配置表信息是否存在
|
|
if qs.exists():
|
|
if qs.exists():
|
|
# 获取uid推送是否添加过
|
|
# 获取uid推送是否添加过
|