用户送礼等级
This commit is contained in:
parent
ac9b431367
commit
cd904de915
@ -190,6 +190,17 @@ public class GiftCountStrategy implements GiftStrategy {
|
|||||||
boolean isHighPriceGift = checkHighPriceGift(runningWater);
|
boolean isHighPriceGift = checkHighPriceGift(runningWater);
|
||||||
|
|
||||||
BigDecimal giftValueCount = BigDecimal.valueOf(getActualAmount(giftValue, giftValue.getGiftValue()));
|
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 -> {
|
runningWater.getAcceptUsers().forEach(accept -> {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user