From 62b566e8b8a571cfc635f8c48a43e738efac7102 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 20 Aug 2020 18:31:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9C=B0=E5=9D=80=E5=A1=AB?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancialSummaryController.class.php | 2 +- Application/Admin/Model/CmdTasksModel.class.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index 7fcb028c0..4dd97fdc8 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -43,7 +43,7 @@ class FinancialSummaryController extends AdminController public function updateStatement() { $temp = date('Y',time()).'-'.(date('m',time())-1); - $params = "cd ".ROOTTTTT.";php admin.php FinancialSummarySet/setMonthFinancialSummary/recount/1/count_date/{$temp}"; + $params = "php admin.php FinancialSummarySet/setMonthFinancialSummary/recount/1/count_date/{$temp}"; $r = D("CmdTasks")->addTask("FinancialSummary",$params); if($r){ $this->ajaxReturn(["success"=>"ok"]); diff --git a/Application/Admin/Model/CmdTasksModel.class.php b/Application/Admin/Model/CmdTasksModel.class.php index c85f59722..8e9d47b19 100644 --- a/Application/Admin/Model/CmdTasksModel.class.php +++ b/Application/Admin/Model/CmdTasksModel.class.php @@ -41,12 +41,15 @@ class CmdTasksModel extends Model{ } } //插入任务 - public function addTask($type,$params,$need_tasksid = true) + public function addTask($type,$params,$need_tasksid = true,$need_path=true) { $task = $this->field("end_time")->where(['status'=>"1",'type'=>$type])->order("id desc")->find(); if(!empty($task)){ return false; } + if($need_path){ + $params = "cd ".ROOTTTTT.";".$params; + } if($need_tasksid){ $params = rtrim($params,";").'/taskid/{$taskid};'; }