execute(); if($res == true) { echo '操作成功'; return ExitCode::OK; } } catch (\Exception $e) { echo $e->getMessage(); $this->stderr('Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR)); return ExitCode::UNSPECIFIED_ERROR; } } public function actionFix(){ try { $logic = new CommissionLogLogic(); // $res = $logic->fix(3,'20230108'); // if($res == true) { // echo '操作成功'; // return ExitCode::OK; // } } catch (\Exception $e) { echo $e->getMessage(); $this->stderr('Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR)); return ExitCode::UNSPECIFIED_ERROR; } } }