cp礼物 90%处理

(cherry picked from commit 3bda1f465caa65b06ff8b0b87ee937486217856a)
This commit is contained in:
tianfeng 2026-05-07 18:26:23 +08:00
parent a3104d41fb
commit 2c1e9bdd58
5 changed files with 6 additions and 14 deletions

View File

@ -121,7 +121,7 @@ public class GiveGiftsListener implements MessageListener {
}
private void execute(GiveAwayGiftBatchEvent eventBody) {
log.warn("礼物消息:{}", eventBody);
log.info("礼物消息处理: consumeId={}", eventBody.getTrackId());
if (!ValidatorUtils.validateFastPass(eventBody)) {
log.warn("[{}]消息数据异常,必填参数为空:{}", TAG, JacksonUtils.toJson(eventBody));
@ -139,14 +139,6 @@ public class GiveGiftsListener implements MessageListener {
private void process(GiveAwayGiftBatchEvent eventBody) {
processGiftSend(eventBody);
/*processGameBurstCrystal(eventBody);
try {
processBarrageGame(eventBody);
} catch (Exception e) {
log.error("赠送礼物请求百顺发送特技异常", e);
}*/
// 发送IM通知
// sendIM(eventBody);
}
private void processBarrageGame(GiveAwayGiftBatchEvent eventBody) {
@ -528,7 +520,7 @@ public class GiveGiftsListener implements MessageListener {
} else if (event.checkCpGift()){
// CP礼物
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("0.7"))).setScale(0, RoundingMode.DOWN);
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("0.9"))).setScale(0, RoundingMode.DOWN);
acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN);
} else if (event.checkActivityGift()){

View File

@ -717,7 +717,7 @@ public class GiftCountStrategy implements GiftStrategy {
}
if (isCpGift(giftValue)) {
BigDecimal ratio = new BigDecimal("0.7");
BigDecimal ratio = new BigDecimal("0.9");
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
}

View File

@ -118,7 +118,7 @@ public class GiftRocketListener implements GiftStrategy {
}
if (isCpGift(giftValue)) {
return new BigDecimal("0.7");
return new BigDecimal("0.9");
}
if (isActivityGift(giftValue)) {

View File

@ -170,7 +170,7 @@ public class RankCountStrategy implements GiftStrategy {
}
if (isCpGift(giftValue)) {
return new BigDecimal("0.7");
return new BigDecimal("0.9");
}
if (isActivityGift(giftValue)) {

View File

@ -530,7 +530,7 @@ public class UserRegionGatewayImpl implements UserRegionGateway {
*/
@Override
public BigDecimal getAssistCpGiftGoldRatio(String regionId) {
BigDecimal defaultRatio = BigDecimal.valueOf(0.07);
BigDecimal defaultRatio = BigDecimal.valueOf(0.09);
if (StringUtils.isBlank(regionId)) {
return defaultRatio;
}