You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Controller\v3;
  3. use App\Controller\BaseController;
  4. use App\Service\v3\Interfaces\HorsemanServiceInterface;
  5. use Hyperf\Di\Annotation\Inject;
  6. use App\Service\v3\Interfaces\OrderOnlineServiceInterface;
  7. class HorsemanController extends BaseController
  8. {
  9. /**
  10. * @Inject
  11. * @var HorsemanServiceInterface
  12. */
  13. protected $horsemanService;
  14. /**
  15. * @Inject
  16. * @var OrderOnlineServiceInterface
  17. */
  18. protected $orderOnlineService;
  19. public function getOrderList()
  20. {
  21. $orderMainList = $this->horsemanService->getOrderList();
  22. return $this->success(['order_list' => $orderMainList]);
  23. }
  24. public function getOrderInfo()
  25. {
  26. $globalOrderId = $this->request->input('global_order_id', -1);
  27. $orderMain = $this->orderOnlineService->getOrderInfo($globalOrderId);
  28. return $this->success(['order' => $orderMain]);
  29. }
  30. public function setHorsemanCoordinate()
  31. {
  32. $employeesId = $this->request->input('employees_id', -1);
  33. $coordinate = $this->request->input('coordinate', -1);
  34. return $this->success($this->horsemanService->setHorsemanCoordinate($employeesId,$coordinate));
  35. }
  36. public function getHorsemanCoordinate()
  37. {
  38. $employeesId = $this->request->input('employees_id', -1);
  39. $coordinate = $this->horsemanService->getHorsemanCoordinate($employeesId);
  40. return $this->success(['coordinate' => $coordinate]);
  41. }
  42. public function getOrderCoordinate()
  43. {
  44. $globalOrderId = $this->request->input('global_order_id', -1);
  45. return $this->success($this->horsemanService->getOrderCoordinate($globalOrderId));
  46. }
  47. }