日常任务-公会开业任务刷新逻辑fixed

This commit is contained in:
2025-09-04 21:34:07 +08:00
parent fdfee7a543
commit 0a3b7ae1e0

View File

@@ -148,7 +148,7 @@ public class GuildTaskService {
GuildTaskReachRecord existOne = existRecordMap.get(levelInfo.getLevel());
if (existOne != null) {
//不是当天并且等级已经达标,计算下一级
RMap<Integer, Integer> receicveStatus = this.receicveStatus(existOne.getGuildId());
RMap<Integer, Integer> receicveStatus = this.receicveStatus(existOne.getTaskKey(), existOne.getGuildId());
if (statDate.equals(existOne.getStatDate()) && !receicveStatus.containsKey(existOne.getLevel())) {
existOne.setDiamondNum(diamond);
existOne.setAnchorNum(memberNum.intValue());
@@ -161,10 +161,7 @@ public class GuildTaskService {
existOne.setReachStatus(reachStatus ? 1 : 0);
existOne.setUpdateTime(now);
resultList.add(existOne);
if (!reachStatus) {
break;
}
} else {
} else if (!statDate.equals(existOne.getStatDate()) && existOne.getReachStatus() <= 0) {
this.addNewGuildReachRecord(cycleDate, resultList, levelInfo, guildId, partitionId, statDate,
diamond, anchorReachNum, memberNum.intValue());
}
@@ -426,7 +423,7 @@ public class GuildTaskService {
if (reachRecord.getReceiveStatus() > 0) {
throw new ServiceException(BusiStatus.ROOM_DAY_DIAMOND_REWARD_RECV_RECORD_EXIST);
}
RMap<Integer, Integer> receicveStatus = this.receicveStatus(reachRecord.getGuildId());
RMap<Integer, Integer> receicveStatus = this.receicveStatus(reachRecord.getTaskKey(), reachRecord.getGuildId());
if (receicveStatus.fastPutIfAbsent(reachRecord.getLevel(), 1)) {
throw new ServiceException(BusiStatus.ROOM_DAY_DIAMOND_REWARD_RECV_RECORD_EXIST);
}
@@ -527,7 +524,7 @@ public class GuildTaskService {
baseSendService.sendSystemMsg(uidStr, tip);
}
private RMap<Integer, Integer> receicveStatus(Integer guildId) {
return redissonClient.getMap(guild_task_receive.getKey(guildId), new TypedJsonJacksonCodec(Integer.class, Integer.class));
private RMap<Integer, Integer> receicveStatus(String taskKey, Integer guildId) {
return redissonClient.getMap(guild_task_receive.getKey(taskKey, guildId.toString()), new TypedJsonJacksonCodec(Integer.class, Integer.class));
}
}