修复 余额判断

This commit is contained in:
iVampireSP.com 2023-02-13 17:12:11 +08:00
parent e3eeb82696
commit f50b49ba05
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -425,14 +425,14 @@ public function changeStatus(
return false;
}
if (! $this->isCycle() && $user->hasBalance('0.5')) {
if (! $this->isCycle() && ! $user->hasBalance('0.5')) {
return false;
}
}
if ($status === 'running') {
return $this->run();
} elseif ($status === 'suspended' && ! $this->isCycle()) {
} elseif (($status === 'suspended' || $status === 'suspend') && ! $this->isCycle()) {
return $this->suspend();
} elseif ($status === 'stopped') {
return $this->stop();