| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- /**
- * 门店股东分红 定时任务
- */
- namespace addons\Store\console\controllers;
- use addons\Store\common\logic\addons\Boss\BonusCommissionLogic;
- use yii\console\Controller;
- use yii\console\ExitCode;
- class StoreBossCrontabController extends Controller
- {
- /**
- * 发放门店股东分红佣金定时任务
- * 0 31 0 * * *
- * @Author: lun
- * @DateTime: 2022/11/17 0017 20:38
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @return int
- */
- public function actionMallSendCommission(){
- try {
- $logic = new BonusCommissionLogic();
- // $res = $logic->executeMall();
- // if($res == true) {
- // echo 'executeMall操作成功';
- // }
- $res = $logic->executeStore();
- if($res == true) {
- echo 'executeStore操作成功';
- }
- return ExitCode::OK;
- } catch (\Exception $e) {
- echo $e->getMessage();
- $this->stderr('Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR));
- return ExitCode::UNSPECIFIED_ERROR;
- }
- }
- }
|