feat: place order
This commit is contained in:
34
app/Service/Api/Order/ConfirmationOrderService.php
Normal file
34
app/Service/Api/Order/ConfirmationOrderService.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* This service file is part of item.
|
||||
*
|
||||
* @author ctexthuang
|
||||
* @contact ctexthuang@qq.com
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Api\Order;
|
||||
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
class ConfirmationOrderService extends BaseOrderService
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): array
|
||||
{
|
||||
$this->siteId = (int)$this->request->input('site_id');
|
||||
$this->couponId = (int)$this->request->input('coupon_id',0);
|
||||
|
||||
$this->check();
|
||||
|
||||
$this->compute();
|
||||
|
||||
return $this->return->success('success',$this->orderRes);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user