diff --git a/Application/Admin/Controller/CmdTasksController.class.php b/Application/Admin/Controller/CmdTasksController.class.php index ef64100e7..f8ab13fdc 100644 --- a/Application/Admin/Controller/CmdTasksController.class.php +++ b/Application/Admin/Controller/CmdTasksController.class.php @@ -20,7 +20,7 @@ class CmdTasksController extends Controller { $cmd = $params['params']; $cmd = str_replace('{$taskid}',$taskid,$cmd); try { - system($cmd); + exec($cmd); } catch (\Exception $e) { D("CmdTasks")->updateTask(['id'=>$params['id'],'status' => 3, 'end_time' => time(), 'result' => $e->getMessage()]); } diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 2a67d37c8..8baa03e63 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -537,16 +537,16 @@ class CompanyStatementSetController extends Controller { $pc =[]; $Promote = M("Promote","tab_"); foreach ($tmpp as $v) { - //获取会长的支付宝账号 - $p_map = [ - "company_id"=>$v['id'], - "withdraw_done"=>1 - ]; - $pres = $Promote->field("alipay_account,alipay_real_name")->where($p_map)->find(); - if(!empty($pres) && !empty($pres['alipay_account']) && !empty($pres['alipay_real_name'])){ - $v['ali_user'] = $pres['alipay_real_name']; - $v['ali_account'] = $pres['alipay_account']; - } + // //获取会长的支付宝账号 + // $p_map = [ + // "company_id"=>$v['id'], + // "withdraw_done"=>1 + // ]; + // $pres = $Promote->field("alipay_account,alipay_real_name")->where($p_map)->find(); + // if(!empty($pres) && !empty($pres['alipay_account']) && !empty($pres['alipay_real_name'])){ + // $v['ali_user'] = $pres['alipay_real_name']; + // $v['ali_account'] = $pres['alipay_account']; + // } if($v['has_ratio']){ $v['turnover_ratio'] = json_decode($v['turnover_ratio'],true); } diff --git a/Application/Admin/Model/CmdTasksModel.class.php b/Application/Admin/Model/CmdTasksModel.class.php index ace3a88d2..ccf7bc0cd 100644 --- a/Application/Admin/Model/CmdTasksModel.class.php +++ b/Application/Admin/Model/CmdTasksModel.class.php @@ -48,7 +48,12 @@ class CmdTasksModel extends Model{ return false; } if($need_path){ - $params = "cd ".ROOTTTTT.";".$params; + if(IS_WIN){ + $p = explode(':',ROOTTTTT); + $params = "{$p[0]}:&".'cd "'.$p[1].'"&'.$params; + }else{ + $params = "cd ".ROOTTTTT.";".$params; + } } if($need_tasksid){ $params = rtrim($params,";").'/taskid/{$taskid};';