幸运礼物魔法礼物去除自己的房间
This commit is contained in:
parent
b75ecc87af
commit
05a202ed50
@ -35,6 +35,7 @@ import com.red.circle.other.app.dto.cmd.gift.GiveAwayGiftBatchCmd;
|
||||
import com.red.circle.other.app.dto.cmd.task.RoomDailyTaskProgressUpdateCmd;
|
||||
import com.red.circle.other.app.service.activity.ActivityRechargeTicketService;
|
||||
import com.red.circle.other.app.service.activity.RankingActivityService;
|
||||
import com.red.circle.other.app.service.room.RoomProfileService;
|
||||
import com.red.circle.other.app.service.task.RoomDailyTaskProgressService;
|
||||
import com.red.circle.other.app.util.DateTimeAsiaRiyadhUtils;
|
||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
||||
@ -49,6 +50,8 @@ import com.red.circle.other.infra.database.cache.entity.game.luckgift.LuckyGiftI
|
||||
import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService;
|
||||
import com.red.circle.other.infra.database.cache.service.other.GameLuckyGiftCacheService;
|
||||
import com.red.circle.other.infra.database.cache.service.other.GiftCacheService;
|
||||
import com.red.circle.other.infra.database.mongo.entity.live.RoomProfileManager;
|
||||
import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService;
|
||||
import com.red.circle.other.infra.database.rds.entity.game.GameLuckyGiftCount;
|
||||
import com.red.circle.other.infra.database.rds.entity.game.GameLuckyGiftRuleConfig;
|
||||
import com.red.circle.other.infra.database.rds.entity.game.LuckyGiftProbability;
|
||||
@ -125,6 +128,7 @@ public class GameLuckyGiftCommon {
|
||||
private final RoomDailyTaskProgressService roomDailyTaskProgressService;
|
||||
private final RoomMemberService roomMemberService;
|
||||
private final RedisService redisService;
|
||||
private final RoomProfileManagerService roomProfileManagerService;
|
||||
|
||||
/**
|
||||
* 发送幸运礼物抽奖mq.
|
||||
@ -285,6 +289,11 @@ public class GameLuckyGiftCommon {
|
||||
if (roomMember == null) {
|
||||
return;
|
||||
}
|
||||
// 在自己的房间直接返回
|
||||
RoomProfileManager profileManager = roomProfileManagerService.getById(param.getRoomId());
|
||||
if (profileManager == null || Objects.equals(profileManager.getId(), roomMember.getRoomId())) {
|
||||
return;
|
||||
}
|
||||
|
||||
String redisKey = "room:daily:task:progress:" + taskType.name() + ":" + param.getUserId() + ":" + ZonedDateTimeAsiaRiyadhUtils.now().toLocalDate();
|
||||
Long total = redisService.increment(redisKey, rewardAmount);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user