improve login notify + migrate torrent purchase to announce

This commit is contained in:
xiaomlove
2023-04-09 14:53:15 +08:00
parent 4535ba94a4
commit 33b16ed7ac
9 changed files with 86 additions and 62 deletions
+6 -7
View File
@@ -13,14 +13,14 @@ class UserLoginNotify extends Command
*
* @var string
*/
protected $signature = 'user:login_notify {--this_id=} {--last_id=}';
protected $signature = 'user:login_notify {--this_id=}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send login notify, option: --this_id, --last_id';
protected $description = 'Send login notify, option: --this_id';
/**
* Execute the console command.
@@ -30,13 +30,12 @@ class UserLoginNotify extends Command
public function handle()
{
$thisId = $this->option('this_id');
$lastId = $this->option('last_id');
$this->info("thisId: $thisId, lastId: $lastId");
if (!$thisId || !$lastId) {
$this->error("require option --this_id=? and --last_id=?");
$this->info("thisId: $thisId");
if (!$thisId) {
$this->error("require option --this_id=?");
return Command::FAILURE;
}
SendLoginNotify::dispatch($thisId, $lastId);
SendLoginNotify::dispatch($thisId);
return Command::SUCCESS;
}
}