StoreService.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. namespace app\controller\admin\store;
  3. use think\App;
  4. use ln\basic\BaseController;
  5. use app\common\repositories\store\service\StoreServiceLogRepository;
  6. use app\common\repositories\store\service\StoreServiceRepository;
  7. class StoreService extends BaseController
  8. {
  9. /**
  10. * @var StoreServiceRepository
  11. */
  12. protected $repository;
  13. /**
  14. * @var StoreServiceLogRepository
  15. */
  16. protected $logRepository;
  17. /**
  18. * StoreService constructor.
  19. * @param App $app
  20. * @param StoreServiceRepository $repository
  21. */
  22. public function __construct(App $app, StoreServiceRepository $repository,StoreServiceLogRepository $logRepository)
  23. {
  24. parent::__construct($app);
  25. $this->repository = $repository;
  26. $this->logRepository = $logRepository;
  27. }
  28. /**
  29. * TODO
  30. * @param $id
  31. * @return mixed
  32. * @author Qinii
  33. * @day 2020-06-19
  34. */
  35. public function lst($id)
  36. {
  37. $where = $this->request->params(['keyword', 'status']);
  38. [$page, $limit] = $this->getPage();
  39. $where['mer_id'] = $id;
  40. return app('json')->success($this->repository->getList($where, $page, $limit));
  41. }
  42. /**
  43. * TODO
  44. * @param $uid
  45. * @param $id
  46. * @return mixed
  47. * @author Qinii
  48. * @day 2020-06-19
  49. */
  50. public function getUserMsnByMerchant($uid,$id)
  51. {
  52. [$page, $limit] = $this->getPage();
  53. return app('json')->success($this->logRepository->getUserMsn($uid, $page, $limit,$id));
  54. }
  55. /**
  56. * TODO
  57. * @param $id
  58. * @return mixed
  59. * @author Qinii
  60. * @day 2020-06-19
  61. */
  62. public function merchantUserList($id)
  63. {
  64. [$page, $limit] = $this->getPage();
  65. return app('json')->success( $this->logRepository->getMerchantUserList($id, $page, $limit));
  66. }
  67. }