|
|
@@ -61,10 +61,12 @@ class ViolationProductJobs implements ShouldQueue
|
|
|
if($company_id){
|
|
|
$ConfigViolationProductModel = $ConfigViolationProductModel->where('washconfig_violation_product.company_id', $company_id);
|
|
|
}
|
|
|
+ $totle_page = 0;
|
|
|
$list_config_data = $ConfigViolationProductModel->with(['product_keyword'])->paginate($limit, ['*'], 'page', $page)->toarray();
|
|
|
if (!$list_config_data || empty($list_config_data['data'])) {
|
|
|
return true;
|
|
|
}
|
|
|
+ $totle_page = $list_config_data['last_page'];
|
|
|
$list_data = $list_config_data['data'];
|
|
|
foreach ($list_data as $key => $value) {
|
|
|
$company_data = $ViolationProductCompanyModel->where('washconfig_violation_product_company.violation_product_logid', $value['id'])
|
|
|
@@ -86,6 +88,8 @@ class ViolationProductJobs implements ShouldQueue
|
|
|
'specify_responsible_person' => $value['specify_responsible_person'],
|
|
|
'product_brand' => $value['product_brand'],
|
|
|
'product_keyword' => $value['product_keyword'],
|
|
|
+ 'item_totle_page' => $totle_page,
|
|
|
+ 'item_now_page' => $page,
|
|
|
];
|
|
|
ViolationProductDataJobs::dispatch($message_data);
|
|
|
// ViolationProductDataJobs::dispatchSync($message_data);
|