From d654e01f959a4b1d29070c76d03ae1266a87c7e5 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Mon, 26 Oct 2020 15:39:06 +0800 Subject: [PATCH] fix: expired buy reset issue --- app/Http/Controllers/User/OrderController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/User/OrderController.php b/app/Http/Controllers/User/OrderController.php index 13a33f60..7a775dbd 100755 --- a/app/Http/Controllers/User/OrderController.php +++ b/app/Http/Controllers/User/OrderController.php @@ -94,8 +94,9 @@ class OrderController extends Controller } if ($request->input('cycle') === 'reset_price') { - if (!($user->expired_at > time() || $user->expired_at === NULL) && !$user->plan_id) - abort(500, '当前无法购买流量重置包'); + if (($user->expired_at <= time() || $user->expired_at !== NULL) && !$user->plan_id) { + abort(500, '当前无法购买流量重置包'); + } } DB::beginTransaction();