Files
zyt/server/app/command/QywxRetryPromotionAutomation.php
T
2026-08-31 15:17:34 +08:00

27 lines
746 B
PHP

<?php
declare(strict_types=1);
namespace app\command;
use app\common\service\qywx\QywxPromotionAutomationService;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class QywxRetryPromotionAutomation extends Command
{
protected function configure()
{
$this->setName('qywx:retry-promotion-automation')
->setDescription('补偿推广标签/备注/资料同步;过期欢迎语仅记过期,不补发');
}
protected function execute(Input $input, Output $output): int
{
$result = (new QywxPromotionAutomationService())->retryPending(100);
$output->writeln('QYWX_PROMOTION_RETRY ' . json_encode($result));
return $result['failed'] > 0 ? 1 : 0;
}
}