LogsController.php 888 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\admin\controller\sys_manage;
  3. use app\admin\validate\sys_manage\AdvValidate;
  4. use app\controller\Curd;
  5. use app\model\Adv;
  6. use app\model\SysLog;
  7. use support\Request;
  8. use support\Response;
  9. class LogsController extends Curd
  10. {
  11. public function __construct()
  12. {
  13. $this->model = new SysLog();
  14. }
  15. /** 列表
  16. * @Desc
  17. * @Author Gorden
  18. * @Date 2024/3/5 10:00
  19. *
  20. * @param Request $request
  21. * @return Response
  22. * @throws \support\exception\BusinessException
  23. */
  24. public function select(Request $request): Response
  25. {
  26. [$where, $format, $limit, $field, $order] = $this->selectInput($request);
  27. $order = $request->get('order', 'desc');
  28. $field = $field ?? 'log_create_time';
  29. $query = $this->doSelect($where, $field, $order);
  30. return $this->doFormat($query, $format, $limit);
  31. }
  32. }