Browse Source

设备添加主用户2

chenshibin 4 years ago
parent
commit
a9a91622a8
2 changed files with 4 additions and 0 deletions
  1. 2 0
      Controller/EquipmentManager.py
  2. 2 0
      Controller/EquipmentManagerV3.py

+ 2 - 0
Controller/EquipmentManager.py

@@ -420,6 +420,8 @@ def addInterface(request):
                                              NickName=NickName, View_Account=View_Account,
                                              View_Password=View_Password, Type=Type, ChannelIndex=ChannelIndex, vodPrimaryUserID=vodPrimaryUserID, vodPrimaryMaster=vodPrimaryMaster)
                     userDevice.save()
+                    Device_Info.objects.filter(UID=UID).update(vodPrimaryUserID=vodPrimaryUserID,
+                                                               vodPrimaryMaster=vodPrimaryMaster)
                     # redisObj = RedisObject(db=8)
                     # redisObj.del_data(key='uid_qs_' + userID)
                 except Exception as e:

+ 2 - 0
Controller/EquipmentManagerV3.py

@@ -125,6 +125,8 @@ class EquipmentManagerV3(View):
                                                  View_Password=View_Password, Type=Type, ChannelIndex=ChannelIndex,
                                                  vodPrimaryUserID=vodPrimaryUserID, vodPrimaryMaster=vodPrimaryMaster)
                         userDevice.save()
+                        Device_Info.objects.filter(UID=UID).update(vodPrimaryUserID=vodPrimaryUserID,
+                                                                       vodPrimaryMaster=vodPrimaryMaster)
 
                         if not us_qs.exists():
                             us_qs = UidSetModel.objects.filter(uid=UID)