更新
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user