AdminLog.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\controller\admin\system\admin;
  12. use crmeb\basic\BaseController;
  13. use app\common\repositories\system\admin\AdminLogRepository;
  14. use think\App;
  15. use think\db\exception\DataNotFoundException;
  16. use think\db\exception\DbException;
  17. use think\db\exception\ModelNotFoundException;
  18. /**
  19. * 管理员操作记录
  20. */
  21. class AdminLog extends BaseController
  22. {
  23. protected $repository;
  24. public function __construct(App $app, AdminLogRepository $repository)
  25. {
  26. parent::__construct($app);
  27. $this->repository = $repository;
  28. }
  29. /**
  30. * 日志列表
  31. * @return mixed
  32. * @throws DataNotFoundException
  33. * @throws DbException
  34. * @throws ModelNotFoundException
  35. * @author xaboy
  36. * @day 2020-04-16
  37. */
  38. public function lst()
  39. {
  40. [$page, $limit] = $this->getPage();
  41. $where = $this->request->params(['section_startTime', 'section_endTime', 'admin_id', 'method', 'date','keyword']);
  42. return app('json')->success($this->repository->lst($this->request->merId(), $where, $page, $limit));
  43. }
  44. }