幸运25-兼容GiftMessageConsume对于lucky礼物的处理
This commit is contained in:
@@ -106,7 +106,8 @@ public class RamadanGiftSendService {
|
||||
addPoolGoldRate = config.getCpGiftPoolGoldRate();
|
||||
} else if (GiftTypeEnum.LUCKY_24.getType() == giftType
|
||||
|| GiftTypeEnum.SUPER_LUCKY.getType() == giftType
|
||||
|| GiftTypeEnum.BRAVO.getType() == giftType) {
|
||||
|| GiftTypeEnum.BRAVO.getType() == giftType
|
||||
|| GiftTypeEnum.LUCKY_25.getType() == giftType) {
|
||||
addPoolGoldRate = config.getLuckyPoolGoldRate();
|
||||
goldNum = luckyGiftGoldNum;
|
||||
} else if (GiftTypeEnum.CUSTOM.getType() == giftType) {
|
||||
|
@@ -138,7 +138,9 @@ public interface RoomBoomConstant {
|
||||
this.strategy = strategy;
|
||||
}
|
||||
public static BigDecimal apply(int giftType, int partitionId) {
|
||||
if (Constant.GiftType.LUCKY_24 == giftType || Constant.GiftType.SUPER_LUCKY == giftType) {
|
||||
if (Constant.GiftType.SUPER_LUCKY == giftType
|
||||
|| Constant.GiftType.LUCKY_24 == giftType
|
||||
|| Constant.GiftType.LUCKY_25 == giftType) {
|
||||
return LUCKY.strategy.apply(giftType, partitionId);
|
||||
} else if (Constant.GiftType.BRAVO_GIFT == giftType) {
|
||||
return BRAVO.strategy.apply(giftType, partitionId);
|
||||
|
@@ -37,8 +37,6 @@ public class SuperLuckyGiftSendListener implements ApplicationListener<SuperLuck
|
||||
@Autowired
|
||||
private RoomLevelService roomLevelService;
|
||||
@Autowired
|
||||
private RoomBoomBizService roomBoomBizService;
|
||||
@Autowired
|
||||
private RoomDayDiamondNumService roomDayDiamondNumService;
|
||||
|
||||
|
||||
|
@@ -66,7 +66,8 @@ public class GiftMessageService extends BaseService {
|
||||
giftMessage.setRealGoldNum(totalGoldNum);
|
||||
if (Constant.GiftType.SUPER_LUCKY == giftType
|
||||
|| Constant.GiftType.LUCKY_24 == giftType
|
||||
|| Constant.GiftType.BRAVO_GIFT == giftType){
|
||||
|| Constant.GiftType.BRAVO_GIFT == giftType
|
||||
|| Constant.GiftType.LUCKY_25 == giftType){
|
||||
giftMessage.setGoldNum(0L);
|
||||
}
|
||||
|
||||
@@ -110,7 +111,8 @@ public class GiftMessageService extends BaseService {
|
||||
//处理逻辑
|
||||
if (Constant.GiftType.SUPER_LUCKY != giftType
|
||||
&& Constant.GiftType.LUCKY_24 != giftType
|
||||
&& Constant.GiftType.BRAVO_GIFT != giftType) {
|
||||
&& Constant.GiftType.BRAVO_GIFT != giftType
|
||||
&& Constant.GiftType.LUCKY_25 != giftType) {
|
||||
//按配置比例分配主播、 会长、房主收益
|
||||
diamondNum = giftEarnAllotService.allotGiftEarn(giftSendRecord, objId, inEnum);
|
||||
//增加送礼用户和收礼用户的财富或魅力经验
|
||||
|
@@ -1125,7 +1125,8 @@ public class GiftSendService extends BaseService {
|
||||
return giftType != null && (
|
||||
Constant.GiftType.LUCKY_24 == giftType ||
|
||||
Constant.GiftType.SUPER_LUCKY == giftType ||
|
||||
Constant.GiftType.BRAVO_GIFT == giftType
|
||||
Constant.GiftType.BRAVO_GIFT == giftType ||
|
||||
Constant.GiftType.LUCKY_25 == giftType
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -112,6 +112,11 @@ public class GiftTabService implements InitializingBean {
|
||||
|| Constant.GiftType.LUCKY_24 == giftVo.getGiftType()
|
||||
|| Constant.GiftType.LUCKY_25 == giftVo.getGiftType())
|
||||
.map(giftVo -> {
|
||||
//兼容旧版本客户端的bomb类型判断
|
||||
if (Constant.GiftType.LUCKY_25 == giftVo.getGiftType()){
|
||||
giftVo.setGiftType(Constant.GiftType.LUCKY_24);
|
||||
}
|
||||
|
||||
SuperLuckyGiftVo superLuckyGiftVo = new SuperLuckyGiftVo();
|
||||
BeanUtils.copyProperties(giftVo, superLuckyGiftVo);
|
||||
superLuckyGiftVo.setBannerUrl(superLuckyGiftConfig.getBannerUrlMap().get(userContext.locale.getLanguage()));
|
||||
|
@@ -77,7 +77,7 @@ public class Lucky25PoolJudgeService {
|
||||
} else if (curPoolType == Lucky25PoolTypeEnum.LOW_POOL.getType()) {
|
||||
|
||||
if (null != partitionConfig.getLowPoolQuitProductionRatio() && judgeProductionRatio.compareTo(partitionConfig.getLowPoolQuitProductionRatio()) < 0){
|
||||
if (!poolService.delPoolAndGenPool(config, senderUid, Lucky25PoolTypeEnum.NEW_USER_POOL.getType(), 4)){
|
||||
if (!poolService.delPoolAndGenPool(config, senderUid, curPoolType, Lucky25PoolTypeEnum.NEW_USER_POOL.getType(), 4)){
|
||||
log.error("[lucky25] judge cas uid {} partitionId {} curPoolType LOW_POOL judgeProductionRatio {} lowPoolQuitProductionRatio {} afterPoolType NEW_USER_POOL failure !!!",
|
||||
senderUid, partitionId, judgeProductionRatio, partitionConfig.getLowPoolQuitProductionRatio());
|
||||
return;
|
||||
|
@@ -295,7 +295,10 @@ public class BillRecordService extends ServiceImpl<BillRecordMapper, BillRecord>
|
||||
searchVo.setBeforeAmount(BigDecimal.valueOf(billRecord.getBeforeAmount()).toPlainString());
|
||||
}
|
||||
BigDecimal amountB = BillObjTypeEnum.GIFT_ROOM_PAY.getValue() == billRecord.getObjType()
|
||||
|| BillObjTypeEnum.GIFT_PERSON_PAY.getValue() == billRecord.getObjType() ?
|
||||
|| BillObjTypeEnum.GIFT_PERSON_PAY.getValue() == billRecord.getObjType()
|
||||
|| BillObjTypeEnum.LUCKY_24_GIFT_PAY.getValue() == billRecord.getObjType()
|
||||
|| BillObjTypeEnum.BRAVO_GIFT_PAY.getValue() == billRecord.getObjType()
|
||||
|| BillObjTypeEnum.LUCKY_25_GIFT_PAY.getValue() == billRecord.getObjType()?
|
||||
BigDecimal.valueOf(billRecord.getGiftTotalGoldNum()).negate(): BigDecimal.valueOf(billRecord.getAmount());
|
||||
searchVo.setAmount(amountB.toPlainString());
|
||||
if (null != billRecord.getAfterAmount()){
|
||||
|
@@ -125,7 +125,7 @@ public abstract class AbstractRoomService implements IRoom {
|
||||
|
||||
@Override
|
||||
public Double roomSerialValue(Long roomUid, Integer partitionId) {
|
||||
Set<Map<String, Object>> dayRank = PartitionEnum.TURKEY.getId() == partitionId.intValue()?
|
||||
Set<Map<String, Object>> dayRank = PartitionEnum.TURKEY.getId() == partitionId ?
|
||||
sendRoomWeekRankService.getRank(new Date(), roomUid, 0L, -1L, partitionId):
|
||||
sendRoomDayRankService.getRank(new Date(), roomUid, 0L, -1L, partitionId);
|
||||
if (CollectionUtil.isEmpty(dayRank)){
|
||||
|
Reference in New Issue
Block a user