|
@@ -26,6 +26,7 @@ from Model.models import DeviceTypeModel
|
|
|
|
|
|
from Object.ResponseObject import ResponseObject
|
|
from Object.ResponseObject import ResponseObject
|
|
from Ansjer.config import LOGGER
|
|
from Ansjer.config import LOGGER
|
|
|
|
+from Object.TokenObject import TokenObject
|
|
|
|
|
|
|
|
|
|
class AgentDeviceView(View):
|
|
class AgentDeviceView(View):
|
|
@@ -71,6 +72,8 @@ class AgentDeviceView(View):
|
|
return self.get_agent_device(userID, request_dict, response)
|
|
return self.get_agent_device(userID, request_dict, response)
|
|
elif operation == 'getAgentDeviceOrder':
|
|
elif operation == 'getAgentDeviceOrder':
|
|
return self.get_agent_device_order(userID, request_dict, response)
|
|
return self.get_agent_device_order(userID, request_dict, response)
|
|
|
|
+ elif operation == 'batchBandDevice':
|
|
|
|
+ return self.batch_band_device(userID, request, request_dict, response)
|
|
else:
|
|
else:
|
|
return response.json(444, 'operation')
|
|
return response.json(444, 'operation')
|
|
|
|
|
|
@@ -100,7 +103,7 @@ class AgentDeviceView(View):
|
|
ac_id = agent_customer_info.id
|
|
ac_id = agent_customer_info.id
|
|
|
|
|
|
try:
|
|
try:
|
|
- agent_device_qs = AgentDevice.objects.filter(ac_id=ac_id)
|
|
|
|
|
|
+ agent_device_qs = AgentDevice.objects.filter(ac_id=ac_id).order_by('ac_id', '-created_time')
|
|
|
|
|
|
if device_name:
|
|
if device_name:
|
|
# 根据device_name查询对应的type值
|
|
# 根据device_name查询对应的type值
|