From e07b97b14e673fa9fd144040098cc5caa88a2b4c Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Tue, 11 Feb 2020 13:31:58 +0800 Subject: [PATCH] fix order renew --- app/Http/Controllers/User/OrderController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/User/OrderController.php b/app/Http/Controllers/User/OrderController.php index c01c9eeb..4669adf5 100755 --- a/app/Http/Controllers/User/OrderController.php +++ b/app/Http/Controllers/User/OrderController.php @@ -85,11 +85,11 @@ class OrderController extends Controller abort(500, '该订阅不存在'); } - if (!$plan->show) { + if (!$plan->show && !$plan->renew) { abort(500, '该订阅已售罄'); } - if (!$plan->renew) { + if (!$plan->renew && $user->plan_id == $plan->id) { abort(500, '该订阅无法续费,请更换其他订阅'); }