|
@@ -201,10 +201,10 @@ public class OrderCalcServiceImpl implements OrderCalcService {
|
|
|
}
|
|
|
|
|
|
// 用户所得: 毛利 * 0.35
|
|
|
- BigDecimal ancestorQuota = grossProfit.multiply(new BigDecimal(orderPercentageDO.getGrossProfitUserQuotaPerc())).setScale(4, RoundingMode.DOWN);
|
|
|
+ BigDecimal descendantQuota = grossProfit.multiply(new BigDecimal(orderPercentageDO.getGrossProfitUserQuotaPerc())).setScale(4, RoundingMode.DOWN);
|
|
|
|
|
|
- // 直推奖: 毛利 * 0.35
|
|
|
- BigDecimal descendantQuota = grossProfit.multiply(new BigDecimal(orderPercentageDO.getGrossProfitAncestorQuotaPerc())).setScale(4, RoundingMode.DOWN);
|
|
|
+ // 直推奖: 毛利 * 0.35 (上一级)
|
|
|
+ BigDecimal ancestorQuota = grossProfit.multiply(new BigDecimal(orderPercentageDO.getGrossProfitAncestorQuotaPerc())).setScale(4, RoundingMode.DOWN);
|
|
|
|
|
|
// 合赢将: 毛利 * 0.08
|
|
|
BigDecimal bonusQuota = grossProfit.multiply(new BigDecimal(orderPercentageDO.getGrossProfitBonusQuotaPerc())).setScale(4, RoundingMode.DOWN);
|
|
@@ -243,18 +243,17 @@ public class OrderCalcServiceImpl implements OrderCalcService {
|
|
|
.nickName(k.getNickName())
|
|
|
.name(k.getName())
|
|
|
.grossProfit(grossProfitInt)
|
|
|
- .grossProfitUserQuota(ancestorQuotaInt)
|
|
|
- .grossProfitAncestorQuota(descendantQuotaInt)
|
|
|
+ .grossProfitUserQuota(descendantQuotaInt)
|
|
|
+ .grossProfitAncestorQuota(ancestorQuotaInt)
|
|
|
.grossProfitBonusQuota(bonusQuotaInt)
|
|
|
.grossProfitPlatformQuota(platformQuotaInt)
|
|
|
.percentTemplate(percentTemplate).build();
|
|
|
saveList.add(orderCalcSaveReqVO); // ========== 修改用户钱包 =================
|
|
|
- changeUserWallet(integralSaveReqVOS, integralDO, integralDOAncestor, ptIntegral, ancestorQuotaInt, descendantQuotaInt, highQuotaInt, grossProfitInt, platformQuotaInt);
|
|
|
+ changeUserWallet(integralSaveReqVOS, integralDO, integralDOAncestor, ptIntegral, ancestorQuotaInt, descendantQuotaInt, highQuotaInt, grossProfitAfterBonusInt, platformQuotaInt);
|
|
|
// ========== 修改平台信息 =================
|
|
|
// 每个订单计算的过程
|
|
|
// 增加平台收益
|
|
|
// 平台服务费
|
|
|
-
|
|
|
PtProfitSaveReqVO ptProfitSaveReqVO = PtProfitSaveReqVO.builder().ptAdd(platformQuotaInt).ptGrossAdd(grossProfitAfterBonusInt).ptTotalAdd(platformQuotaInt + grossProfitAfterBonusInt).build();
|
|
|
ptProfitSaveReqVOS.add(ptProfitSaveReqVO);
|
|
|
// ========== 增加日志记录 =================
|
|
@@ -362,13 +361,15 @@ public class OrderCalcServiceImpl implements OrderCalcService {
|
|
|
// 修改用户钱包
|
|
|
// 增加直推人额度
|
|
|
integralDO.setHighQuota(integralDO.getHighQuota() + highQuota);
|
|
|
+ // todo 增加累计额度
|
|
|
+
|
|
|
integralDO.setCurrentQuota(integralDO.getCurrentQuota() + descendantQuota);
|
|
|
|
|
|
|
|
|
// 增加推荐人额度
|
|
|
- integralDOAncestor.setCurrentQuota(integralDO.getCurrentQuota() + ancestorQuota);
|
|
|
+ integralDOAncestor.setCurrentQuota(integralDOAncestor.getCurrentQuota() + ancestorQuota);
|
|
|
// 增加平台额度
|
|
|
- pt.setCurrentQuota(integralDO.getCurrentQuota() + ptA + ptB);
|
|
|
+ pt.setCurrentQuota(pt.getCurrentQuota() + ptA + ptB);
|
|
|
|
|
|
// integralSaveReqVOS.add(BeanUtils.toBean(integralDO, IntegralSaveReqVO.class));
|
|
|
// integralSaveReqVOS.add(BeanUtils.toBean(integralDOAncestor, IntegralSaveReqVO.class));
|