From 87b9e0a9f990e8f5275d6b76e2aa234d2aff37aa Mon Sep 17 00:00:00 2001
From: mkm <727897186@qq.com>
Date: Thu, 24 Aug 2023 14:29:54 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/api/controller/CeshiController.php | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/api/controller/CeshiController.php b/app/api/controller/CeshiController.php
index a498aba70..2e901cc4c 100644
--- a/app/api/controller/CeshiController.php
+++ b/app/api/controller/CeshiController.php
@@ -40,14 +40,14 @@ class CeshiController extends BaseApiController
         $all=TaskTemplate::where('status',1)->with('company')->select()->toArray();
         // $all=TaskTemplate::where('id',73)->with('company')->select()->toArray();
         // $all=TaskSchedulingPlan::where('start_time','between',[$time,$tiem_end])->where('is_execute',0)->with(['template_info','scheduling'])->select()->toArray();
-        $company_id=0;
+        $company_id=[];
         foreach($all as $k=>$v){
-            TaskLogic::CronAdd($v);
-            $company_id=$v['company_id'];
+            // TaskLogic::CronAdd($v);
+            $company_id[]=$v['company_id'];
         }
-        if($company_id!=0){
-            
-            Company::where('id',$company_id)->inc('day_count')->update();
+        $arr=array_unique($company_id);
+        if(count($arr)){
+            Company::where('id','in',$arr)->inc('day_count')->update();
         }
     }
 
@@ -74,10 +74,10 @@ class CeshiController extends BaseApiController
         }
     }
 
-    public function ceshi2(){
-        $
-        $b=app(RemoteController::class)->shang_date_list('');
+    // public function ceshi2(){
+    //     $
+    //     $b=app(RemoteController::class)->shang_date_list('');
 
-    }
+    // }
 
 }
\ No newline at end of file