From 15be3f7b3fc313fe3d40b40e1d9e8d16dd938390 Mon Sep 17 00:00:00 2001 From: xuanchen <122383162@qq.com> Date: Tue, 6 Jul 2021 11:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/User.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index bd0f2b6..517d5b9 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -145,7 +145,7 @@ class User extends Authenticatable * @param string $date * @return int */ - public function getCouponCount($type, $date = '') + public function getCouponCount($type, $date = ''): int { $data = $this->checkCouponCount($date); @@ -169,7 +169,6 @@ class User extends Authenticatable */ public function checkCouponCount($date) { - $date = $date ? 'today' : 'all'; $name = "user_{$this->id}_coupon_count_date_{$date}"; if (Cache::has($name)) {