|
@@ -88,10 +88,34 @@ class EquipmentManagerV3(View):
|
|
args=(CommonService.get_ip_address(request), userID, 'addV3'))
|
|
args=(CommonService.get_ip_address(request), userID, 'addV3'))
|
|
asy.start()
|
|
asy.start()
|
|
return response.json(10, 'illegal uid: {uid}'.format(uid=UID))
|
|
return response.json(10, 'illegal uid: {uid}'.format(uid=UID))
|
|
|
|
+
|
|
|
|
+ pk = CommonService.getUserID(getUser=False)
|
|
|
|
+
|
|
is_bind = Device_Info.objects.filter(UID=UID, isShare=False).values('userID__userID')
|
|
is_bind = Device_Info.objects.filter(UID=UID, isShare=False).values('userID__userID')
|
|
# 判断是否有已绑定用户
|
|
# 判断是否有已绑定用户
|
|
if is_bind and isCheckMainUser == '1':
|
|
if is_bind and isCheckMainUser == '1':
|
|
- isMainUserExists = True
|
|
|
|
|
|
+ res = {
|
|
|
|
+ 'id' : pk,
|
|
|
|
+ 'userID' : userID,
|
|
|
|
+ 'NickName' : NickName,
|
|
|
|
+ 'UID' : UID,
|
|
|
|
+ 'View_Account' : View_Account,
|
|
|
|
+ 'View_Password' : View_Password,
|
|
|
|
+ 'ChannelIndex' : ChannelIndex,
|
|
|
|
+ 'Type' : Type,
|
|
|
|
+ 'isShare' : '',
|
|
|
|
+ 'primaryUserID' : '',
|
|
|
|
+ 'primaryMaster' : '',
|
|
|
|
+ 'vodPrimaryUserID' : '',
|
|
|
|
+ 'vodPrimaryMaster' : '',
|
|
|
|
+ 'data_joined' : '',
|
|
|
|
+ 'version' : '',
|
|
|
|
+ 'isVod' : '',
|
|
|
|
+ 'isExist' : ''
|
|
|
|
+ }
|
|
|
|
+ res['vod'] = {}
|
|
|
|
+ res['isMainUserExists'] = 1
|
|
|
|
+ return response.json(0, res)
|
|
|
|
|
|
|
|
|
|
userName = Device_User.objects.get(userID=userID).username
|
|
userName = Device_User.objects.get(userID=userID).username
|
|
@@ -103,7 +127,7 @@ class EquipmentManagerV3(View):
|
|
vodPrimaryUserID = main_exist[0]['vodPrimaryUserID']
|
|
vodPrimaryUserID = main_exist[0]['vodPrimaryUserID']
|
|
vodPrimaryMaster = main_exist[0]['vodPrimaryMaster']
|
|
vodPrimaryMaster = main_exist[0]['vodPrimaryMaster']
|
|
|
|
|
|
- pk = CommonService.getUserID(getUser=False)
|
|
|
|
|
|
+
|
|
|
|
|
|
try:
|
|
try:
|
|
# 判断是否有用户绑定
|
|
# 判断是否有用户绑定
|
|
@@ -157,8 +181,6 @@ class EquipmentManagerV3(View):
|
|
res = dvql[0]
|
|
res = dvql[0]
|
|
res['vod'] = list(ubqs)
|
|
res['vod'] = list(ubqs)
|
|
|
|
|
|
- if isMainUserExists:
|
|
|
|
- res['isMainUserExists'] = 1
|
|
|
|
return response.json(0, res)
|
|
return response.json(0, res)
|
|
|
|
|
|
else:
|
|
else:
|