2025-03-12 10:47:34 +08:00

61 lines
1.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\adminapi\controller\v1\system;
use think\facade\App;
use app\adminapi\controller\AuthController;
use app\services\system\log\SystemLogServices;
use app\services\system\admin\SystemAdminServices;
/**
* 管理员操作记录表控制器
* Class SystemLog
* @package app\adminapi\controller\v1\system
*/
class SystemLog extends AuthController
{
/**
* 构造方法
* SystemLog constructor.
* @param App $app
* @param SystemLogServices $services
*/
public function __construct(App $app, SystemLogServices $services)
{
parent::__construct($app);
$this->services = $services;
$this->services->deleteLog();
}
/**
* 显示操作记录
*/
public function index()
{
$where = $this->request->getMore([
['pages', ''],
['path', ''],
['ip', ''],
['admin_id', ''],
['data', '', '', 'time'],
]);
return app('json')->success($this->services->getLogList($where, (int)$this->adminInfo['level']));
}
public function search_admin(SystemAdminServices $services)
{
$info = $services->getOrdAdmin('id,real_name', $this->adminInfo['level']);
return app('json')->success(compact('info'));
}
}