初始化代码
This commit is contained in:
38
application/common/command/GivesUserGuildWeekEarnings.php
Normal file
38
application/common/command/GivesUserGuildWeekEarnings.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\command;
|
||||
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
class GivesUserGuildWeekEarnings extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('gives-user-guild-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)
|
||||
{
|
||||
model('api/GuildSubsidy')->gives_user_guild_week_earnings($type);
|
||||
while (true) {
|
||||
sleep(1);
|
||||
$tid = input('tid', 0);
|
||||
$is_reset = input('is_reset', 0);
|
||||
model('api/GuildSubsidy')->gives_user_guild_week_earnings(0);
|
||||
echo '统计公会长收益!'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user