From 8acbdc24f0c0b7b77b4353183ebb627b46f00c6d Mon Sep 17 00:00:00 2001 From: xianfuxing Date: Wed, 22 Aug 2018 20:14:15 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=8C=89=E7=85=A7online=20=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/counter/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/counter/api/views.py b/apps/counter/api/views.py index ea8d2b8..adf3f26 100644 --- a/apps/counter/api/views.py +++ b/apps/counter/api/views.py @@ -45,7 +45,7 @@ class DeviceInfoListAPIView(ListAPIView): search_fields = ['device_id', 'online'] def get_queryset(self, *args, **kwargs): - queryset_list = DeviceInfo.objects.get_queryset().order_by('device_id') + queryset_list = DeviceInfo.objects.get_queryset().order_by('-online') device_id = self.request.GET.get('device_id') status = self.request.GET.get('status') if device_id: