|
|
@@ -13,7 +13,7 @@ from .serializers import PhotoMonitorListSerializer, PhotoMonitorPostSerializer
|
|
|
|
|
|
class PhotoMonitorView(GenericAPIView):
|
|
|
# queryset = PhotoForbiddenInfo.objects.using('siqing').filter(is_allowrd=1).order_by('-id')
|
|
|
- queryset = PhotoForbiddenInfo.objects.using('siqing').exclude(is_allowrd=1)
|
|
|
+ queryset = PhotoForbiddenInfo.objects.using('siqing').exclude(is_allowrd=1).order_by('-id')
|
|
|
serializer_class = PhotoMonitorListSerializer
|
|
|
pagination_class = CustomPagination
|
|
|
permission_classes = [LoginPermission]
|
|
|
@@ -50,7 +50,10 @@ class PhotoMonitorView(GenericAPIView):
|
|
|
)
|
|
|
def get(self, request):
|
|
|
'''获取待解封列表接口'''
|
|
|
+ device_id = request.query_params.get('device_id', '').strip()
|
|
|
queryset = self.get_queryset()
|
|
|
+ if device_id:
|
|
|
+ queryset = queryset.filter(device_id__contains=device_id)
|
|
|
page_data = self.paginate_queryset(queryset)
|
|
|
ser_obj = self.get_serializer(page_data, many=True)
|
|
|
data = self.get_paginated_response(ser_obj.data)
|