StoreService.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\controller\admin\store;
  12. use think\App;
  13. use crmeb\basic\BaseController;
  14. use app\common\repositories\store\service\StoreServiceLogRepository;
  15. use app\common\repositories\store\service\StoreServiceRepository;
  16. class StoreService extends BaseController
  17. {
  18. /**
  19. * @var StoreServiceRepository
  20. */
  21. protected $repository;
  22. /**
  23. * @var StoreServiceLogRepository
  24. */
  25. protected $logRepository;
  26. /**
  27. * StoreService constructor.
  28. * @param App $app
  29. * @param StoreServiceRepository $repository
  30. */
  31. public function __construct(App $app, StoreServiceRepository $repository,StoreServiceLogRepository $logRepository)
  32. {
  33. parent::__construct($app);
  34. $this->repository = $repository;
  35. $this->logRepository = $logRepository;
  36. }
  37. /**
  38. * TODO
  39. * @param $id
  40. * @return mixed
  41. * @author Qinii
  42. * @day 2020-06-19
  43. */
  44. public function lst($id)
  45. {
  46. $where = $this->request->params(['keyword', 'status']);
  47. [$page, $limit] = $this->getPage();
  48. $where['mer_id'] = $id;
  49. return app('json')->success($this->repository->getList($where, $page, $limit));
  50. }
  51. /**
  52. * TODO
  53. * @param $uid
  54. * @param $id
  55. * @return mixed
  56. * @author Qinii
  57. * @day 2020-06-19
  58. */
  59. public function getUserMsnByMerchant($uid,$id)
  60. {
  61. [$page, $limit] = $this->getPage();
  62. return app('json')->success($this->logRepository->getUserMsn($uid, $page, $limit,$id));
  63. }
  64. /**
  65. * TODO
  66. * @param $id
  67. * @return mixed
  68. * @author Qinii
  69. * @day 2020-06-19
  70. */
  71. public function merchantUserList($id)
  72. {
  73. [$page, $limit] = $this->getPage();
  74. return app('json')->success( $this->logRepository->getMerchantUserList($id, $page, $limit));
  75. }
  76. }