mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
将所有主要逻辑代码迁移到extend中,并在service中注册调用;
This commit is contained in:
@@ -4,21 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace app\tools\controller\timer;
|
||||
|
||||
use app\common\controller\TimerController;
|
||||
use think\facade\Db;
|
||||
use think\facade\Log;
|
||||
use think\Request;
|
||||
use base\tools\controller\timer\ClearLogBase;
|
||||
|
||||
class ClearLog extends TimerController
|
||||
class ClearLog extends ClearLogBase
|
||||
{
|
||||
|
||||
protected $frequency = 600;
|
||||
|
||||
public function do()
|
||||
{
|
||||
Log::debug('清除3天的日志');
|
||||
Db::name('debug_log')->where('create_time', '<', time() - 60 * 60 * 24 * 3)->delete();
|
||||
|
||||
return 'success';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user