소스 검색

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

lizhen_gitee 1 년 전
부모
커밋
b7454e7af7
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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);
+    }
+
 }