|
@@ -92,7 +92,7 @@ class UserDataView(View):
|
|
|
time_list = CommonService.cutting_time(start_time, end_time, time_unit)
|
|
|
user_list = []
|
|
|
for item in time_list:
|
|
|
- user_qs = all_user_qs.filter(time__gte=item[0], time__lt=item[1], query_type=0).values('count')
|
|
|
+ user_qs = all_user_qs.filter(time__gte=item[0], time__lt=item[1]).values('count')
|
|
|
temp_count = user_qs.aggregate(total=Sum('count'))['total']
|
|
|
temp_count = temp_count if temp_count else 0
|
|
|
rate = round(temp_count / count * 100, 2) if count else 0
|
|
@@ -156,7 +156,7 @@ class UserDataView(View):
|
|
|
time_list = CommonService.cutting_time(start_time, end_time, time_unit)
|
|
|
user_list = []
|
|
|
for item in time_list:
|
|
|
- user_qs = all_user_qs.filter(time__gte=item[0], time__lt=item[1], query_type=0).values('count')
|
|
|
+ user_qs = all_user_qs.filter(time__gte=item[0], time__lt=item[1]).values('count')
|
|
|
temp_count = user_qs.aggregate(total=Sum('count'))['total']
|
|
|
temp_count = temp_count if temp_count else 0
|
|
|
rate = round(temp_count / count * 100, 2) if count else 0
|