DeliveryOrder.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 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\delivery;
  12. use app\common\repositories\delivery\DeliveryOrderRepository;
  13. use crmeb\basic\BaseController;
  14. use think\App;
  15. /**
  16. * 同城配送订单
  17. */
  18. class DeliveryOrder extends BaseController
  19. {
  20. protected $repository;
  21. public function __construct(App $app, DeliveryOrderRepository $repository)
  22. {
  23. parent::__construct($app);
  24. $this->repository = $repository;
  25. }
  26. /**
  27. * 列表
  28. * @return \think\response\Json
  29. * @author Qinii
  30. */
  31. public function lst()
  32. {
  33. [$page, $limit] = $this->getPage();
  34. $where = $this->request->params(['keyword', 'station_name', 'status', 'mer_id', 'date', 'order_sn', 'station_type']);
  35. $data = $this->repository->sysList($where, $page, $limit);
  36. return app('json')->success($data);
  37. }
  38. /**
  39. * 详情
  40. * @param $id
  41. * @return \think\response\Json
  42. * @author Qinii
  43. */
  44. public function detail($id)
  45. {
  46. $data = $this->repository->detail($id, null);
  47. return app('json')->success($data);
  48. }
  49. /**
  50. * 标题
  51. * @return \think\response\Json
  52. * @author Qinii
  53. */
  54. public function title()
  55. {
  56. $data = $this->repository->getTitle();
  57. return app('json')->success($data);
  58. }
  59. }