statistic_coupon 筛选从数据库创建时间改为激活时间

FFIB 4 years ago
parent
commit
93c7874ae1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/admin_views.py

+ 1 - 1
api/admin_views.py

@@ -574,7 +574,7 @@ def statistic_coupon(request):
574 574
     if start_time and end_time:
575 575
         start_time = datetime.strptime(start_time, '%Y%m%d')
576 576
         end_time = datetime.strptime(end_time + ' 23:59:59', '%Y%m%d %H:%M:%S')
577
-        coupons = UserCouponInfo.objects.filter(created_at__range=(start_time, end_time), status=True)
577
+        coupons = UserCouponInfo.objects.filter(active_at__range=(start_time, end_time), status=True)
578 578
     else:
579 579
         coupons = UserCouponInfo.objects.filter(status=True)
580 580