家族礼物涨经验值完善

This commit is contained in:
tianfeng 2025-12-25 15:31:33 +08:00
parent 8228be28db
commit 4f1d587177
4 changed files with 14 additions and 0 deletions

View File

@ -554,6 +554,7 @@ public class GiveGiftsListener implements MessageListener {
.setRegionEq(Objects.equals(sendRegion.getId(), acceptRegion.getId()))
.setAcceptAmount(acceptAmount)
.setTargetAmount(targetAmount)
.setGiftValue(giftValue.getGiftValue())
.setPercentage(acceptAssistRatio)
.setSelfPercentage(Boolean.TRUE.equals(isConflicts) ? BigDecimal.ZERO : sendAssistRatio)
.setCountTargetAmount(Boolean.FALSE)

View File

@ -620,6 +620,13 @@ public class GiftCountStrategy implements GiftStrategy {
Long actualAmount = getActualAmount(isLuckyGift, runningWater.getGiftValue().getActualAmount(), luckyGiftRatio);
familyCommon.addFamilyExpAndLevelUp(runningWater.getUserId(), runningWater.getSysOrigin(), actualAmount);
runningWater.getAcceptUsers().forEach(acceptUser -> {
familyCommon.addFamilyExpAndLevelUp(acceptUser.getAcceptUserId(), runningWater.getSysOrigin(), acceptUser.getGiftValue().longValue());
});
}
private boolean checkWeekStar(GiftValue giftValue) {

View File

@ -47,6 +47,11 @@ public class GiftAcceptUser implements Serializable {
*/
private BigDecimal targetAmount;
/**
* 礼物价值giftUnitPrice * quantity.
*/
private BigDecimal giftValue;
/**
* 后面版本可以去除这个字段 使用countBillId判断是否被统计到账单 true 已被统计false 未统计.
*/

View File

@ -113,6 +113,7 @@ public class GiftGiveRunningWaterServiceImpl implements GiftGiveRunningWaterServ
.receiptId(acceptUser.getLong("receiptId"))
.acceptAmount(getDocBigDecimal(acceptUser, "acceptAmount"))
.targetAmount(getDocBigDecimal(acceptUser, "targetAmount"))
.giftValue(getDocBigDecimal(acceptUser, "giftValue"))
.countTargetAmount(acceptUser.getBoolean("countTargetAmount"))
.countBillId(acceptUser.getLong("countBillId"))
.percentage(getDocBigDecimal(acceptUser, "percentage"))