Browse Source

禁言到期自动解禁,计划任务

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

+ 6 - 0
application/index/controller/Plantask.php

@@ -69,4 +69,10 @@ class Plantask extends Controller
         db()->query($sql);
     }
 
+    //禁言到期的,自动解禁
+    public function auto_jinyan(){
+        $sql = 'update `mt_user` set jinyantype = 1,jinyantime = 0 where jinyantype = 2 and jinyantime < '.time().'';
+        db()->query($sql);
+    }
+
 }