## 直推收益改为商品价格10%;

This commit is contained in:
cabbage 2025-07-15 09:09:44 +08:00
parent d180bfed66
commit c0e32d689a
2 changed files with 14 additions and 14 deletions

View File

@ -1169,7 +1169,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
// // 直推级差收益
// BigDecimal calBonusIncome = BigDecimal.ZERO;
// 商品最终价格
// 商品最终价格总价带数量的价格
BigDecimal waresPrice = saOrderItems.getWaresPrice();
// 商品数量
BigDecimal waresQuantityBig = saOrderItems.getWaresQuantity();
@ -1213,20 +1213,20 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
if (beforeGradeValue == 0) {
// 前一个会员等级为0肯定为第一次处理直接处理直推级差收益
if (EGrade.HAI_FAN.getValue() == calGradeValue) {
// VIP1份40
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig);
// VIP 1 10%
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice);
} else if (EGrade.YOU_KE.getValue() == calGradeValue) {
// SVIP2份40
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("2"));
// SVIP 2 10%
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("2"));
} else if (EGrade.MAKER.getValue() == calGradeValue) {
// 卓越3份40
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("3"));
// 卓越 3 10%
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("3"));
} else if (EGrade.VIP.getValue() == calGradeValue) {
// 首席4份40
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("4"));
// 首席 4 10%
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("4"));
} else if (EGrade.S_VIP.getValue() == calGradeValue) {
// 合伙人5份40
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("5"));
// 合伙人 5 10%
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("5"));
}
// 赋值前一个会员等级
beforeGradeValue = calGradeValue;
@ -1255,7 +1255,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
int tmpGradeVal = (calGradeValue - beforeGradeValue) / 10;
// 新等级的直推级差收益
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal(tmpGradeVal));
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal(tmpGradeVal));
// 直推级差收益 = 新等级的直推级差收益 - 上一等级的平级收益
rangeBonusIncome = rangeBonusIncome.subtract(beforeSameBonus);

View File

@ -10,9 +10,9 @@ import java.util.List;
public class RetailConstants {
/**
* 直推级差等级收益每个等级为40元
* 直推级差等级收益每个等级差为百分之十
*/
public static final BigDecimal RANGE_BONUS = new BigDecimal("40");
public static final BigDecimal RANGE_BONUS = new BigDecimal("0.1");
/**
* 直推平级收益比例每代拿商品价格的千分之五
*/