| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace addons\WangDianTong\console\controllers;
- use addons\WangDianTong\common\service\LogisticsSyncQueryService;
- use common\helpers\FormatHelper;
- use yii\console\Controller;
- use yii\console\ExitCode;
- class LogisticsTaskController extends Controller
- {
- /**
- * 同步发货订单
- * @return int
- */
- public function actionSync(): int
- {
- try {
- // 执行
- (new LogisticsSyncQueryService())->sync();
- return ExitCode::OK;
- } catch (\Exception $e) {
- FormatHelper::exception($e, __CLASS__);
- return ExitCode::UNSPECIFIED_ERROR;
- }
- }
- }
|