Browse Source

计划任务优化

lizhen_gitee 1 year ago
parent
commit
1a16481533
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/index/controller/Plantask.php

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

@@ -59,7 +59,7 @@ class Plantask extends Controller
     public function auto_user_active(){
         $actitime = time() - 7200;
 
-        $sql = 'update `mt_user` set is_active = 0 where id in (select user_id from mt_user_active where requesttime < '.$actitime.')';
+        $sql = 'update `mt_user` set is_active = 0 where is_active = 1 and id in (select user_id from mt_user_active where requesttime < '.$actitime.')';
         db()->query($sql);
     }