jobSend($mall_id); } } return ExitCode::OK; } catch (\Exception $e) { echo $e->getMessage(); $this->stderr('Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR)); return ExitCode::UNSPECIFIED_ERROR; } } public function actionSendPension() { try { $malls = Mall::getEnableMallList(); $service=new PensionService(); if(!empty($malls)) { foreach ($malls as $mall) { $mall_id = $mall['id']; $service->jobSend($mall_id); } } return ExitCode::OK; } catch (\Exception $e) { echo $e->getMessage(); $this->stderr('Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR)); return ExitCode::UNSPECIFIED_ERROR; } } /** * 自动发放加权分红佣金定时任务 * 0 20 0 * * * * * @return int */ public function actionPoolRun(){ try { $logic = new PoolLogLogic(); $res = $logic->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; } } }