From f9e2afe9d18783cc7608a4e35a6b4dbeca0c7c06 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Sat, 26 Nov 2022 22:19:19 +0800 Subject: [PATCH] update: order fetch speed limit --- app/Services/OrderService.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index 792a01ec..4532379f 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -71,6 +71,8 @@ class OrderService break; } + $this->setSpeedLimit($plan->speed_limit); + if (!$this->user->save()) { DB::rollBack(); abort(500, '开通失败'); @@ -253,6 +255,11 @@ class OrderService return true; } + private function setSpeedLimit($speedLimit) + { + $this->user->speed_limit = $speedLimit; + } + private function buyByResetTraffic() { $this->user->u = 0;