cmbYouku_Api/app/cmd/getRefundOrder.php

27 lines
801 B
PHP
Raw Normal View History

2024-07-01 15:57:07 +08:00
<?php
namespace app\cmd;
use app\model\Order;
use app\service\CmbService;
use app\service\OrderService;
use think\Collection;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class getRefundOrder extends Command
{
protected function configure()
{
$this->setName('getRefundOrder')->setDescription('退款订单查询接口');
}
protected function execute(Input $input, Output $output)
{
Order::where(['refund_status' => Order::REFUND_STATUS_WAIT])->field('*')->chunk(100, function (Collection $orderCollection) use (&$output){
foreach ($orderCollection as $order) {
CmbService::getRefundOrder($order);
}
});
$output->writeln("主动拉取退款订单查询接口完成");
}
}