OrderMerchant.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author Qinii
  6. * @day 2020-07-18
  7. *
  8. *
  9. */
  10. namespace app\controller\merchant\store\order;
  11. use app\common\repositories\merchant\order\OrderMerchantRepository;
  12. use think\App;
  13. use crmeb\basic\BaseController;
  14. /**
  15. * 线下充值列表
  16. * Class OrderMerchant
  17. * @package app\controller\admin\system\merchant
  18. * @author php迷途小书童
  19. * @created 2021/2/3 13:38
  20. */
  21. class OrderMerchant extends BaseController
  22. {
  23. /**
  24. * @var OrderMerchantRepository
  25. */
  26. protected $repository;
  27. /**
  28. * @var int
  29. */
  30. protected $merId;
  31. /**
  32. * MerchantIntention constructor.
  33. * @param App $app
  34. * @param OrderMerchantRepository $repository
  35. */
  36. public function __construct(App $app, OrderMerchantRepository $repository)
  37. {
  38. parent::__construct($app);
  39. $this->repository = $repository;
  40. $this->merId = $this->request->merId();
  41. }
  42. /**
  43. * 线下充值列表
  44. * @return mixed
  45. * @author php迷途小书童
  46. * @created 2021/2/3 13:38
  47. */
  48. public function lst()
  49. {
  50. [$page, $limit] = $this->getPage();
  51. $where = $this->request->params(['keyword', 'date',"status"]);
  52. return app('json')->success($this->repository->getMerchantListAdmin($this->merId, $where, $page, $limit));
  53. }
  54. /**
  55. * 线下充值详情
  56. * @return mixed
  57. * @author php迷途小书童
  58. * @created 2021/2/3 13:37
  59. */
  60. public function detail($id){
  61. $detail = $this->repository->getOne($id);
  62. if (!$detail)
  63. return app('json')->fail('数据不存在');
  64. return app("json")->success("获取成功", $detail);
  65. }
  66. }