|
@@ -55,6 +55,8 @@ class EquipmentManagerV3(View):
|
|
|
return self.change_device_password(request_dict, response)
|
|
|
elif operation == 'modifyChannelName':
|
|
|
return self.do_modify_channel_name(request_dict, response)
|
|
|
+ elif operation == 'updateLinkedChannel':
|
|
|
+ return self.update_linked_channel(request_dict, response)
|
|
|
|
|
|
token = request_dict.get('token', None)
|
|
|
tko = TokenObject(token)
|
|
@@ -778,6 +780,24 @@ class EquipmentManagerV3(View):
|
|
|
except Exception as e:
|
|
|
return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
|
|
|
+ @staticmethod
|
|
|
+ def update_linked_channel(request_dict, response):
|
|
|
+ """
|
|
|
+ 更新连接通道
|
|
|
+ @param request_dict:
|
|
|
+ @param response:
|
|
|
+ @return:
|
|
|
+ """
|
|
|
+ uid = request_dict.get('uid', None)
|
|
|
+ linked_channel = request_dict.get('linked_channel', None)
|
|
|
+ if not all([uid, linked_channel]):
|
|
|
+ return response.json(444)
|
|
|
+ try:
|
|
|
+ UidSetModel.objects.filter(uid=uid).update(linked_channel=linked_channel)
|
|
|
+ return response.json(0)
|
|
|
+ except Exception as e:
|
|
|
+ return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
+
|
|
|
def do_query(self, userID, request_dict, response):
|
|
|
"""
|
|
|
首页查询设备列表
|