Files
mier-php/application/common/command/ClearUserCp.php

27 lines
527 B
PHP
Raw Normal View History

2025-08-11 10:22:05 +08:00
<?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成功!';
}
}
}