Browse Source

修改后台每日对账接口

peng 1 year ago
parent
commit
1c137ca9e5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Controller/Cron/CronTaskController.py

+ 3 - 0
Controller/Cron/CronTaskController.py

@@ -1499,6 +1499,7 @@ class CronComparedDataView(View):
     @staticmethod
     def compared_ansjer_order(request_dict, response):
         start_date_stamp = request_dict.get('time', None)
+        end_time = request_dict.get('end_time', None)
         if start_date_stamp:
             start_date = datetime.datetime.fromtimestamp(int(start_date_stamp))
             end_date = start_date + datetime.timedelta(days=1)
@@ -1511,6 +1512,8 @@ class CronComparedDataView(View):
             start_date_stamp = int(start_date.timestamp())
             end_date_stamp = int(end_date.timestamp())
         try:
+            if end_time:
+                end_date_stamp = end_time
             order_qs = Order_Model.objects.filter(status__in=[1, 5, 6], payType=1, payTime__gte=start_date_stamp,
                                                   payTime__lt=end_date_stamp).values('orderID', 'trade_no', 'price')
             if CONFIG_INFO == CONFIG_EUR: