SupplierController.php 1.0 KB

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