AdminLog.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020-04-16
  7. *
  8. *
  9. */
  10. namespace app\controller\admin\system\admin;
  11. use crmeb\basic\BaseController;
  12. use app\common\repositories\system\admin\AdminLogRepository;
  13. use think\App;
  14. use think\db\exception\DataNotFoundException;
  15. use think\db\exception\DbException;
  16. use think\db\exception\ModelNotFoundException;
  17. class AdminLog extends BaseController
  18. {
  19. protected $repository;
  20. public function __construct(App $app, AdminLogRepository $repository)
  21. {
  22. parent::__construct($app);
  23. $this->repository = $repository;
  24. }
  25. /**
  26. * @return mixed
  27. * @throws DataNotFoundException
  28. * @throws DbException
  29. * @throws ModelNotFoundException
  30. * @author xaboy
  31. * @day 2020-04-16
  32. */
  33. public function lst()
  34. {
  35. [$page, $limit] = $this->getPage();
  36. $where = $this->request->params(['section_startTime', 'section_endTime', 'admin_id', 'method']);
  37. return app('json')->success($this->repository->lst(0, $where, $page, $limit));
  38. }
  39. }