|
@@ -13,7 +13,7 @@
|
|
|
"""
|
|
|
import os
|
|
|
import time
|
|
|
-
|
|
|
+import json
|
|
|
import apns2
|
|
|
import jpush as jpush
|
|
|
import oss2
|
|
@@ -319,7 +319,7 @@ class DetectControllerViewV2(View):
|
|
|
if not qs.exists():
|
|
|
return response.json(0, {'datas': [], 'count': 0})
|
|
|
qs = qs.values('id', 'devUid', 'devNickName', 'Channel', 'eventType', 'status', 'alarm', 'eventTime',
|
|
|
- 'receiveTime', 'is_st', 'addTime', 'storage_location')
|
|
|
+ 'receiveTime', 'is_st', 'addTime', 'storage_location', 'borderCoords')
|
|
|
|
|
|
count = qs.count()
|
|
|
qr = qs[(page - 1) * line:page * line]
|
|
@@ -346,6 +346,7 @@ class DetectControllerViewV2(View):
|
|
|
eventTime = p['eventTime']
|
|
|
channel = p['Channel']
|
|
|
storage_location = p['storage_location']
|
|
|
+ p['borderCoords'] = json.loads(p['borderCoords'])
|
|
|
if p['is_st'] == 1:
|
|
|
thumbspng = '{uid}/{channel}/{time}.jpeg'.format(uid=devUid, channel=p['Channel'], time=eventTime)
|
|
|
if storage_location == 1: # oss
|