feat : order

This commit is contained in:
2025-03-06 16:25:25 +08:00
parent 5ad53e55be
commit 88fdd218b3
10 changed files with 82 additions and 57 deletions

View File

@@ -53,6 +53,7 @@ class PlaceOrderService extends BaseOrderService
$this->siteId = (int)$this->request->input('site_id');
$this->couponId = (int)$this->request->input('coupon_id',0);
$this->orderType = (int)$this->request->input('order_type');
// 生成购物车信息 检测商品和库存等
$this->check();
@@ -191,8 +192,8 @@ class PlaceOrderService extends BaseOrderService
$orderInsertModel->site_id = $this->siteId;
$orderInsertModel->city_id = $this->orderRes['site_info']['city_id'];
$orderInsertModel->coupon_id = $this->couponId;
$orderInsertModel->meal_copies = $this->orderRes['meal_copies'];
$orderInsertModel->optional_copies = $this->orderRes['optional_copies'];
$orderInsertModel->copies = $this->orderRes['copies'];
$orderInsertModel->type = $this->orderType;
$orderInsertModel->total_price = $this->orderRes['total_price'];
$orderInsertModel->actual_price = $this->orderRes['actual_price'];
$orderInsertModel->discount_price = $this->orderRes['favorable_sundry_price'] + $this->orderRes['favorable_good_price'];