新增圣诞礼物类型处理
This commit is contained in:
parent
7c16c483fa
commit
8b92c32af3
@ -244,6 +244,13 @@ public class GiveAwayGiftBatchEvent implements Serializable {
|
||||
return Objects.nonNull(giftConfig) && Objects.equals(giftConfig.getGiftTab(), "CP");
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是圣诞礼物.
|
||||
*/
|
||||
public boolean checkChristmasGift() {
|
||||
return Objects.nonNull(giftConfig) && Objects.equals(giftConfig.getGiftTab(), "CHRISTMAS");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否是专属礼物.
|
||||
|
||||
@ -524,7 +524,7 @@ public class GiveGiftsListener implements MessageListener {
|
||||
targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN);
|
||||
acceptAmount = targetAmount;
|
||||
|
||||
} else if (event.checkCpGift()){
|
||||
} else if (event.checkCpGift() || event.checkChristmasGift()){
|
||||
// CP礼物
|
||||
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
||||
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10").max(new BigDecimal("0.7")))).setScale(0, RoundingMode.DOWN);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user