Browse Source

会员升级

Kirin 7 months ago
parent
commit
8a90a66544
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/controller/api/v1/PublicController.php

+ 4 - 4
app/controller/api/v1/PublicController.php

@@ -72,9 +72,9 @@ class PublicController extends BaseController
 
     public function test()
     {
-        $max_id = CacheService::redisHandler()::get('max_id', 0);
+        $max_id = CacheService::redisHandler()->get('max_id', 0);
         $list = UserIntegral::where('type', 0)->where('status', 0)->order('id asc')->where('id', '>', $max_id)->limit(300)->select();
-        $last_time = CacheService::redisHandler()::get('last_time', 0);
+        $last_time = CacheService::redisHandler()->get('last_time', 0);
         $service = app()->make(AwardIntegralServices::class);
         echo date('Y-m-d', $list[0]['add_time']) . '<br>';
         foreach ($list as $v) {
@@ -90,8 +90,8 @@ class PublicController extends BaseController
             $last_time = $v['add_time'];
             $max_id = $v['id'];
         }
-        CacheService::redisHandler()::set('max_id', $max_id);
-        CacheService::redisHandler()::set('last_time', $last_time);
+        CacheService::redisHandler()->set('max_id', $max_id);
+        CacheService::redisHandler()->set('last_time', $last_time);
 
         if (count($list) < 300 && strtotime(date('Y-m-d', $last_time)) < strtotime(date('Y-m-d'))) {
             echo date('Y-m-d') . '<br>';