|
@@ -250,42 +250,42 @@ public class IntegralServiceImpl implements IntegralService {
|
|
|
String bonusYellowIntegral = orderPercentageDO.getBonusYellowIntegral();
|
|
|
String bonusGreenIntegral = orderPercentageDO.getBonusGreenIntegral();
|
|
|
|
|
|
- Long ancestorYellowQuotaAmount = 0L; // 溢出黄积分额度
|
|
|
- Long ancestorGreenQuotaAmount = 0L; // 溢出绿积分额度
|
|
|
+// Long ancestorYellowQuotaAmount = 0L; // 溢出黄积分额度
|
|
|
+// Long ancestorGreenQuotaAmount = 0L; // 溢出绿积分额度
|
|
|
Long getYellowHighQuota; // 实得直推奖黄积分
|
|
|
Long getGreenHighQuota; // 实得直推奖绿积分
|
|
|
- if (integralDO.getHighQuota() < amount) {
|
|
|
- ancestorYellowQuotaAmount = calcIntegral((amount - integralDO.getHighQuota()), bonusYellowIntegral);
|
|
|
- getYellowHighQuota = calcIntegral(integralDO.getHighQuota(), bonusYellowIntegral);
|
|
|
-
|
|
|
- ancestorGreenQuotaAmount = calcIntegral((amount - integralDO.getHighQuota()), bonusGreenIntegral);
|
|
|
- getGreenHighQuota = calcIntegral(integralDO.getHighQuota(), bonusGreenIntegral);
|
|
|
- } else {
|
|
|
+// if (integralDO.getHighQuota() < amount) {
|
|
|
+// ancestorYellowQuotaAmount = calcIntegral((amount - integralDO.getHighQuota()), bonusYellowIntegral);
|
|
|
+// getYellowHighQuota = calcIntegral(integralDO.getHighQuota(), bonusYellowIntegral);
|
|
|
+//
|
|
|
+// ancestorGreenQuotaAmount = calcIntegral((amount - integralDO.getHighQuota()), bonusGreenIntegral);
|
|
|
+// getGreenHighQuota = calcIntegral(integralDO.getHighQuota(), bonusGreenIntegral);
|
|
|
+// } else {
|
|
|
getYellowHighQuota = calcIntegral(amount, bonusYellowIntegral);
|
|
|
|
|
|
getGreenHighQuota = calcIntegral(amount, bonusGreenIntegral);
|
|
|
- }
|
|
|
+// }
|
|
|
|
|
|
integralDO.setYellowCurrentQuota(integralDO.getYellowCurrentQuota() + getYellowHighQuota);
|
|
|
integralDO.setGreenCurrentQuota(integralDO.getGreenCurrentQuota() + getGreenHighQuota);
|
|
|
- integralDO.setHighQuota(integralDO.getHighQuota() - getYellowHighQuota - getGreenHighQuota);
|
|
|
- integralDO.setAncestorQuota(integralDO.getAncestorQuota() + getYellowHighQuota + getGreenHighQuota);
|
|
|
+// integralDO.setHighQuota(integralDO.getHighQuota() - getYellowHighQuota - getGreenHighQuota);
|
|
|
+// integralDO.setAncestorQuota(integralDO.getAncestorQuota() + getYellowHighQuota + getGreenHighQuota);
|
|
|
|
|
|
yellowChangeLog
|
|
|
.setIntegralPoints(getYellowHighQuota)
|
|
|
.setPracticalIntegralPoints(getYellowHighQuota)
|
|
|
- .setAfterIntegralPoints(integralDO.getYellowCurrentQuota())
|
|
|
- .setAncestorQuotaAmount(ancestorYellowQuotaAmount)
|
|
|
- .setMaxAvailablePointsAmount(-getYellowHighQuota)
|
|
|
- .setAfterMaxAvailablePointsAmount(integralDO.getHighQuota() + getGreenHighQuota);
|
|
|
+ .setAfterIntegralPoints(integralDO.getYellowCurrentQuota());
|
|
|
+// .setAncestorQuotaAmount(ancestorYellowQuotaAmount)
|
|
|
+// .setMaxAvailablePointsAmount(-getYellowHighQuota)
|
|
|
+// .setAfterMaxAvailablePointsAmount(integralDO.getHighQuota() + getGreenHighQuota);
|
|
|
|
|
|
greenChangeLog.
|
|
|
setIntegralPoints(getGreenHighQuota)
|
|
|
.setPracticalIntegralPoints(getGreenHighQuota)
|
|
|
- .setAfterIntegralPoints(integralDO.getGreenCurrentQuota())
|
|
|
- .setAncestorQuotaAmount(ancestorGreenQuotaAmount)
|
|
|
- .setMaxAvailablePointsAmount(-getGreenHighQuota)
|
|
|
- .setAfterMaxAvailablePointsAmount(integralDO.getHighQuota() + getYellowHighQuota);
|
|
|
+ .setAfterIntegralPoints(integralDO.getGreenCurrentQuota());
|
|
|
+// .setAncestorQuotaAmount(ancestorGreenQuotaAmount)
|
|
|
+// .setMaxAvailablePointsAmount(-getGreenHighQuota)
|
|
|
+// .setAfterMaxAvailablePointsAmount(integralDO.getHighQuota() + getYellowHighQuota);
|
|
|
|
|
|
// 修改用户积分
|
|
|
integralMapper.updateById(integralDO);
|