|
|
@@ -9,7 +9,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
|
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
use App\Facades\Servers\Logs\Log;
|
|
|
-use App\Models\Manager\WashConfig\ViolationStore as ViolationStoreModel;
|
|
|
+use App\Models\Manager\WashConfig\ViolationCompany as ViolationCompanyModel;
|
|
|
use App\Models\Manager\Process\ExecuteLog as ExecuteLogModel;
|
|
|
use App\Jobs\Manager\Process\ViolationStoreDataJobs;
|
|
|
|
|
|
@@ -41,7 +41,7 @@ class ViolationStoreJobs implements ShouldQueue
|
|
|
public function handle()
|
|
|
{
|
|
|
try {
|
|
|
- $ViolationStoreModel = new ViolationStoreModel();
|
|
|
+ $ViolationCompanyModel = new ViolationCompanyModel();
|
|
|
$limit = isset($this->message_data['limit']) ? $this->message_data['limit'] : 50;
|
|
|
$page = isset($this->message_data['page']) ? $this->message_data['page'] : 1;
|
|
|
$executeLog_id = isset($this->message_data['executeLog_id']) ? $this->message_data['executeLog_id'] : 0;
|
|
|
@@ -53,13 +53,13 @@ class ViolationStoreJobs implements ShouldQueue
|
|
|
$insert_data =['company_id'=>$company_id,'name' =>'违规挂网店铺', 'code' => 'ViolationStoreJobs', 'admin_id' => $admin_id,'is_admin' => $is_admin];
|
|
|
$executeLog_id=$ExecuteLogModel->addExecuteLog_content($insert_data);
|
|
|
}
|
|
|
- $ViolationStoreModel = $ViolationStoreModel->leftjoin('washconfig_company_category', 'washconfig_company_category.id', '=', 'washconfig_violation_company.category_id')
|
|
|
+ $ViolationCompanyModel = $ViolationCompanyModel->leftjoin('washconfig_company_category', 'washconfig_company_category.id', '=', 'washconfig_violation_company.category_id')
|
|
|
->where('washconfig_violation_company.status', 0)->where('company_type', 1)->select(['washconfig_violation_company.*','washconfig_company_category.name as category_name']);
|
|
|
if($company_id){
|
|
|
- $ViolationStoreModel = $ViolationStoreModel->where('washconfig_violation_company.company_id', $company_id);
|
|
|
+ $ViolationCompanyModel = $ViolationCompanyModel->where('washconfig_violation_company.company_id', $company_id);
|
|
|
}
|
|
|
$totle_page = 0;
|
|
|
- $list_config_data = $ViolationStoreModel->paginate($limit, ['*'], 'page', $page)->toarray();
|
|
|
+ $list_config_data = $ViolationCompanyModel->paginate($limit, ['*'], 'page', $page)->toarray();
|
|
|
if (!$list_config_data || empty($list_config_data['data'])) {
|
|
|
if($page == 1 && $executeLog_id){
|
|
|
$ExecuteLogModel->where('id', $executeLog_id)->update(['status' => 0,'update_time'=> time()]);
|