37 lines
860 B
PHP
37 lines
860 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
namespace app\common\command;
|
||
|
|
|
||
|
|
|
||
|
|
use think\console\Command;
|
||
|
|
use think\console\Input;
|
||
|
|
use think\console\Output;
|
||
|
|
|
||
|
|
class GiveUserRoomWeekEarnings extends Command
|
||
|
|
{
|
||
|
|
protected function configure()
|
||
|
|
{
|
||
|
|
$this->setName('give-user-room-week-earnings')
|
||
|
|
->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)
|
||
|
|
{
|
||
|
|
while (true) {
|
||
|
|
sleep(1);
|
||
|
|
$tid = input('tid', 0);
|
||
|
|
$is_reset = input('is_reset', 0);
|
||
|
|
model('api/RoomSubsidy')->give_user_room_week_earnings(0);
|
||
|
|
echo '发送用户收益!'.PHP_EOL;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|