27 lines
527 B
PHP
27 lines
527 B
PHP
<?php
|
|
|
|
|
|
namespace app\common\command;
|
|
|
|
|
|
use think\console\Command;
|
|
use think\console\Input;
|
|
use think\console\Output;
|
|
|
|
class ClearUserCp extends Command
|
|
{
|
|
protected function configure()
|
|
{
|
|
$this->setName('clear-user-cp')
|
|
->setDescription('清理过期cp关系');
|
|
}
|
|
|
|
protected function execute(Input $input, Output $output)
|
|
{
|
|
while (true) {
|
|
sleep(15);
|
|
$reslut = model('admin/Decorate')->clear_user_cp();
|
|
echo '清理cp成功!';
|
|
}
|
|
}
|
|
} |