|
|
@@ -292,12 +292,11 @@ class LowPriceGoods extends Model
|
|
|
//采集结束时间
|
|
|
$sampling_end_time = isset($collect_config_info['sampling_end_time']) ? $collect_config_info['sampling_end_time'] : '';
|
|
|
if (!is_array($sampling_cycle)) return $product_data_info;
|
|
|
- $current_time = time();
|
|
|
+ $current_time = $product_data_info['collection_time'];
|
|
|
//如果当前时间在采集开始时间结束时间范围内,则进行连续挂网和累计挂网统计
|
|
|
if ($sampling_start_time != '' && $sampling_end_time != '' && $current_time >= $sampling_start_time && $current_time <= $sampling_end_time) {
|
|
|
// 获取采集时间是星期几
|
|
|
- $collection_time = strtotime($product_data_info['collection_time']);
|
|
|
- $now_week = date('w', $collection_time);
|
|
|
+ $now_week = date('w', $current_time);
|
|
|
if ($now_week == 0) {
|
|
|
$now_week = 7;
|
|
|
}
|
|
|
@@ -311,7 +310,7 @@ class LowPriceGoods extends Model
|
|
|
$days_to_subtract = isset($result['days_to_subtract']) ? $result['days_to_subtract'] : 0;
|
|
|
// echo "往前推 {$result['days_to_subtract']} 天";
|
|
|
//查询当前商品是否在上一个周期采集中过
|
|
|
- $up_scrape_date_time = $collection_time - $days_to_subtract * 24 * 3600; //查询上周这个时间点
|
|
|
+ $up_scrape_date_time = $current_time - $days_to_subtract * 24 * 3600; //查询上周这个时间点
|
|
|
$up_scrape_date = date('Y-m-d', $up_scrape_date_time);
|
|
|
$source_last_week_where[] = ['company_id', '=', $product_data_info['company_id']]; //品牌方公司ID
|
|
|
$source_last_week_where[] = ['platform', '=', $product_data_info['platform']]; //挂网平台ID
|