|
|
@@ -93,12 +93,12 @@ class LowPriceGoodsDataJobs implements ShouldQueue
|
|
|
$platform = explode(',', $platform);
|
|
|
$ScrapeDataModel = $ScrapeDataModel->whereIn('platform_id', $platform);
|
|
|
}
|
|
|
- $last7DaysStart = Carbon::today()->subDays(6)->startOfDay()->getTimestamp(); // 7天前开始
|
|
|
- $last7DaysEnd = Carbon::today()->endOfDay()->getTimestamp(); // 到今天结束
|
|
|
- $last7DaysStart = date('Y-m-d H:i:s', $last7DaysStart);
|
|
|
- $last7DaysEnd = date('Y-m-d H:i:s', $last7DaysEnd);
|
|
|
- $where[] = ['insert_time', '>=', $last7DaysStart];
|
|
|
- $where[] = ['insert_time', '<=', $last7DaysEnd];
|
|
|
+ $yesterdayStart = Carbon::yesterday()->startOfDay()->getTimestamp(); // 昨天开始时间 00:00:00
|
|
|
+ $yesterdayEnd = Carbon::yesterday()->endOfDay()->getTimestamp(); // 昨天结束时间 23:59:59
|
|
|
+ $yesterdayStart = date('Y-m-d H:i:s', $yesterdayStart);
|
|
|
+ $yesterdayEnd = date('Y-m-d H:i:s', $yesterdayEnd);
|
|
|
+ $where[] = ['insert_time', '>=', $yesterdayStart];
|
|
|
+ $where[] = ['insert_time', '<=', $yesterdayEnd];
|
|
|
$where[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
|
$where[] = ['product_specs', 'like', '%' . $product_specs . '%'];
|
|
|
$where[] = ['one_box_price', '<', $suggested_price];
|