Wang Chen 4 سال پیش
والد
کامیت
26788454bd
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      app/Cache/Activity/ActivityCache.php
  2. 1 1
      app/Modules/Activity/Models/Activity.php

+ 1 - 1
app/Cache/Activity/ActivityCache.php

@@ -23,7 +23,7 @@ class ActivityCache
 
     public static function zAddActivityUv($activityId, $date, $uid): bool
     {
-        $cacheKey = Utils::getCacheKey('activity.statUv', [$activityId, $date]);
+        $cacheKey = Utils::getCacheKey('activity.statsUv', [$activityId, $date]);
         Redis::zAdd($cacheKey, time(), $uid);
         $ttl = Redis::ttl($cacheKey);
         if ((int)$ttl < 1) {

+ 1 - 1
app/Modules/Activity/Models/Activity.php

@@ -52,7 +52,7 @@ class Activity extends Model
     {
         $result = self::where([
             ['qapp_account_id', '>', 0],
-            ['end_time', '<=', date('Y-m-d H:i:s')],
+            ['end_time', '>=', date('Y-m-d H:i:s')],
         ])->get();
 
         return $result ? $result->toArray() : [];