feat : coupon

This commit is contained in:
2025-03-05 10:31:19 +08:00
parent 63f60bc92b
commit 75f649676d
5 changed files with 110 additions and 11 deletions

View File

@@ -57,9 +57,15 @@ class PlaceOrderService extends BaseOrderService
// 生成购物车信息 检测商品和库存等
$this->check();
// 如果传递了优惠券的值 则进行检测
$this->getCouponInfo();
// 计算
$this->compute();
// 如果有优惠券的情况下 重载计算
$this->reloadCompute();
// 下单 减少库存 写入数据库
$this->placeOrder();