|
@@ -342,7 +342,7 @@ class CbdDevicePhotoView(APIView):
|
|
|
disable = cbd_dict_cache[device_id]["disable"]
|
|
disable = cbd_dict_cache[device_id]["disable"]
|
|
|
|
|
|
|
|
result = []
|
|
result = []
|
|
|
- data_m = MongoDBTools(db_name='smartfarming', table_name='sa_device_cbd_photo')
|
|
|
|
|
|
|
+ data_m = MongoDBTools(db_name='smartfarming', table_name='sa_device_cbdphoto')
|
|
|
data_wheres = {
|
|
data_wheres = {
|
|
|
"device_id": str(d_id),
|
|
"device_id": str(d_id),
|
|
|
"addtime": {"$gt":start_time}
|
|
"addtime": {"$gt":start_time}
|
|
@@ -360,7 +360,6 @@ class CbdDevicePhotoView(APIView):
|
|
|
"addr": "$addr"
|
|
"addr": "$addr"
|
|
|
}
|
|
}
|
|
|
data = data_m.find_many(wheres=data_wheres,options=data_project)
|
|
data = data_m.find_many(wheres=data_wheres,options=data_project)
|
|
|
- print(data.count())
|
|
|
|
|
for item in data:
|
|
for item in data:
|
|
|
item_data = {}
|
|
item_data = {}
|
|
|
addr = item["addr"]
|
|
addr = item["addr"]
|