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

@@ -112,6 +112,11 @@ abstract class BaseOrderService extends BaseService
*/
protected int $orderId;
/**
* @var int 订单类型 (参考 SpuCode)
*/
protected int $orderType;
/**
* @var int 自动选择优惠券 (确认订单需要,下单不需要,用子类重置该值)
*/
@@ -133,6 +138,7 @@ abstract class BaseOrderService extends BaseService
$this->copies = 0;
$this->couponId = 0;
$this->siteId = 0;
$this->orderType = 0;
$this->orderRes = [
'total_price' => '0.00', //总价
@@ -151,8 +157,8 @@ abstract class BaseOrderService extends BaseService
'site' => [],
'good_ids' => [],
'good' => [],
'optional_copies' => 0,
'meal_copies' => 0,
'copies' => 0,
// 'meal_copies' => 0,
];
}
@@ -188,7 +194,7 @@ abstract class BaseOrderService extends BaseService
$this->computeSundryPrice();
$this->computeFavorable();
// $this->computeFavorable();
$this->computeFinallyPrice();
}