改进 续费处理和增加方法

This commit is contained in:
iVampireSP.com 2023-02-13 02:54:50 +08:00
parent 8c28e45c98
commit 308ed248f6
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -138,6 +138,10 @@ public function renew(): bool
$this->next_due_at = $this->getNewDueDate();
if ($this->isSuspended()) {
$this->run();
}
$this->save();
return true;
@ -369,4 +373,13 @@ public function suspend(): bool
return true;
}
public function run(): bool
{
$this->update([
'status' => 'running',
]);
return true;
}
}