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.

54 lines
1.5 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
  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. return $this->success($this->horsemanService->getOrderList());
  22. }
  23. public function getOrderInfo()
  24. {
  25. $globalOrderId = $this->request->input('global_order_id', -1);
  26. return $this->success($this->orderOnlineService->getOrderInfo($globalOrderId));
  27. }
  28. public function setHorsemanCoordinate()
  29. {
  30. $employeesId = $this->request->input('employees_id', -1);
  31. $coordinate = $this->request->input('coordinate', -1);
  32. return $this->success($this->horsemanService->setHorsemanCoordinate($employeesId,$coordinate));
  33. }
  34. public function getHorsemanCoordinate()
  35. {
  36. $employeesId = $this->request->input('employees_id', -1);
  37. $coordinate = $this->horsemanService->getHorsemanCoordinate($employeesId);
  38. return $this->success(['coordinate' => $coordinate]);
  39. }
  40. public function getOrderCoordinate()
  41. {
  42. $globalOrderId = $this->request->input('global_order_id', -1);
  43. return $this->success($this->horsemanService->getOrderCoordinate($globalOrderId));
  44. }
  45. }