改进 续费处理和增加方法
This commit is contained in:
parent
8c28e45c98
commit
308ed248f6
@ -138,6 +138,10 @@ public function renew(): bool
|
|||||||
|
|
||||||
$this->next_due_at = $this->getNewDueDate();
|
$this->next_due_at = $this->getNewDueDate();
|
||||||
|
|
||||||
|
if ($this->isSuspended()) {
|
||||||
|
$this->run();
|
||||||
|
}
|
||||||
|
|
||||||
$this->save();
|
$this->save();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -369,4 +373,13 @@ public function suspend(): bool
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function run(): bool
|
||||||
|
{
|
||||||
|
$this->update([
|
||||||
|
'status' => 'running',
|
||||||
|
]);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user