You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.6 KiB
55 lines
1.6 KiB
<?php
|
|
declare (strict_types=1);
|
|
|
|
namespace app\api\controller;
|
|
|
|
use think\App;
|
|
|
|
/**
|
|
* 系统日志
|
|
* @package app\api\controller
|
|
*/
|
|
class Log extends Common
|
|
{
|
|
public $model = null;
|
|
|
|
public function __construct(App $app)
|
|
{
|
|
parent::__construct($app);
|
|
$this->model = new \app\api\model\Log();
|
|
}
|
|
/**
|
|
* @OA\Get (
|
|
* path="log/index",tags={"日志管理"},summary="获取日志列表",description="根据相关参数获取日志列表",
|
|
* @OA\Parameter(ref="#/components/parameters/token"),
|
|
* @OA\Parameter(name="username",in="query",description="管理员名称",@OA\Schema (type="string")),
|
|
* @OA\Parameter(name="model",in="query",description="操作模块",@OA\Schema (type="string")),
|
|
* @OA\Parameter (name="page",in="query",description="当前页码",@OA\Schema (type="integer",format="int15")),
|
|
* @OA\Parameter (name="limit",in="query",description="分页数量",@OA\Schema (type="integer",format="int15")),
|
|
* @OA\Response(
|
|
* response=200,
|
|
* description="返回管理员用户数据信息",
|
|
* @OA\JsonContent(ref="#/components/schemas/LogMsgExport"),
|
|
* ),
|
|
* ),
|
|
*/
|
|
public function index()
|
|
{
|
|
//接受参数
|
|
$_get = $this->request->get();
|
|
|
|
//验证参数
|
|
validate(\app\api\validate\Log::class)->check($_get);
|
|
|
|
//指定搜索参数
|
|
$this->model->search_arr = ['username','model'];
|
|
|
|
//数据处理
|
|
$_data = $this->model->index();
|
|
|
|
//返回数据
|
|
return send_http_status($_data);
|
|
}
|
|
|
|
|
|
}
|
|
|