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.

41 lines
1.2 KiB

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. class HorsemanController extends BaseController
  7. {
  8. /**
  9. * @Inject
  10. * @var HorsemanServiceInterface
  11. */
  12. protected $horsemanService;
  13. public function getOrderList()
  14. {
  15. return $this->success($this->horsemanService->getOrderList());
  16. }
  17. public function setHorsemanCoordinate()
  18. {
  19. $employeesId = $this->request->input('employees_id', -1);
  20. $coordinate = $this->request->input('coordinate', -1);
  21. return $this->success($this->horsemanService->setHorsemanCoordinate($employeesId,$coordinate));
  22. }
  23. public function getHorsemanCoordinate()
  24. {
  25. $employeesId = $this->request->input('employees_id', -1);
  26. $coordinate = $this->horsemanService->getHorsemanCoordinate($employeesId);
  27. return $this->success(['coordinate' => $coordinate]);
  28. }
  29. public function getOrderCoordinate()
  30. {
  31. $globalOrderId = $this->request->input('global_order_id', -1);
  32. return $this->success($this->horsemanService->getOrderCoordinate($globalOrderId));
  33. }
  34. }