|
@@ -729,7 +729,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|
|
unset($merchantCart);
|
|
|
}
|
|
|
|
|
|
- //积分配置
|
|
|
+ //红包米配置
|
|
|
$sysIntegralConfig = systemConfig(['integral_money', 'integral_status', 'integral_order_rate']);
|
|
|
$merIntegralFlag = false;
|
|
|
$order_total_integral = 0;
|
|
@@ -754,7 +754,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|
|
$merIntegralFlag = $merIntegralFlag || ((bool)$merIntegralConfig['mer_integral_status']);
|
|
|
$integralFlag = $useIntegral && $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_money'] > 0 && $merIntegralConfig['mer_integral_status'];
|
|
|
|
|
|
- //计算积分抵扣
|
|
|
+ //计算红包米抵扣
|
|
|
foreach ($merchantCart['list'] as &$cart) {
|
|
|
//只有普通商品可以抵扣
|
|
|
if ($cart['product_type'] == 0 && $integralFlag && $userIntegral > 0 && $merchantCart['order']['true_price'] > 0) {
|
|
@@ -770,14 +770,14 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|
|
$productIntegral = ceil(bcdiv($productIntegralPrice, $sysIntegralConfig['integral_money'], 3));
|
|
|
if ($productIntegral <= $userIntegral) {
|
|
|
$userIntegral = bcsub($userIntegral, $productIntegral, 0);
|
|
|
- //使用多少积分抵扣了多少金额
|
|
|
+ //使用多少红包米抵扣了多少金额
|
|
|
$cart['integral'] = [
|
|
|
'use' => $productIntegral,
|
|
|
'price' => $productIntegralPrice
|
|
|
];
|
|
|
} else {
|
|
|
$productIntegralPrice = bcmul($userIntegral, $sysIntegralConfig['integral_money'], 2);
|
|
|
- //使用多少积分抵扣了多少金额
|
|
|
+ //使用多少红包米抵扣了多少金额
|
|
|
$cart['integral'] = [
|
|
|
'use' => $userIntegral,
|
|
|
'price' => $productIntegralPrice
|
|
@@ -827,7 +827,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|
|
|
|
|
$giveIntegralFlag = $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_order_rate'] > 0;
|
|
|
$total_give_integral = 0;
|
|
|
- //计算赠送积分, 只有普通商品赠送积分
|
|
|
+ //计算赠送红包米, 只有普通商品赠送红包米
|
|
|
if ($giveIntegralFlag && !$order_type && $pay_price > 0) {
|
|
|
$total_give_integral = floor(bcmul($pay_price, $sysIntegralConfig['integral_order_rate'], 0));
|
|
|
if ($total_give_integral > 0 && $svip_status && $svip_integral_rate > 0) {
|
|
@@ -1217,7 +1217,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|
|
'status' => 1,
|
|
|
'title' => '购买商品',
|
|
|
'number' => $groupOrder['integral'],
|
|
|
- 'mark' => '购买商品使用积分抵扣' . floatval($groupOrder['integral_price']) . '元',
|
|
|
+ 'mark' => '购买商品使用红包米抵扣' . floatval($groupOrder['integral_price']) . '元',
|
|
|
'balance' => $user->integral
|
|
|
]);
|
|
|
$user->save();
|
|
@@ -1240,12 +1240,12 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|
|
'uid' => $uid,
|
|
|
'link_id' => $_order->order_id,
|
|
|
'pm' => 0,
|
|
|
- 'title' => '积分抵扣',
|
|
|
+ 'title' => '红包米抵扣',
|
|
|
'category' => 'mer_integral',
|
|
|
'type' => 'deduction',
|
|
|
'number' => $order['integral'],
|
|
|
'balance' => $user->integral,
|
|
|
- 'mark' => '购买商品使用' . $order['integral'] . '积分抵扣' . floatval($order['integral_price']) . '元',
|
|
|
+ 'mark' => '购买商品使用' . $order['integral'] . '红包米抵扣' . floatval($order['integral_price']) . '元',
|
|
|
'mer_id' => $order['mer_id'],
|
|
|
'status' => 1
|
|
|
];
|