69 lines
2.2 KiB
PHP
69 lines
2.2 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||
// +----------------------------------------------------------------------
|
||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||
// | 开源版本可自由商用,可去除界面版权logo
|
||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||
// | 访问官网:https://www.likeadmin.cn
|
||
// | likeadmin团队 版权所有 拥有最终解释权
|
||
// +----------------------------------------------------------------------
|
||
// | author: likeadminTeam
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\adminapi\controller\setting\system;
|
||
|
||
|
||
use app\adminapi\controller\BaseAdminController;
|
||
use app\adminapi\lists\setting\system\LogLists;
|
||
use app\adminapi\logic\setting\system\OperationLogLogic;
|
||
use app\adminapi\validate\setting\OperationLogValidate;
|
||
|
||
/**
|
||
* 系统日志
|
||
* Class LogController
|
||
* @package app\adminapi\controller\setting\system
|
||
*/
|
||
class LogController extends BaseAdminController
|
||
{
|
||
/**
|
||
* @notes 查看系统日志列表
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2021/8/3 4:25 下午
|
||
*/
|
||
public function lists()
|
||
{
|
||
return $this->dataLists(new LogLists());
|
||
}
|
||
/**
|
||
* @notes 删除已选择的系统日志
|
||
* @return \think\response\Json
|
||
* @author 段誉
|
||
* @date 2022/6/15 19:00
|
||
*/
|
||
public function delete()
|
||
{
|
||
$params = (new OperationLogValidate())->post()->goCheck('id');
|
||
$result = OperationLogLogic::deleteTable($params);
|
||
if (true === $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OperationLogLogic::getError());
|
||
}
|
||
/**
|
||
* @notes 删除系统日志
|
||
* @return \think\response\Json
|
||
* @author 段誉
|
||
* @date 2022/6/15 19:00
|
||
*/
|
||
public function deleteAll()
|
||
{
|
||
$result = OperationLogLogic::deleteAll();
|
||
if (true === $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OperationLogLogic::getError());
|
||
}
|
||
} |