update: order fetch speed limit

This commit is contained in:
tokumeikoi 2022-11-26 22:19:19 +08:00
parent e86ac44b2a
commit f9e2afe9d1

View File

@ -71,6 +71,8 @@ class OrderService
break; break;
} }
$this->setSpeedLimit($plan->speed_limit);
if (!$this->user->save()) { if (!$this->user->save()) {
DB::rollBack(); DB::rollBack();
abort(500, '开通失败'); abort(500, '开通失败');
@ -253,6 +255,11 @@ class OrderService
return true; return true;
} }
private function setSpeedLimit($speedLimit)
{
$this->user->speed_limit = $speedLimit;
}
private function buyByResetTraffic() private function buyByResetTraffic()
{ {
$this->user->u = 0; $this->user->u = 0;