Sfoglia il codice sorgente

在线用户的活跃时间,缩短为600秒前

lizhen_gitee 2 anni fa
parent
commit
30e494d1c6

+ 1 - 1
application/api/controller/Usercenter.php

@@ -795,7 +795,7 @@ class Usercenter extends Api
             'gender' => $this->auth->gender == 1 ? 0 : 1,        //异性
             //'real_status' => 1,                                 //真人认证
             //'idcard_status' => 1,                               //实名认证
-            'is_active' => 1,                                   //在线的
+            //'is_active' => 1,                                   //在线的
             //打开聊天开关的
             'open_match_typing' => 1,                            //打开文字聊天开关的
             'id' => ['NOT IN',$my_follow]                        //不是好友的

+ 1 - 1
application/index/controller/Plantask.php

@@ -13,7 +13,7 @@ class Plantask extends Controller
 
     //定时跑用户活跃,改成离线
     public function user_active(){
-        $actitime = time() - 7200;
+        $actitime = time() - 600;
         //$map = ['requesttime' < $actitime];
 
         $sql = 'update `mt_user` set is_active = 0 where id in (select user_id from mt_user_active where requesttime < '.$actitime.')';