道具券和活动修复
This commit is contained in:
parent
065c18eaff
commit
3c316cdb15
@ -18,6 +18,7 @@ import com.red.circle.other.inner.asserts.OtherErrorCode;
|
||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||
import com.red.circle.other.inner.endpoint.live.RoomManagerClient;
|
||||
import com.red.circle.other.inner.endpoint.material.props.*;
|
||||
import com.red.circle.other.inner.endpoint.user.user.UserProfileClient;
|
||||
import com.red.circle.other.inner.enums.material.BadgeBackpackExpireTypeEnum;
|
||||
import com.red.circle.other.inner.enums.material.ConsolePropsTypeEnum;
|
||||
import com.red.circle.other.inner.enums.material.SysNobleVipTypeEnum;
|
||||
@ -52,7 +53,7 @@ public class PropCouponUseCmdExe {
|
||||
private final RoomThemeBackpackClient roomThemeBackpackClient;
|
||||
private final PropCouponUseRecordDAO propCouponUseRecordDAO;
|
||||
private final PropsCommodityStoreClient propsCommodityStoreClient;
|
||||
private final PropsCommodityStoreService propsCommodityStoreService;
|
||||
private final UserProfileClient userProfileClient;
|
||||
private final PropsNobleVipClient propsNobleVipClient;
|
||||
private final RoomManagerClient roomManagerClient;
|
||||
|
||||
@ -149,16 +150,9 @@ public class PropCouponUseCmdExe {
|
||||
|
||||
roomManagerClient.updateRoomSettingMemberCapacity(userId,
|
||||
vipAbility.getRoomMaxMember(), vipAbility.getAdminNumber());
|
||||
//保存vip实际权益有效时间
|
||||
// Boolean isDuke = Objects.equals(vipAbility.getVipType(), SysNobleVipTypeEnum.DUKE.name());
|
||||
// Boolean isKing = Objects.equals(vipAbility.getVipType(), SysNobleVipTypeEnum.KING.name());
|
||||
// Boolean isBuy = Objects.equals(cmd.getVipOrigin(), SendPropsOrigin.BUY_OR_GIVE.name());
|
||||
// Boolean isActivity = Objects
|
||||
// .equals(cmd.getVipOrigin(), SendPropsOrigin.ACTIVITY_AWARD.name());
|
||||
// if ((isDuke || isKing) && (isBuy || isActivity)) {
|
||||
// propsNobleVipClient.addActualEquity(cmd.getReceiverId(),
|
||||
// vipAbility.getId(), Long.valueOf(cmd.getExchangeDays()));
|
||||
// }
|
||||
|
||||
// 使用最大等级的VIP
|
||||
useMaxNobleVip(userId);
|
||||
break;
|
||||
|
||||
case CHAT_BUBBLE:
|
||||
@ -196,6 +190,18 @@ public class PropCouponUseCmdExe {
|
||||
}
|
||||
}
|
||||
|
||||
private void useMaxNobleVip(Long receiverId) {
|
||||
PropsNobleVipAbilityDTO abilityDTO = propsNobleVipClient.getUserMaxAbilityDTO(receiverId).getBody();
|
||||
if (Objects.isNull(abilityDTO)) {
|
||||
return;
|
||||
}
|
||||
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getId());
|
||||
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getAvatarFrameId());
|
||||
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getDataCardId());
|
||||
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getCarId());
|
||||
userProfileClient.removeCacheAll(receiverId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 赠送普通道具(头像框、座驾、VIP、聊天气泡、资料卡、飘屏)
|
||||
*/
|
||||
|
||||
@ -38,6 +38,7 @@ import com.red.circle.other.app.dto.cmd.game.barrage.GameUserEffectsCmd;
|
||||
import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway;
|
||||
import com.red.circle.other.domain.live.LiveHeartbeatCache;
|
||||
import com.red.circle.other.domain.model.user.ability.RegionConfig;
|
||||
import com.red.circle.other.domain.ranking.RankingActivityType;
|
||||
import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService;
|
||||
import com.red.circle.other.infra.database.cache.service.other.LiveHeartbeatCacheService;
|
||||
import com.red.circle.other.infra.database.mongo.entity.gift.GiftAcceptUser;
|
||||
@ -881,8 +882,7 @@ public class GiveGiftsListener implements MessageListener {
|
||||
|
||||
return new GiftValue()
|
||||
.setCurrencyType(giftConfig.getType())
|
||||
.setGiftType(event.checkWeekStar() ? GiftSpecialEnum.STAR.name() : event.checkWeekKingQueen()
|
||||
? GiftSpecialEnum.KING_QUEEN.name() : giftConfig.getGiftTab())
|
||||
.setGiftType(getGiftType(event, giftConfig))
|
||||
.setUnitPrice(giftConfig.getGiftCandy())
|
||||
.setQuantity(event.getQuantity())
|
||||
.setUserSize(event.acceptUserSize())
|
||||
@ -893,8 +893,16 @@ public class GiveGiftsListener implements MessageListener {
|
||||
.setBag(event.getBagGift());
|
||||
}
|
||||
|
||||
private static String getGiftType(GiveAwayGiftBatchEvent event, GiveGiftConfig giftConfig) {
|
||||
return event.checkWeekStar() ? GiftSpecialEnum.STAR.name() :
|
||||
event.checkWeekKingQueen() ? GiftSpecialEnum.KING_QUEEN.name() :
|
||||
giftConfig.getSpecial().contains(RankingActivityType.REVOLUTION_DAY.name()) ? giftConfig.getSpecial() :
|
||||
giftConfig.getSpecial().contains(RankingActivityType.HEROES_DAY.name()) ? giftConfig.getSpecial() :
|
||||
giftConfig.getGiftTab();
|
||||
}
|
||||
|
||||
private Timestamp getCreateTime(GiveAwayGiftBatchEvent event) {
|
||||
|
||||
private Timestamp getCreateTime(GiveAwayGiftBatchEvent event) {
|
||||
return Objects.nonNull(event.getCreateTime()) ? event.getCreateTime() : TimestampUtils.now();
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.red.circle.other.app.listener.gift.strategy;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.red.circle.framework.core.dto.ReqSysOrigin;
|
||||
import com.red.circle.mq.business.model.event.gift.OfflineProcessGiftEvent;
|
||||
import com.red.circle.other.app.common.gift.GameLuckyGiftCommon;
|
||||
import com.red.circle.other.app.dto.cmd.activity.RankingDataUpdateCmd;
|
||||
@ -428,6 +429,7 @@ public class RankCountStrategy implements GiftStrategy {
|
||||
receiverCmd.setDimension(RankingDimension.CONSUME_AMOUNT.getCode());
|
||||
receiverCmd.setIncrementQuantity(actualAmount);
|
||||
receiverCmd.setBizNo(runningWater.getId().toString());
|
||||
receiverCmd.setReqSysOrigin(ReqSysOrigin.of("LIKEI"));
|
||||
rankingActivityService.accumulateRankingData(receiverCmd);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user