27 lines
801 B
PHP
27 lines
801 B
PHP
<?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("主动拉取退款订单查询接口完成");
|
|
}
|
|
|
|
} |