|
@@ -66,7 +66,7 @@ class ScrapeDataProductJobs implements ShouldQueue
|
|
|
$where[] = ['insert_time', '<=', $end_time_string];
|
|
$where[] = ['insert_time', '<=', $end_time_string];
|
|
|
$where[] = ['min_price', '>=', '0.01'];
|
|
$where[] = ['min_price', '>=', '0.01'];
|
|
|
$where[] = ['number', '>=', '1'];
|
|
$where[] = ['number', '>=', '1'];
|
|
|
- $where[] = ['company_id', '=', $company_id];
|
|
|
|
|
|
|
+ $where[] = ['enterprise_id', '=', $company_id];
|
|
|
$product_data_info = $ScrapeDataModel->select('*', DB::raw('ROUND(min_price / NULLIF(number, 0), 2) as unit_price'))
|
|
$product_data_info = $ScrapeDataModel->select('*', DB::raw('ROUND(min_price / NULLIF(number, 0), 2) as unit_price'))
|
|
|
->where($where)->orderbyDesc('id')->paginate($limit, ['*'], 'page', $page)->toarray();
|
|
->where($where)->orderbyDesc('id')->paginate($limit, ['*'], 'page', $page)->toarray();
|
|
|
$product_datas = $product_data_info['data'];
|
|
$product_datas = $product_data_info['data'];
|