返佣逻辑调整

main
ztt 8 months ago
parent edfb2ff3d6
commit 545e1b3371
  1. 7
      addons/shopro/service/CommissionScoreLog.php

@ -103,7 +103,7 @@ class CommissionScoreLog
return true; return true;
} }
//1.非用户角色下单立即反积分 并且给公司账户返积分 //1.非用户角色下单立即反积分
if ($initLevel > self::LEVEL_1 && $currentCommissionLevel == 1) { if ($initLevel > self::LEVEL_1 && $currentCommissionLevel == 1) {
$amount = bcsub($order['goods_price'], $current_level_price, 2); $amount = bcsub($order['goods_price'], $current_level_price, 2);
//算积分 //算积分
@ -144,8 +144,9 @@ class CommissionScoreLog
//4.向上反佣金 //4.向上反佣金
if ($parentLevel > $currentLevel) { if ($parentLevel > $currentLevel) {
$amount = bcsub($current_level_price, $parent_level_price, 2); $amount = bcsub($current_level_price, $parent_level_price, 2);
//如果当前当前用户等级是会员 按原价算 //如果当前当前用户等级是上级是会员 按原价算
if($currentLevel == self::LEVEL_2) { // if($currentLevel == self::LEVEL_2) {
if($initLevel == self::LEVEL_1 && $sonLevel == self::LEVEL_2) {
$amount = bcsub($order['goods_price'], $parent_level_price, 2); $amount = bcsub($order['goods_price'], $parent_level_price, 2);
} }
\think\Log::info('上级商品价格'.$parent_level_price); \think\Log::info('上级商品价格'.$parent_level_price);

Loading…
Cancel
Save