StoreService.php 1.9 KB

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