## 直推收益改为商品价格10%;
This commit is contained in:
parent
52763ed97d
commit
4eec5d0fd6
|
@ -1169,7 +1169,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
// // 直推级差收益
|
// // 直推级差收益
|
||||||
// BigDecimal calBonusIncome = BigDecimal.ZERO;
|
// BigDecimal calBonusIncome = BigDecimal.ZERO;
|
||||||
|
|
||||||
// 商品最终价格
|
// 商品最终价格(总价,带数量的价格)
|
||||||
BigDecimal waresPrice = saOrderItems.getWaresPrice();
|
BigDecimal waresPrice = saOrderItems.getWaresPrice();
|
||||||
// 商品数量
|
// 商品数量
|
||||||
BigDecimal waresQuantityBig = saOrderItems.getWaresQuantity();
|
BigDecimal waresQuantityBig = saOrderItems.getWaresQuantity();
|
||||||
|
@ -1213,20 +1213,20 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
if (beforeGradeValue == 0) {
|
if (beforeGradeValue == 0) {
|
||||||
// 前一个会员等级为0,肯定为第一次处理,直接处理直推级差收益
|
// 前一个会员等级为0,肯定为第一次处理,直接处理直推级差收益
|
||||||
if (EGrade.HAI_FAN.getValue() == calGradeValue) {
|
if (EGrade.HAI_FAN.getValue() == calGradeValue) {
|
||||||
// VIP,拿1份40
|
// VIP,拿 1 份 10%
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig);
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice);
|
||||||
} else if (EGrade.YOU_KE.getValue() == calGradeValue) {
|
} else if (EGrade.YOU_KE.getValue() == calGradeValue) {
|
||||||
// SVIP,拿2份40
|
// SVIP,拿 2 份 10%
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("2"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("2"));
|
||||||
} else if (EGrade.MAKER.getValue() == calGradeValue) {
|
} else if (EGrade.MAKER.getValue() == calGradeValue) {
|
||||||
// 卓越,拿3份40
|
// 卓越,拿 3 份 10%
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("3"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("3"));
|
||||||
} else if (EGrade.VIP.getValue() == calGradeValue) {
|
} else if (EGrade.VIP.getValue() == calGradeValue) {
|
||||||
// 首席,拿4份40
|
// 首席,拿 4 份 10%
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("4"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("4"));
|
||||||
} else if (EGrade.S_VIP.getValue() == calGradeValue) {
|
} else if (EGrade.S_VIP.getValue() == calGradeValue) {
|
||||||
// 合伙人,拿5份40
|
// 合伙人,拿 5 份 10%
|
||||||
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresQuantityBig).multiply(new BigDecimal("5"));
|
rangeBonusIncome = RetailConstants.RANGE_BONUS.multiply(waresPrice).multiply(new BigDecimal("5"));
|
||||||
}
|
}
|
||||||
// 赋值前一个会员等级
|
// 赋值前一个会员等级
|
||||||
beforeGradeValue = calGradeValue;
|
beforeGradeValue = calGradeValue;
|
||||||
|
@ -1255,7 +1255,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
int tmpGradeVal = (calGradeValue - beforeGradeValue) / 10;
|
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);
|
rangeBonusIncome = rangeBonusIncome.subtract(beforeSameBonus);
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ import java.util.List;
|
||||||
public class RetailConstants {
|
public class RetailConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直推级差等级收益(每个等级为40元)
|
* 直推级差等级收益(每个等级差为百分之十)
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal RANGE_BONUS = new BigDecimal("40");
|
public static final BigDecimal RANGE_BONUS = new BigDecimal("0.1");
|
||||||
/**
|
/**
|
||||||
* 直推平级收益比例(每代拿商品价格的千分之五)
|
* 直推平级收益比例(每代拿商品价格的千分之五)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue