用户送礼等级
This commit is contained in:
parent
ac9b431367
commit
cd904de915
@ -187,12 +187,23 @@ public class GiftCountStrategy implements GiftStrategy {
|
||||
// 动态礼物处理
|
||||
processDynamicGift(runningWater);
|
||||
|
||||
boolean isHighPriceGift = checkHighPriceGift(runningWater);
|
||||
|
||||
BigDecimal giftValueCount = BigDecimal.valueOf(getActualAmount(giftValue, giftValue.getGiftValue()));
|
||||
|
||||
runningWater.getAcceptUsers().forEach(accept -> {
|
||||
|
||||
boolean isHighPriceGift = checkHighPriceGift(runningWater);
|
||||
|
||||
BigDecimal giftValueCount = BigDecimal.valueOf(getActualAmount(giftValue, giftValue.getGiftValue()));
|
||||
BigDecimal actualValueCount = BigDecimal.valueOf(
|
||||
getActualAmount(
|
||||
giftValue,
|
||||
Optional.ofNullable(giftValue.getActualAmount()).orElse(giftValue.getGiftValue())
|
||||
)
|
||||
);
|
||||
if (Objects.nonNull(runningWater.getUserId())
|
||||
&& actualValueCount.compareTo(BigDecimal.ZERO) > 0) {
|
||||
// Wealth level is based on the sender's actual gold spend.
|
||||
consumptionLevelService.incrConsumptionGolds(runningWater.getUserId(), actualValueCount);
|
||||
}
|
||||
|
||||
runningWater.getAcceptUsers().forEach(accept -> {
|
||||
|
||||
BigDecimal userVipBenefit = userProfileGateway.getUserVipBenefit(accept.getAcceptUserId(), VipBenefitType.XP_RATE);
|
||||
BigDecimal resultValueCount = giftValueCount.multiply(userVipBenefit).setScale(0, RoundingMode.DOWN);
|
||||
// 记录魅力等级
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user