优化数据
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user