|
@@ -118,13 +118,15 @@ class OrderService extends BaseService
|
|
|
if (isset($val['property']) == false) {
|
|
if (isset($val['property']) == false) {
|
|
|
util::fail('没有找到产品属性');
|
|
util::fail('没有找到产品属性');
|
|
|
}
|
|
}
|
|
|
- $currentPrice = $val['price'] ?? 0;
|
|
|
|
|
- $goodsPrice = bcadd($goodsPrice, $currentPrice, 2);
|
|
|
|
|
$property = $val['property'];
|
|
$property = $val['property'];
|
|
|
$unitPrice = $val['unitPrice'] ?? 0;
|
|
$unitPrice = $val['unitPrice'] ?? 0;
|
|
|
$unitType = $val['unitType'] ?? 0;
|
|
$unitType = $val['unitType'] ?? 0;
|
|
|
$currentId = $val['productId'] ?? 0;
|
|
$currentId = $val['productId'] ?? 0;
|
|
|
$num = $val['num'] ?? 0;
|
|
$num = $val['num'] ?? 0;
|
|
|
|
|
+
|
|
|
|
|
+ $currentPrice = bcmul($unitPrice, $num, 2);
|
|
|
|
|
+ $goodsPrice = bcadd($goodsPrice, $currentPrice, 2);
|
|
|
|
|
+
|
|
|
if ($property == dict::getDict('property', 'goods')) {
|
|
if ($property == dict::getDict('property', 'goods')) {
|
|
|
$name = $goodsInfo[$currentId]['name'] ?? '';
|
|
$name = $goodsInfo[$currentId]['name'] ?? '';
|
|
|
$cover = $goodsInfo[$currentId]['cover'] ?? '';
|
|
$cover = $goodsInfo[$currentId]['cover'] ?? '';
|