AgentList.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020/6/23
  7. *
  8. *
  9. */
  10. namespace app\controller\admin\user;
  11. use app\common\repositories\store\order\AgentOrderRepository;
  12. use crmeb\basic\BaseController;
  13. use think\App;
  14. class AgentList extends BaseController
  15. {
  16. protected $repository;
  17. public function __construct(App $app, AgentOrderRepository $repository)
  18. {
  19. parent::__construct($app);
  20. $this->repository = $repository;
  21. }
  22. public function getList()
  23. {
  24. [$page, $limit] = $this->getPage();
  25. $where = $this->request->params(['keyword', 'date', 'type','identity']);
  26. return app('json')->success($this->repository->getList($where, $page, $limit));
  27. }
  28. public function type()
  29. {
  30. return app('json')->success($this->repository->type());
  31. }
  32. public function agentCount()
  33. {
  34. [$page, $limit] = $this->getPage();
  35. $where = $this->request->params(['keyword', 'date', 'type','identity']);
  36. return app('json')->success($this->repository->agentCount($where, $page, $limit));
  37. }
  38. }