Browse Source

查询时间在20天以内

ANG YU 4 years ago
parent
commit
fa02a00a67
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Services/OrderPackageReceivedSyncService.php

+ 2 - 2
app/Services/OrderPackageReceivedSyncService.php

@@ -116,8 +116,8 @@ class OrderPackageReceivedSyncService
             //初始化查询一个月的数据,exception为否
             $query = $query->where('sent_at', '>=', $initDate->subDays((int)config('api_logistic.days'))->toDateTimeString())
                 ->whereNull('received_at');
-        } else {//当前时间大于初始化时间,exception为否且未收货
-            $query = $query->where('sent_at', '>=', $initDate->toDateTimeString())
+        } else {//查询20天以内的数据
+            $query = $query->where('sent_at', '>=', now()->subDays(20))
                 ->whereNull('received_at');
         }
         $result = [];