33 lines
716 B
PHP
33 lines
716 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
namespace app\common\command;
|
||
|
|
|
||
|
|
|
||
|
|
use think\console\Command;
|
||
|
|
use think\console\Input;
|
||
|
|
use think\console\Output;
|
||
|
|
|
||
|
|
class ClearUserVip extends Command
|
||
|
|
{
|
||
|
|
protected function configure()
|
||
|
|
{
|
||
|
|
$this->setName('clear-user-vip')
|
||
|
|
->setDescription('到期会员清除');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 下单一段时间 没有人接单 自动关闭订单
|
||
|
|
* @param Input $input
|
||
|
|
* @param Output $output
|
||
|
|
* @return int|void|null
|
||
|
|
* @throws \think\Exception
|
||
|
|
* @throws \think\exception\PDOException
|
||
|
|
*/
|
||
|
|
protected function execute(Input $input, Output $output)
|
||
|
|
{
|
||
|
|
$reslut = model('api/Vip')->close_user_vip();
|
||
|
|
echo '到期会员清除!'.PHP_EOL;;
|
||
|
|
}
|
||
|
|
}
|