cp礼物 90%处理
(cherry picked from commit 3bda1f465caa65b06ff8b0b87ee937486217856a)
This commit is contained in:
parent
a3104d41fb
commit
2c1e9bdd58
@ -121,7 +121,7 @@ public class GiveGiftsListener implements MessageListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void execute(GiveAwayGiftBatchEvent eventBody) {
|
private void execute(GiveAwayGiftBatchEvent eventBody) {
|
||||||
log.warn("礼物消息:{}", eventBody);
|
log.info("礼物消息处理: consumeId={}", eventBody.getTrackId());
|
||||||
|
|
||||||
if (!ValidatorUtils.validateFastPass(eventBody)) {
|
if (!ValidatorUtils.validateFastPass(eventBody)) {
|
||||||
log.warn("[{}]消息数据异常,必填参数为空:{}", TAG, JacksonUtils.toJson(eventBody));
|
log.warn("[{}]消息数据异常,必填参数为空:{}", TAG, JacksonUtils.toJson(eventBody));
|
||||||
@ -139,14 +139,6 @@ public class GiveGiftsListener implements MessageListener {
|
|||||||
|
|
||||||
private void process(GiveAwayGiftBatchEvent eventBody) {
|
private void process(GiveAwayGiftBatchEvent eventBody) {
|
||||||
processGiftSend(eventBody);
|
processGiftSend(eventBody);
|
||||||
/*processGameBurstCrystal(eventBody);
|
|
||||||
try {
|
|
||||||
processBarrageGame(eventBody);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("赠送礼物请求百顺发送特技异常", e);
|
|
||||||
}*/
|
|
||||||
// 发送IM通知
|
|
||||||
// sendIM(eventBody);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processBarrageGame(GiveAwayGiftBatchEvent eventBody) {
|
private void processBarrageGame(GiveAwayGiftBatchEvent eventBody) {
|
||||||
@ -528,7 +520,7 @@ public class GiveGiftsListener implements MessageListener {
|
|||||||
} else if (event.checkCpGift()){
|
} else if (event.checkCpGift()){
|
||||||
// CP礼物
|
// CP礼物
|
||||||
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
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);
|
acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN);
|
||||||
|
|
||||||
} else if (event.checkActivityGift()){
|
} else if (event.checkActivityGift()){
|
||||||
|
|||||||
@ -717,7 +717,7 @@ public class GiftCountStrategy implements GiftStrategy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isCpGift(giftValue)) {
|
if (isCpGift(giftValue)) {
|
||||||
BigDecimal ratio = new BigDecimal("0.7");
|
BigDecimal ratio = new BigDecimal("0.9");
|
||||||
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
|
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ public class GiftRocketListener implements GiftStrategy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isCpGift(giftValue)) {
|
if (isCpGift(giftValue)) {
|
||||||
return new BigDecimal("0.7");
|
return new BigDecimal("0.9");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isActivityGift(giftValue)) {
|
if (isActivityGift(giftValue)) {
|
||||||
|
|||||||
@ -170,7 +170,7 @@ public class RankCountStrategy implements GiftStrategy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isCpGift(giftValue)) {
|
if (isCpGift(giftValue)) {
|
||||||
return new BigDecimal("0.7");
|
return new BigDecimal("0.9");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isActivityGift(giftValue)) {
|
if (isActivityGift(giftValue)) {
|
||||||
|
|||||||
@ -530,7 +530,7 @@ public class UserRegionGatewayImpl implements UserRegionGateway {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BigDecimal getAssistCpGiftGoldRatio(String regionId) {
|
public BigDecimal getAssistCpGiftGoldRatio(String regionId) {
|
||||||
BigDecimal defaultRatio = BigDecimal.valueOf(0.07);
|
BigDecimal defaultRatio = BigDecimal.valueOf(0.09);
|
||||||
if (StringUtils.isBlank(regionId)) {
|
if (StringUtils.isBlank(regionId)) {
|
||||||
return defaultRatio;
|
return defaultRatio;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user