|
@@ -162,7 +162,6 @@ class EquipmentInfoService:
|
|
|
# 获取七天前时间戳
|
|
|
seven_days_before_time = LocalDateTimeUtil.get_before_days_timestamp(now_time, 7)
|
|
|
# 默认查询当前表event_time大于七天前时间
|
|
|
- qs = qs.filter(event_time__gt=seven_days_before_time)
|
|
|
if user_id:
|
|
|
qs = qs.filter(device_user_id=user_id)
|
|
|
if event_type:
|
|
@@ -173,7 +172,9 @@ class EquipmentInfoService:
|
|
|
else:
|
|
|
qs = qs.filter(event_type=event_type)
|
|
|
if start_time and end_time:
|
|
|
- qs = qs.filter(event_time__range=(start_time, end_time))
|
|
|
+ qs = qs.filter(event_time__range=(int(start_time), int(end_time)))
|
|
|
+ else:
|
|
|
+ qs = qs.filter(event_time__range=(seven_days_before_time, now_time))
|
|
|
if uid_list:
|
|
|
uid_list = uid_list.split(',')
|
|
|
qs = qs.filter(device_uid__in=uid_list)
|