|
|
@@ -83,6 +83,8 @@ class OrderService extends BaseService
|
|
|
}
|
|
|
$weight = 0;
|
|
|
$goodsPrice = 0;
|
|
|
+ $priceMap = \bizGhs\custom\classes\CustomClass::$levelPriceKeyMap;
|
|
|
+ $addPriceMap = \bizGhs\custom\classes\CustomClass::$levelAddPriceKeyMap;
|
|
|
foreach ($product as $key => $val) {
|
|
|
if (isset($val['property']) == false) {
|
|
|
util::fail('没有找到产品属性');
|
|
|
@@ -126,6 +128,7 @@ class OrderService extends BaseService
|
|
|
OrderGoodsClass::addData($currentGoodsData);
|
|
|
}
|
|
|
if ($property == dict::getDict('property', 'item')) {
|
|
|
+ $currentItemInfo = $itemInfo[$currentId] ?? [];
|
|
|
$name = $itemInfo[$currentId]['name'] ?? '';
|
|
|
$cover = $itemInfo[$currentId]['cover'] ?? '';
|
|
|
if (!empty($groupCover)) {
|
|
|
@@ -133,13 +136,7 @@ class OrderService extends BaseService
|
|
|
}
|
|
|
$ratio = $itemInfo[$currentId]['ratio'] ?? 20;
|
|
|
$currentMainId = $itemInfo[$currentId]['mainId'] ?? 0;
|
|
|
- $currentPrice = $itemInfo[$currentId]['skPrice'] ?? 0;
|
|
|
- //折扣价
|
|
|
- $discountPrice = $itemInfo[$currentId]['discountPrice'] ?? 0;
|
|
|
- if ($discountPrice > 0) {
|
|
|
- $currentAddPrice = $itemInfo[$currentId]['skMore'] ?? 0;
|
|
|
- $currentPrice = bcadd($discountPrice, $currentAddPrice, 2);
|
|
|
- }
|
|
|
+ $currentPrice = \bizGhs\product\classes\ProductClass::getFinalPrice($currentItemInfo, 0, $priceMap, $addPriceMap);
|
|
|
|
|
|
$currentWeight = $itemInfo[$currentId]['weight'] ?? 0;
|
|
|
if ($currentMainId != $mainId) {
|