瀏覽代碼

折扣价

shish 3 年之前
父節點
當前提交
c822be775c
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      biz-mall/order/services/OrderService.php

+ 7 - 0
biz-mall/order/services/OrderService.php

@@ -134,6 +134,13 @@ class OrderService extends BaseService
                 $ratio = $itemInfo[$currentId]['ratio'] ?? 20;
                 $ratio = $itemInfo[$currentId]['ratio'] ?? 20;
                 $currentMainId = $itemInfo[$currentId]['mainId'] ?? 0;
                 $currentMainId = $itemInfo[$currentId]['mainId'] ?? 0;
                 $currentPrice = $itemInfo[$currentId]['skPrice'] ?? 0;
                 $currentPrice = $itemInfo[$currentId]['skPrice'] ?? 0;
+                //折扣价
+                $discountPrice = $itemInfo[$currentId]['discountPrice'] ?? 0;
+                if ($discountPrice > 0) {
+                    $currentAddPrice = $itemInfo[$currentId]['skMore'] ?? 0;
+                    $currentPrice = bcadd($discountPrice, $currentAddPrice, 2);
+                }
+
                 $currentWeight = $itemInfo[$currentId]['weight'] ?? 0;
                 $currentWeight = $itemInfo[$currentId]['weight'] ?? 0;
                 if ($currentMainId != $mainId) {
                 if ($currentMainId != $mainId) {
                     util::fail('不是您的花材' . $mainId . ' ' . $currentMainId);
                     util::fail('不是您的花材' . $mainId . ' ' . $currentMainId);