From 051ca650213cfd24fe0b76b5a794704d5be754da Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Tue, 19 Sep 2023 14:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BB=BB=E5=8A=A1=E4=B8=8B?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/CeshiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/controller/CeshiController.php b/app/api/controller/CeshiController.php index 6fca76bcc..01b590526 100644 --- a/app/api/controller/CeshiController.php +++ b/app/api/controller/CeshiController.php @@ -153,7 +153,7 @@ class CeshiController extends BaseApiController { $time = strtotime(date('Y-m-d')); // $tiem_end=$time+86399; - $plan_all = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->with('company_info')->select()->toArray(); + $plan_all = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->where('company_type', 18)->with('company_info')->select()->toArray(); $plan_ids = []; foreach ($plan_all as $k => $v) { @@ -165,15 +165,15 @@ class CeshiController extends BaseApiController unset($plan_all[$k]); } } - $company_id = []; foreach ($plan_all as $k => $v) { foreach ($v['template'] as $kk => $vv) { - TaskLogic::CronAdd($vv,$v); + queue(TaskAdd::class,['data'=>$vv,'data_two'=>$v]); } $company_id[] = $v['company_id']; } Company::where('id', 'in', $company_id)->inc('day_count')->update(); TaskScheduling::where('id', 'in', $plan_ids)->update(['cron_time' => time()]); + Log::info('定时任务下发执行成功' . date('Y-m-d H:i:s')); } }