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.

22 lines
512 B

  1. <?php
  2. namespace App\Controller;
  3. use App\Request\OrderOnlineRequest;
  4. use Hyperf\Di\Annotation\Inject;
  5. use App\Service\OrderServiceInterface;
  6. class OrderController extends BaseController
  7. {
  8. /**
  9. * @Inject
  10. * @var OrderServiceInterface
  11. */
  12. protected $orderService;
  13. public function addOnlineOrder(OrderOnlineRequest $request)
  14. {
  15. $orderMainId = $this->orderService->addOnlineOrder($request->validated());
  16. return $this->success(['order_main_id' => $orderMainId]);
  17. }
  18. }