forked from angelo/java-retail-app
## 分公司等级拆分成区域代理、董事代理涉及奖金修改;
This commit is contained in:
parent
93959a13d5
commit
ddec95414b
|
@ -30,6 +30,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -48,7 +49,8 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
private IBonusOrderService iBonusOrderService;
|
private IBonusOrderService iBonusOrderService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberGradeService iCuMemberGradeService;
|
private ICuMemberGradeService iCuMemberGradeService;
|
||||||
@Autowired
|
|
||||||
|
@Resource
|
||||||
private CuMemberRetailRangeMapper cuMemberRetailRangeMapper;
|
private CuMemberRetailRangeMapper cuMemberRetailRangeMapper;
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
|
@ -321,40 +323,42 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
if (targetGradeValue > beforeGradeValue) {
|
if (targetGradeValue > beforeGradeValue) {
|
||||||
// 当前会员等级大于上一个会员等级
|
// 当前会员等级大于上一个会员等级
|
||||||
if (EGrade.HAI_FAN.getValue() == targetGradeValue) {
|
if (EGrade.HAI_FAN.getValue() == targetGradeValue) {
|
||||||
// V1 推拿 60
|
// V1 推拿 30
|
||||||
rangeBonusIncome = RetailConstants.V1_V1;
|
rangeBonusIncome = RetailConstants.V1_V1;
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V1_V1;
|
totalBonus = RetailConstants.V1_V1;
|
||||||
} else if (EGrade.YOU_KE.getValue() == targetGradeValue) {
|
} else if (EGrade.YOU_KE.getValue() == targetGradeValue) {
|
||||||
// V2 推拿 80,或者减去之前累计
|
// V2 推拿 40,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V2_V1.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V2_V1.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V2_V1;
|
totalBonus = RetailConstants.V2_V1;
|
||||||
} else if (EGrade.MAKER.getValue() == targetGradeValue) {
|
} else if (EGrade.MAKER.getValue() == targetGradeValue) {
|
||||||
// V3 推拿 100,或者减去之前累计
|
// V3 推拿 50,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V3_V1.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V3_V1.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V3_V1;
|
totalBonus = RetailConstants.V3_V1;
|
||||||
} else if (EGrade.VIP.getValue() == targetGradeValue) {
|
} else if (EGrade.VIP.getValue() == targetGradeValue) {
|
||||||
// V4 推拿 200,或者减去之前累计
|
// V4 推拿 100,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V4_V1.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V4_V1.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V4_V1;
|
totalBonus = RetailConstants.V4_V1;
|
||||||
} else if (EGrade.S_VIP.getValue() == targetGradeValue) {
|
} else if (EGrade.S_VIP.getValue() == targetGradeValue) {
|
||||||
// V5 推拿 208,或者减去之前累计
|
// V5 推拿 104,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V5_V1.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V5_V1.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V5_V1;
|
totalBonus = RetailConstants.V5_V1;
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.REGION.getValue() == targetGradeValue
|
||||||
// V6 推拿 220 ,或者减去之前累计
|
|| EGrade.DIRECTOR.getValue() == targetGradeValue) {
|
||||||
rangeBonusIncome = RetailConstants.V6_V1.subtract(totalBonus);
|
// V6、V7 推拿 110 ,或者减去之前累计
|
||||||
|
// 前一等级不是V6、V7
|
||||||
|
rangeBonusIncome = RetailConstants.V6_V7_V1.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V6_V1;
|
totalBonus = RetailConstants.V6_V7_V1;
|
||||||
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
||||||
// V7 推拿 240,或者减去之前累计
|
// V8 推拿 120,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V7_V1.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V8_V1.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V7_V1;
|
totalBonus = RetailConstants.V8_V1;
|
||||||
}
|
}
|
||||||
// 前一级会员等级
|
// 前一级会员等级
|
||||||
beforeGradeValue = targetGradeValue;
|
beforeGradeValue = targetGradeValue;
|
||||||
|
@ -388,16 +392,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
rangeBonusIncome = RetailConstants.V5_V2.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V5_V2.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V5_V2;
|
totalBonus = RetailConstants.V5_V2;
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.REGION.getValue() == targetGradeValue
|
||||||
// V6 推拿 1100,或者减去之前累计
|
|| EGrade.DIRECTOR.getValue() == targetGradeValue) {
|
||||||
rangeBonusIncome = RetailConstants.V6_V2.subtract(totalBonus);
|
// V6、V7 推拿 1100,或者减去之前累计
|
||||||
|
rangeBonusIncome = RetailConstants.V6_V7_V2.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V6_V2;
|
totalBonus = RetailConstants.V6_V7_V2;
|
||||||
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
||||||
// V7 推拿 1200,或者减去之前累计
|
// V8 推拿 1200,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V7_V2.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V8_V2.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V7_V2;
|
totalBonus = RetailConstants.V8_V2;
|
||||||
}
|
}
|
||||||
// 前一级会员等级
|
// 前一级会员等级
|
||||||
beforeGradeValue = targetGradeValue;
|
beforeGradeValue = targetGradeValue;
|
||||||
|
@ -431,16 +436,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
rangeBonusIncome = RetailConstants.V5_V3.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V5_V3.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V5_V3;
|
totalBonus = RetailConstants.V5_V3;
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.REGION.getValue() == targetGradeValue
|
||||||
// V6 推拿 2200,或者减去之前累计
|
|| EGrade.DIRECTOR.getValue() == targetGradeValue) {
|
||||||
rangeBonusIncome = RetailConstants.V6_V3.subtract(totalBonus);
|
// V6、V7 推拿 2200,或者减去之前累计
|
||||||
|
rangeBonusIncome = RetailConstants.V6_V7_V3.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V6_V3;
|
totalBonus = RetailConstants.V6_V7_V3;
|
||||||
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
||||||
// V7 推拿 2400,或者减去之前累计
|
// V8 推拿 2400,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V7_V3.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V8_V3.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V7_V3;
|
totalBonus = RetailConstants.V8_V3;
|
||||||
}
|
}
|
||||||
// 前一级会员等级
|
// 前一级会员等级
|
||||||
beforeGradeValue = targetGradeValue;
|
beforeGradeValue = targetGradeValue;
|
||||||
|
@ -490,16 +496,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
rangeBonusIncome = RetailConstants.V5_V4.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V5_V4.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V5_V4;
|
totalBonus = RetailConstants.V5_V4;
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.REGION.getValue() == targetGradeValue
|
||||||
// V6 推拿 4400,或者减去之前累计
|
|| EGrade.DIRECTOR.getValue() == targetGradeValue) {
|
||||||
rangeBonusIncome = RetailConstants.V6_V4.subtract(totalBonus);
|
// V6、V7 推拿 4400,或者减去之前累计
|
||||||
|
rangeBonusIncome = RetailConstants.V6_V7_V4.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V6_V4;
|
totalBonus = RetailConstants.V6_V7_V4;
|
||||||
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
||||||
// V7 推拿 4800,或者减去之前累计
|
// V8 推拿 4800,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V7_V4.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V8_V4.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V7_V4;
|
totalBonus = RetailConstants.V8_V4;
|
||||||
}
|
}
|
||||||
// 前一级会员等级
|
// 前一级会员等级
|
||||||
beforeGradeValue = targetGradeValue;
|
beforeGradeValue = targetGradeValue;
|
||||||
|
@ -520,8 +527,8 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
v3Count++;
|
v3Count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == orderGradeValue) {
|
} else if (EGrade.REGION.getValue() == orderGradeValue) {
|
||||||
// 订单是分公司
|
// 订单是区域代理
|
||||||
if (targetGradeValue >= EGrade.VIP.getValue() && targetGradeValue > beforeGradeValue) {
|
if (targetGradeValue >= EGrade.VIP.getValue() && targetGradeValue > beforeGradeValue) {
|
||||||
// 博羚店主以上才有级差 并且 当前等级大于之前等级
|
// 博羚店主以上才有级差 并且 当前等级大于之前等级
|
||||||
if (EGrade.VIP.getValue() == targetGradeValue) {
|
if (EGrade.VIP.getValue() == targetGradeValue) {
|
||||||
|
@ -534,16 +541,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
rangeBonusIncome = RetailConstants.V5_V6.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V5_V6.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V5_V6;
|
totalBonus = RetailConstants.V5_V6;
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.REGION.getValue() == targetGradeValue
|
||||||
// 分公司拿 55000,或者减去之前累计
|
|| EGrade.DIRECTOR.getValue() == targetGradeValue) {
|
||||||
rangeBonusIncome = RetailConstants.V6_V6.subtract(totalBonus);
|
// 区域代理、董事代理 拿 55000,或者减去之前累计
|
||||||
|
rangeBonusIncome = RetailConstants.V6_V7_V6.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V6_V6;
|
totalBonus = RetailConstants.V6_V7_V6;
|
||||||
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
||||||
// 总公司 拿 60000,或者减去之前累计
|
// 总公司 拿 60000,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.V7_V6.subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.V8_V6.subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = RetailConstants.V7_V6;
|
totalBonus = RetailConstants.V8_V6;
|
||||||
}
|
}
|
||||||
// 前一级会员等级
|
// 前一级会员等级
|
||||||
beforeGradeValue = targetGradeValue;
|
beforeGradeValue = targetGradeValue;
|
||||||
|
@ -656,16 +664,17 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
rangeBonusIncome = RetailConstants.REPURCHASE_V5.multiply(boxNum).subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.REPURCHASE_V5.multiply(boxNum).subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V5.multiply(boxNum).subtract(totalBonus));
|
totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V5.multiply(boxNum).subtract(totalBonus));
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.REGION.getValue() == targetGradeValue
|
||||||
// V6 拿 22,或者减去之前累计
|
|| EGrade.DIRECTOR.getValue() == targetGradeValue) {
|
||||||
rangeBonusIncome = RetailConstants.REPURCHASE_V6.multiply(boxNum).subtract(totalBonus);
|
// V6、V7 拿 22,或者减去之前累计
|
||||||
|
rangeBonusIncome = RetailConstants.REPURCHASE_V6_V7.multiply(boxNum).subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V6.multiply(boxNum).subtract(totalBonus));
|
totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V6_V7.multiply(boxNum).subtract(totalBonus));
|
||||||
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
} else if (EGrade.COMPANY.getValue() == targetGradeValue) {
|
||||||
// V7 拿 24,或者减去之前累计
|
// V8 拿 24,或者减去之前累计
|
||||||
rangeBonusIncome = RetailConstants.REPURCHASE_V7.multiply(boxNum).subtract(totalBonus);
|
rangeBonusIncome = RetailConstants.REPURCHASE_V8.multiply(boxNum).subtract(totalBonus);
|
||||||
// 前面累计的奖金
|
// 前面累计的奖金
|
||||||
totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V7.multiply(boxNum).subtract(totalBonus));
|
totalBonus = totalBonus.add(RetailConstants.REPURCHASE_V8.multiply(boxNum).subtract(totalBonus));
|
||||||
}
|
}
|
||||||
// 前一级会员等级
|
// 前一级会员等级
|
||||||
beforeGradeValue = targetGradeValue;
|
beforeGradeValue = targetGradeValue;
|
||||||
|
@ -711,8 +720,10 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
memberBonusRangeList.add(cuMemberBonusRange);
|
memberBonusRangeList.add(cuMemberBonusRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2025.08.13 添加分公司级差收益,每1盒(4个产品)第一分公司4元,第二分公司4元,公司6元,总拨出14元
|
// 2025.08.13 添加 代理 级差收益,每1盒(4个产品)区域代理4元,董事代理4元,公司6元,总拨出14元
|
||||||
if (EGrade.BRANCH_COMPANY.getValue() == targetMemberRangeExt.getGradeValue() && branch < 2) {
|
if ((EGrade.REGION.getValue() == targetMemberRangeExt.getGradeValue()
|
||||||
|
&& EGrade.DIRECTOR.getValue() == targetMemberRangeExt.getGradeValue())
|
||||||
|
&& branch < 2) {
|
||||||
// 等级是分公司 并且 发放次数小于2
|
// 等级是分公司 并且 发放次数小于2
|
||||||
this.calculateRetailRepurCompanyRangeBonus(sourceMemberRangeExt, targetMemberRangeExt, cuMemberBonusMap, bonusConfigDTO,
|
this.calculateRetailRepurCompanyRangeBonus(sourceMemberRangeExt, targetMemberRangeExt, cuMemberBonusMap, bonusConfigDTO,
|
||||||
period, saOrderExt, boxNum, memberBonusRangeList, branch);
|
period, saOrderExt, boxNum, memberBonusRangeList, branch);
|
||||||
|
@ -731,9 +742,10 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
||||||
Map<Long, CuMemberBonus> cuMemberBonusMap, BonusConfigDTO bonusConfigDTO, Integer period,
|
Map<Long, CuMemberBonus> cuMemberBonusMap, BonusConfigDTO bonusConfigDTO, Integer period,
|
||||||
SaOrderExt saOrderExt, BigDecimal boxNum, List<CuMemberBonusRange> memberBonusRangeList,
|
SaOrderExt saOrderExt, BigDecimal boxNum, List<CuMemberBonusRange> memberBonusRangeList,
|
||||||
int branch) {
|
int branch) {
|
||||||
// 2025.08.13 二级分公司,一级总公司复购级差
|
// 2025.08.13 二级代理,一级总公司复购级差
|
||||||
BigDecimal calValue = BigDecimal.ZERO;
|
BigDecimal calValue = BigDecimal.ZERO;
|
||||||
if (EGrade.BRANCH_COMPANY.getValue() == targetMemberRangeExt.getGradeValue()) {
|
if (EGrade.REGION.getValue() == targetMemberRangeExt.getGradeValue()
|
||||||
|
|| EGrade.DIRECTOR.getValue() == targetMemberRangeExt.getGradeValue()) {
|
||||||
// 分公司奖金
|
// 分公司奖金
|
||||||
calValue = RetailConstants.BRANCH;
|
calValue = RetailConstants.BRANCH;
|
||||||
} else if (EGrade.COMPANY.getValue() == targetMemberRangeExt.getGradeValue()) {
|
} else if (EGrade.COMPANY.getValue() == targetMemberRangeExt.getGradeValue()) {
|
||||||
|
|
|
@ -1492,8 +1492,8 @@ public class CuMemberBusinessServiceImpl implements ICuMemberBusinessService {
|
||||||
saveLevelUpgrade(cuMember, EUpgradeType.BUY_UPGRADE.getValue(), saOrder, 0);
|
saveLevelUpgrade(cuMember, EUpgradeType.BUY_UPGRADE.getValue(), saOrder, 0);
|
||||||
|
|
||||||
if (EGrade.VIP.getValue() == gradeDTO.getGradeValue()
|
if (EGrade.VIP.getValue() == gradeDTO.getGradeValue()
|
||||||
|| EGrade.BRANCH_COMPANY.getValue() == gradeDTO.getGradeValue()) {
|
|| EGrade.REGION.getValue() == gradeDTO.getGradeValue()) {
|
||||||
// 店主、分公司级别,判断处理区域
|
// 店主、代理级别,判断处理区域
|
||||||
if (null != saOrder.getRegionProvince()
|
if (null != saOrder.getRegionProvince()
|
||||||
&& null != saOrder.getRegionCity()) {
|
&& null != saOrder.getRegionCity()) {
|
||||||
iCuMemberRetailRegionService.mergeMemberRetailRegion(CuMemberRetailRegion.builder()
|
iCuMemberRetailRegionService.mergeMemberRetailRegion(CuMemberRetailRegion.builder()
|
||||||
|
@ -1524,8 +1524,8 @@ public class CuMemberBusinessServiceImpl implements ICuMemberBusinessService {
|
||||||
saveLevelUpgrade(cuMember, EUpgradeType.BUY_UPGRADE.getValue(), saOrder, saOrder.getPkGradeOld());
|
saveLevelUpgrade(cuMember, EUpgradeType.BUY_UPGRADE.getValue(), saOrder, saOrder.getPkGradeOld());
|
||||||
|
|
||||||
if (EGrade.VIP.getValue() == gradeDTO.getGradeValue()
|
if (EGrade.VIP.getValue() == gradeDTO.getGradeValue()
|
||||||
|| EGrade.BRANCH_COMPANY.getValue() == gradeDTO.getGradeValue()) {
|
|| EGrade.REGION.getValue() == gradeDTO.getGradeValue()) {
|
||||||
// 店主、分公司级别,判断处理区域
|
// 店主、代理级别,判断处理区域
|
||||||
if (null != saOrder.getRegionProvince()
|
if (null != saOrder.getRegionProvince()
|
||||||
&& null != saOrder.getRegionCity()) {
|
&& null != saOrder.getRegionCity()) {
|
||||||
iCuMemberRetailRegionService.mergeMemberRetailRegion(CuMemberRetailRegion.builder()
|
iCuMemberRetailRegionService.mergeMemberRetailRegion(CuMemberRetailRegion.builder()
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class CuBonusVertexStatisTotalVO {
|
||||||
private BigDecimal repurchaseAllAmount = BigDecimal.ZERO;
|
private BigDecimal repurchaseAllAmount = BigDecimal.ZERO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (复购直推收益+复购级差收益+复购拓展收益)*80% +海粉直推
|
* (复购直推收益+复购级差收益+复购拓展收益)*80%
|
||||||
* (复购级差+复购拓展 ) *0.8 +海粉直推
|
* (复购级差+复购拓展 ) *0.8 +海粉直推
|
||||||
*/
|
*/
|
||||||
@Excel(name = "复购拨出金额(¥)", scale = 2)
|
@Excel(name = "复购拨出金额(¥)", scale = 2)
|
||||||
|
@ -127,7 +127,7 @@ public class CuBonusVertexStatisTotalVO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (复购级差+复购拓展 ) *0.8 +海粉直推
|
* (复购级差+复购拓展 ) *0.8 +海粉直推
|
||||||
* 复购拨出比例(%) = (((复购直推收益+复购级差收益+复购拓展收益)*80%)+海粉直推)/复购总奖金(复购订单+海粉订单)
|
* 复购拨出比例(%) = (((复购直推收益+复购级差收益+复购拓展收益)*80%))/复购总奖金(复购订单)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "复购拨出比例(%)", scale = 2)
|
@Excel(name = "复购拨出比例(%)", scale = 2)
|
||||||
@BigDecimalFormat
|
@BigDecimalFormat
|
||||||
|
|
|
@ -243,11 +243,11 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
}
|
}
|
||||||
Integer createPkGrade = createMember.getPkSettleGrade();
|
Integer createPkGrade = createMember.getPkSettleGrade();
|
||||||
BdGrade createGrade = gradeList.stream().filter(tmpData -> tmpData.getPkId().equals(createPkGrade)).findFirst().get();
|
BdGrade createGrade = gradeList.stream().filter(tmpData -> tmpData.getPkId().equals(createPkGrade)).findFirst().get();
|
||||||
if (EGrade.BRANCH_COMPANY.getValue() == createGrade.getGradeValue()) {
|
if (EGrade.REGION.getValue() == createGrade.getGradeValue()
|
||||||
|
|| EGrade.DIRECTOR.getValue() == createGrade.getGradeValue()) {
|
||||||
// 发货方式:提货中心
|
// 发货方式:提货中心
|
||||||
saOrderExt.setDeliveryWay(EDelivery.PICK.getValue());
|
saOrderExt.setDeliveryWay(EDelivery.PICK.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return saOrderExt;
|
return saOrderExt;
|
||||||
|
@ -908,7 +908,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
&& boxWaresList.contains(waresDetailExt.getWaresCode())
|
&& boxWaresList.contains(waresDetailExt.getWaresCode())
|
||||||
&& EYesNo.NO.getIntValue() == waresDetailExt.getIsGift()
|
&& EYesNo.NO.getIntValue() == waresDetailExt.getIsGift()
|
||||||
) {
|
) {
|
||||||
// 2025.03.11 添加需求,复购专区、重消专区,指定盒数商品每月每人限购50件(赠品排除)
|
|
||||||
waresNumMap.merge(waresDetailExt.getWaresCode(), waresDetailExt.getWaresQuantity(), Integer::sum);
|
waresNumMap.merge(waresDetailExt.getWaresCode(), waresDetailExt.getWaresQuantity(), Integer::sum);
|
||||||
waresNameMap.put(waresDetailExt.getWaresCode(), waresDetailExt.getWaresName());
|
waresNameMap.put(waresDetailExt.getWaresCode(), waresDetailExt.getWaresName());
|
||||||
}
|
}
|
||||||
|
@ -925,8 +924,9 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
|| EGrade.S_VIP.getValue() == bdGrade.getGradeValue()) {
|
|| EGrade.S_VIP.getValue() == bdGrade.getGradeValue()) {
|
||||||
// 会员、VIP、合伙人,每月限购10套
|
// 会员、VIP、合伙人,每月限购10套
|
||||||
limitNum = RetailConstants.V4_LIMIT;
|
limitNum = RetailConstants.V4_LIMIT;
|
||||||
} else if (EGrade.BRANCH_COMPANY.getValue() == bdGrade.getGradeValue()) {
|
} else if (EGrade.REGION.getValue() == bdGrade.getGradeValue()
|
||||||
// 分公司,每月限购25套
|
|| EGrade.DIRECTOR.getValue() == bdGrade.getGradeValue()) {
|
||||||
|
// 区域代理、董事代理,每月限购25套
|
||||||
limitNum = RetailConstants.V6_LIMIT;
|
limitNum = RetailConstants.V6_LIMIT;
|
||||||
} else if (EGrade.COMPANY.getValue() == bdGrade.getGradeValue()) {
|
} else if (EGrade.COMPANY.getValue() == bdGrade.getGradeValue()) {
|
||||||
// 总公司,不限购给一个很大的值
|
// 总公司,不限购给一个很大的值
|
||||||
|
|
|
@ -2161,8 +2161,8 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
||||||
|
|
||||||
// 当前会员等级
|
// 当前会员等级
|
||||||
BdGrade memberGrade = gradeList.stream().filter(tmpGrade -> tmpGrade.getPkId().equals(updateGradeMember.getPkSettleGrade())).findFirst().get();
|
BdGrade memberGrade = gradeList.stream().filter(tmpGrade -> tmpGrade.getPkId().equals(updateGradeMember.getPkSettleGrade())).findFirst().get();
|
||||||
if (memberGrade.getGradeValue().compareTo(EGrade.BRANCH_COMPANY.getValue()) >= 0) {
|
if (memberGrade.getGradeValue().compareTo(EGrade.REGION.getValue()) >= 0) {
|
||||||
// 会员等级大于等于分公司,不能通过升级进行购买了
|
// 会员等级大于等于区域代理,不能通过升级进行购买了
|
||||||
throw new ServiceException("当前已经是可以购买的最高等级");
|
throw new ServiceException("当前已经是可以购买的最高等级");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,11 +49,11 @@ public class MemberFrameworkConstants {
|
||||||
*/
|
*/
|
||||||
public static final String S_VIP = "https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/20230428/5a4f6f65-dccb-486d-b3b9-3b60e6bbbcec.png";
|
public static final String S_VIP = "https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/20230428/5a4f6f65-dccb-486d-b3b9-3b60e6bbbcec.png";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区代
|
* 区代
|
||||||
*/
|
*/
|
||||||
public static final String COUNTY_AGENT = "https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/20230524/16244e18-77e1-4e20-8821-af3428671d8a.png";
|
public static final String COUNTY_AGENT = "https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/20230524/16244e18-77e1-4e20-8821-af3428671d8a.png";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 市代
|
* 市代
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,8 +16,8 @@ public class RetailConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2025.08.13 添加分公司级差收益,每1盒(4个产品)
|
* 2025.08.13 添加分公司级差收益,每1盒(4个产品)
|
||||||
* 第一分公司4元
|
* 第一分公司4元 -- 区域代理
|
||||||
* 第二分公司4元
|
* 第二分公司4元 -- 董事代理
|
||||||
* 公司6元
|
* 公司6元
|
||||||
* 总拨出14元
|
* 总拨出14元
|
||||||
*/
|
*/
|
||||||
|
@ -26,21 +26,21 @@ public class RetailConstants {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员 推 会员 60
|
* 会员 推 会员 30
|
||||||
* VIP 推 会员 80
|
* VIP 推 会员 40
|
||||||
* 合伙人 推 会员 100
|
* 合伙人 推 会员 50
|
||||||
* 博羚店主 推 会员 200
|
* 博羚店主 推 会员 100
|
||||||
* 高级店主 推 会员 208
|
* 高级店主 推 会员 104
|
||||||
* 分公司 推 会员 220
|
* 区域代理、董事代理 推 会员 110
|
||||||
* 总公司 推 会员 240
|
* 总公司 推 会员 120
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal V1_V1 = new BigDecimal("60");
|
public static final BigDecimal V1_V1 = new BigDecimal("30");
|
||||||
public static final BigDecimal V2_V1 = new BigDecimal("80");
|
public static final BigDecimal V2_V1 = new BigDecimal("40");
|
||||||
public static final BigDecimal V3_V1 = new BigDecimal("100");
|
public static final BigDecimal V3_V1 = new BigDecimal("50");
|
||||||
public static final BigDecimal V4_V1 = new BigDecimal("200");
|
public static final BigDecimal V4_V1 = new BigDecimal("100");
|
||||||
public static final BigDecimal V5_V1 = new BigDecimal("208");
|
public static final BigDecimal V5_V1 = new BigDecimal("104");
|
||||||
public static final BigDecimal V6_V1 = new BigDecimal("220");
|
public static final BigDecimal V6_V7_V1 = new BigDecimal("110");
|
||||||
public static final BigDecimal V7_V1 = new BigDecimal("240");
|
public static final BigDecimal V8_V1 = new BigDecimal("120");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员 推 VIP 300
|
* 会员 推 VIP 300
|
||||||
|
@ -48,7 +48,7 @@ public class RetailConstants {
|
||||||
* 合伙人 推 VIP 500
|
* 合伙人 推 VIP 500
|
||||||
* 博羚店主 推 VIP 1000
|
* 博羚店主 推 VIP 1000
|
||||||
* 高级店主 推 VIP 1040
|
* 高级店主 推 VIP 1040
|
||||||
* 分公司 推 VIP 1100
|
* 区域代理、董事代理 推 VIP 1100
|
||||||
* 总公司 推 VIP 1200
|
* 总公司 推 VIP 1200
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal V1_V2 = new BigDecimal("300");
|
public static final BigDecimal V1_V2 = new BigDecimal("300");
|
||||||
|
@ -56,8 +56,8 @@ public class RetailConstants {
|
||||||
public static final BigDecimal V3_V2 = new BigDecimal("500");
|
public static final BigDecimal V3_V2 = new BigDecimal("500");
|
||||||
public static final BigDecimal V4_V2 = new BigDecimal("1000");
|
public static final BigDecimal V4_V2 = new BigDecimal("1000");
|
||||||
public static final BigDecimal V5_V2 = new BigDecimal("1040");
|
public static final BigDecimal V5_V2 = new BigDecimal("1040");
|
||||||
public static final BigDecimal V6_V2 = new BigDecimal("1100");
|
public static final BigDecimal V6_V7_V2 = new BigDecimal("1100");
|
||||||
public static final BigDecimal V7_V2 = new BigDecimal("1200");
|
public static final BigDecimal V8_V2 = new BigDecimal("1200");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员 推 合伙人 600
|
* 会员 推 合伙人 600
|
||||||
|
@ -67,7 +67,7 @@ public class RetailConstants {
|
||||||
* 合伙人3 推 合伙人 1300
|
* 合伙人3 推 合伙人 1300
|
||||||
* 博羚店主 推 合伙人 2000
|
* 博羚店主 推 合伙人 2000
|
||||||
* 高级店主 推 合伙人 2080
|
* 高级店主 推 合伙人 2080
|
||||||
* 分公司 推 合伙人 2200
|
* 区域代理、董事代理 推 合伙人 2200
|
||||||
* 总公司 推 合伙人 2400
|
* 总公司 推 合伙人 2400
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal V1_V3 = new BigDecimal("600");
|
public static final BigDecimal V1_V3 = new BigDecimal("600");
|
||||||
|
@ -77,8 +77,8 @@ public class RetailConstants {
|
||||||
public static final BigDecimal V3_V3_3 = new BigDecimal("1300");
|
public static final BigDecimal V3_V3_3 = new BigDecimal("1300");
|
||||||
public static final BigDecimal V4_V3 = new BigDecimal("2000");
|
public static final BigDecimal V4_V3 = new BigDecimal("2000");
|
||||||
public static final BigDecimal V5_V3 = new BigDecimal("2080");
|
public static final BigDecimal V5_V3 = new BigDecimal("2080");
|
||||||
public static final BigDecimal V6_V3 = new BigDecimal("2200");
|
public static final BigDecimal V6_V7_V3 = new BigDecimal("2200");
|
||||||
public static final BigDecimal V7_V3 = new BigDecimal("2400");
|
public static final BigDecimal V8_V3 = new BigDecimal("2400");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员 推 博羚店主 1200
|
* 会员 推 博羚店主 1200
|
||||||
|
@ -88,7 +88,7 @@ public class RetailConstants {
|
||||||
* 合伙人3 推 博羚店主 2600
|
* 合伙人3 推 博羚店主 2600
|
||||||
* 博羚店主 推 博羚店主 4000
|
* 博羚店主 推 博羚店主 4000
|
||||||
* 高级店主 推 博羚店主 4160
|
* 高级店主 推 博羚店主 4160
|
||||||
* 分公司 推 博羚店主 4400
|
* 区域代理、董事代理 推 博羚店主 4400
|
||||||
* 总公司 推 博羚店主 4800
|
* 总公司 推 博羚店主 4800
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal V1_V4 = new BigDecimal("1200");
|
public static final BigDecimal V1_V4 = new BigDecimal("1200");
|
||||||
|
@ -98,19 +98,19 @@ public class RetailConstants {
|
||||||
public static final BigDecimal V3_V4_3 = new BigDecimal("2600");
|
public static final BigDecimal V3_V4_3 = new BigDecimal("2600");
|
||||||
public static final BigDecimal V4_V4 = new BigDecimal("4000");
|
public static final BigDecimal V4_V4 = new BigDecimal("4000");
|
||||||
public static final BigDecimal V5_V4 = new BigDecimal("4160");
|
public static final BigDecimal V5_V4 = new BigDecimal("4160");
|
||||||
public static final BigDecimal V6_V4 = new BigDecimal("4400");
|
public static final BigDecimal V6_V7_V4 = new BigDecimal("4400");
|
||||||
public static final BigDecimal V7_V4 = new BigDecimal("4800");
|
public static final BigDecimal V8_V4 = new BigDecimal("4800");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 博羚店主 推 分公司 50000
|
* 博羚店主 推 分公司 50000
|
||||||
* 高级店主 推 分公司 52000
|
* 高级店主 推 分公司 52000
|
||||||
* 分公司 推 分公司 55000
|
* 区域代理、董事代理 推 分公司 55000
|
||||||
* 总公司 推 分公司 60000
|
* 总公司 推 分公司 60000
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal V4_V6 = new BigDecimal("50000");
|
public static final BigDecimal V4_V6 = new BigDecimal("50000");
|
||||||
public static final BigDecimal V5_V6 = new BigDecimal("52000");
|
public static final BigDecimal V5_V6 = new BigDecimal("52000");
|
||||||
public static final BigDecimal V6_V6 = new BigDecimal("55000");
|
public static final BigDecimal V6_V7_V6 = new BigDecimal("55000");
|
||||||
public static final BigDecimal V7_V6 = new BigDecimal("60000");
|
public static final BigDecimal V8_V6 = new BigDecimal("60000");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复购:
|
* 复购:
|
||||||
|
@ -121,7 +121,7 @@ public class RetailConstants {
|
||||||
* 合伙人3 拿 13
|
* 合伙人3 拿 13
|
||||||
* 博羚店主 拿 20
|
* 博羚店主 拿 20
|
||||||
* 高级店主 拿 20.8
|
* 高级店主 拿 20.8
|
||||||
* 分公司 拿 22
|
* 区域代理、董事代理 拿 22
|
||||||
* 总公司 拿 24
|
* 总公司 拿 24
|
||||||
*/
|
*/
|
||||||
public static final BigDecimal REPURCHASE_V1 = new BigDecimal("6");
|
public static final BigDecimal REPURCHASE_V1 = new BigDecimal("6");
|
||||||
|
@ -131,8 +131,8 @@ public class RetailConstants {
|
||||||
public static final BigDecimal REPURCHASE_V3_3 = new BigDecimal("13");
|
public static final BigDecimal REPURCHASE_V3_3 = new BigDecimal("13");
|
||||||
public static final BigDecimal REPURCHASE_V4 = new BigDecimal("20");
|
public static final BigDecimal REPURCHASE_V4 = new BigDecimal("20");
|
||||||
public static final BigDecimal REPURCHASE_V5 = new BigDecimal("20.8");
|
public static final BigDecimal REPURCHASE_V5 = new BigDecimal("20.8");
|
||||||
public static final BigDecimal REPURCHASE_V6 = new BigDecimal("22");
|
public static final BigDecimal REPURCHASE_V6_V7 = new BigDecimal("22");
|
||||||
public static final BigDecimal REPURCHASE_V7 = new BigDecimal("24");
|
public static final BigDecimal REPURCHASE_V8 = new BigDecimal("24");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员、VIP、合伙人 每月可购买1套(4盒)
|
* 会员、VIP、合伙人 每月可购买1套(4盒)
|
||||||
|
@ -141,8 +141,8 @@ public class RetailConstants {
|
||||||
* 总公司 不限购给一个很大的值
|
* 总公司 不限购给一个很大的值
|
||||||
*/
|
*/
|
||||||
public static final Integer V1_LIMIT = 1;
|
public static final Integer V1_LIMIT = 1;
|
||||||
public static final Integer V4_LIMIT = 10;
|
public static final Integer V4_LIMIT = 10000;
|
||||||
public static final Integer V6_LIMIT = 25;
|
public static final Integer V6_LIMIT = 10000;
|
||||||
public static final Integer V7_LIMIT = 10000;
|
public static final Integer V7_LIMIT = 10000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,13 +55,18 @@ public enum EGrade {
|
||||||
S_VIP(6, 70, "V5", 0, EnumsPrefixConstants.GRADE + "70", MemberFrameworkConstants.S_VIP),
|
S_VIP(6, 70, "V5", 0, EnumsPrefixConstants.GRADE + "70", MemberFrameworkConstants.S_VIP),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分公司
|
* 区域代理
|
||||||
*/
|
*/
|
||||||
BRANCH_COMPANY(7, 80, "V6", 0, EnumsPrefixConstants.GRADE + "80", MemberFrameworkConstants.COUNTY_AGENT),
|
REGION(7, 80, "V6", 0, EnumsPrefixConstants.GRADE + "80", MemberFrameworkConstants.COUNTY_AGENT),
|
||||||
|
/**
|
||||||
|
* 董事代理
|
||||||
|
*/
|
||||||
|
DIRECTOR(8, 90, "V7", 0, EnumsPrefixConstants.GRADE + "90", MemberFrameworkConstants.COUNTY_AGENT),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总公司
|
* 总公司
|
||||||
*/
|
*/
|
||||||
COMPANY(8, 90, "V7", 0, EnumsPrefixConstants.GRADE + "90", MemberFrameworkConstants.CITY_AGENT),
|
COMPANY(9, 100, "V8", 0, EnumsPrefixConstants.GRADE + "100", MemberFrameworkConstants.CITY_AGENT),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件类型工具类
|
* 文件类型工具类
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
*/
|
*/
|
||||||
public class FileTypeUtils {
|
public class FileTypeUtils {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue