|
@@ -11,6 +11,7 @@ use Illuminate\Queue\SerializesModels;
|
|
|
use App\Facades\Servers\Logs\Log;
|
|
use App\Facades\Servers\Logs\Log;
|
|
|
use App\Models\Manager\CollectData\Yycheng\Product as YychengProductModel;
|
|
use App\Models\Manager\CollectData\Yycheng\Product as YychengProductModel;
|
|
|
use App\Jobs\Manager\CollectData\Yycheng\YychengStoreJobs;
|
|
use App\Jobs\Manager\CollectData\Yycheng\YychengStoreJobs;
|
|
|
|
|
+use Illuminate\Support\Carbon;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 采集数据-医药城数据同步
|
|
* 采集数据-医药城数据同步
|
|
@@ -58,7 +59,9 @@ class YychengProductJobs implements ShouldQueue
|
|
|
try {
|
|
try {
|
|
|
$YychengProductModel = new YychengProductModel();
|
|
$YychengProductModel = new YychengProductModel();
|
|
|
//获取分页数据,多个字段进行分组去重
|
|
//获取分页数据,多个字段进行分组去重
|
|
|
- $list_config_data = $YychengProductModel->where([['real_crawler_time', '<', time() - 86400]])
|
|
|
|
|
|
|
+ $yesterdayStart = Carbon::yesterday()->startOfDay()->getTimestamp(); // 昨天开始时间 00:00:00
|
|
|
|
|
+ $yesterdayEnd = Carbon::yesterday()->endOfDay()->getTimestamp(); // 昨天结束时间 23:59:59
|
|
|
|
|
+ $list_config_data = $YychengProductModel->where([['real_crawler_time', '<=', $yesterdayEnd], ['real_crawler_time', '>=', $yesterdayStart]])
|
|
|
->orderby('id', 'desc')->paginate($limit, $field, 'page', $page)->toarray();
|
|
->orderby('id', 'desc')->paginate($limit, $field, 'page', $page)->toarray();
|
|
|
if (!$list_config_data || empty($list_config_data['data'])) {
|
|
if (!$list_config_data || empty($list_config_data['data'])) {
|
|
|
$totle_data = isset($this->message_data['total']) ? $this->message_data['total'] : 0;
|
|
$totle_data = isset($this->message_data['total']) ? $this->message_data['total'] : 0;
|