BroadcastRoom.php 910 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020/7/31
  7. *
  8. *
  9. */
  10. namespace app\controller\api\store\broadcast;
  11. use app\common\repositories\store\broadcast\BroadcastRoomRepository;
  12. use crmeb\basic\BaseController;
  13. use think\App;
  14. class BroadcastRoom extends BaseController
  15. {
  16. /**
  17. * @var BroadcastRoomRepository
  18. */
  19. protected $repository;
  20. public function __construct(App $app, BroadcastRoomRepository $repository)
  21. {
  22. parent::__construct($app);
  23. $this->repository = $repository;
  24. }
  25. public function lst()
  26. {
  27. [$page, $limit] = $this->getPage();
  28. return app('json')->success($this->repository->userList([], $page, $limit));
  29. }
  30. public function hot()
  31. {
  32. [$page, $limit] = $this->getPage();
  33. $where = ['hot' => 1];
  34. return app('json')->success($this->repository->userList($where, $page, $limit));
  35. }
  36. }