3 Commits

Author SHA1 Message Date
4eb1d55b1b 公会列表bug 2025-10-20 14:56:09 +08:00
a4768691bb cdn链接 2025-10-20 10:59:25 +08:00
230f81fd98 独联体发放的钻石奖励加上对应发放的额外钻石数量 2025-10-17 15:31:37 +08:00
4 changed files with 24 additions and 24 deletions

View File

@@ -1894,7 +1894,7 @@ public class Constant {
public static final Byte invalid = 0; //无效
}
public static String DEFAULT_DOMAIN = "https://img.molistar.xyz";
public static String DEFAULT_DOMAIN = "https://cdn.moliparty.com";
public static String DEFAULT_NICK = "Platform New User";
public static String DEFAULT_AVATAR = DEFAULT_DOMAIN + "/default_avatar_molistar.png";
public static String DEFAULT_CAR = DEFAULT_DOMAIN + "/default_car.png";

View File

@@ -319,9 +319,9 @@ public enum I18nAlertEnum {
GOLD_BEAN_NAME("Gold Bean"),
DIAMOND_NAME("DIAMOND"),
GUILD_CREATE_TASK_MSG("你在公会的卓越表现,获得了精美奖励。快去背包看看吧!"),
EXTRA_GUILD_MSG("你的钻石奖励已经发放,请注意查收"),
EXTRA_GUILD_MEMBER_MSG("你的钻石奖励已经发放,请注意查收"),
EXTRA_ROOM_MSG("你的钻石奖励已经发放,请注意查收"),
EXTRA_GUILD_MSG("尊敬的用户,根据政策,您的公会长次日奖励{0}钻石已到账,您可以前往【我的钱包】查看"),
EXTRA_GUILD_MEMBER_MSG("尊敬的用户,根据政策,您的主播次日奖励{0}钻石已到账,您可以前往【我的钱包】查看"),
EXTRA_ROOM_MSG("尊敬的用户,根据政策,您每周一结算的奖励{0}钻石已到账,您可以前往【我的钱包】查看"),
;
private final String defaultStr;

View File

@@ -547,15 +547,12 @@ public class GuildManagerService {
Collections.shuffle(guildList);
guildList = guildList.subList(0, 10);
}
List<Integer> guildIds = guildList.stream().map(Guild::getId).collect(Collectors.toList());
Map<Integer, GuildSSRankDetailVo> ssMarkMap = ssGuildService.getSSMarkByGuildId(partitionInfo.getId(), guildIds);
Map<Integer, Integer> memberNumMap = guildService.getGuildMemberNumMapByGuildIds(guildIds);
for (Guild guild: guildList){
SimpleGuildVo vo = new SimpleGuildVo();
vo.setGuildId(guild.getId());
vo.setGuildName(guild.getName());
vo.setMemberNumLimit(guild.getMemberNumLimit());
vo.setOwnerUid(guild.getOwnerUid());
vo.setWeekIncome(weekIncomeMap.getOrDefault(guild.getId(), 0D));
voList.add(vo);
}

View File

@@ -138,19 +138,20 @@ public class ExtraDiamondDayService {
boolean updateBatchById = guildExtraDiamondDayService.updateBatchById(guildExtraDiamondDays);
if (!updateBatchById) {
}
HashSet<Long> uids = new HashSet<>();
Map<Long, BigDecimal> sendGoldMap = new HashMap<>();
for (GuildExtraDiamondDay extraDiamondDay : guildExtraDiamondDays) {
BigDecimal sendGold = BigDecimal.ZERO;
if (extraDiamondDay.getAnchorExtraNum().compareTo(BigDecimal.ZERO) > 0) {
userPurseService.addGold(extraDiamondDay.getUid(), extraDiamondDay.getAnchorExtraNum().doubleValue(), ANCHOR_EXTRA_GOLD);
uids.add(extraDiamondDay.getUid());
sendGold = sendGold.add(extraDiamondDay.getAnchorExtraNum());
}
if (extraDiamondDay.getAnchorExtraLuckyNum().compareTo(BigDecimal.ZERO) > 0) {
userPurseService.addGold(extraDiamondDay.getUid(), extraDiamondDay.getAnchorExtraLuckyNum().doubleValue(), ANCHOR_EXTRA_LUCKY_GOLD);
uids.add(extraDiamondDay.getUid());
sendGold = sendGold.add(extraDiamondDay.getAnchorExtraLuckyNum());
}
sendGoldMap.put(extraDiamondDay.getUid(), sendGold);
}
String message = I18NMessageSourceUtil.getMessage(I18nAlertEnum.EXTRA_GUILD_MEMBER_MSG, partitionId);
this.sendMessage(message, uids);
this.sendMessage(I18nAlertEnum.EXTRA_GUILD_MEMBER_MSG, sendGoldMap, partitionId);
}
} catch (Exception e) {
log.error("sendGuildMemberExtraDiamondTask anchor error" , e);
@@ -204,15 +205,14 @@ public class ExtraDiamondDayService {
ownerExtra = ownerExtra == null ? add : ownerExtra.add(add);
ownerExtraMap.put(ownerUid, ownerExtra);
}
HashSet<Long> uids = new HashSet<>();
Map<Long, BigDecimal> sendGoldMap = new HashMap<>();
for (Map.Entry<Long, BigDecimal> decimalEntry : ownerExtraMap.entrySet()) {
if (decimalEntry.getValue().compareTo(BigDecimal.ZERO) > 0) {
userPurseService.addGold(decimalEntry.getKey(), decimalEntry.getValue().doubleValue(), OWNER_EXTRA_GOLD);
uids.add(decimalEntry.getKey());
sendGoldMap.put(decimalEntry.getKey(), decimalEntry.getValue());
}
}
String message = I18NMessageSourceUtil.getMessage(I18nAlertEnum.EXTRA_GUILD_MSG, partitionId);
this.sendMessage(message, uids);
this.sendMessage(I18nAlertEnum.EXTRA_GUILD_MSG, sendGoldMap, partitionId);
}
} catch (Exception e) {
log.error("sendGuildExtraDiamondTask anchor error" , e);
@@ -258,18 +258,17 @@ public class ExtraDiamondDayService {
},
BigDecimal::add
));
HashSet<Long> uids = new HashSet<>();
Map<Long, BigDecimal> sendGoldMap = new HashMap<>();
extraDiamondMap.entrySet().stream()
.filter(entry -> entry.getValue().compareTo(BigDecimal.ZERO) > 0)
.forEach(entry -> {
Long roomUid = entry.getKey();
BigDecimal extraDiamond = entry.getValue();
userPurseService.addGold(roomUid, extraDiamond.doubleValue(), ROOM_EXTRA_GOLD);
uids.add(roomUid);
sendGoldMap.put(roomUid, extraDiamond);
});
String message = I18NMessageSourceUtil.getMessage(I18nAlertEnum.EXTRA_GUILD_MEMBER_MSG, partitionId);
this.sendMessage(message, uids);
this.sendMessage(I18nAlertEnum.EXTRA_ROOM_MSG, sendGoldMap, partitionId);
} catch (Exception e) {
log.error("sendLastDayDiamondtask room error" , e);
} finally {
@@ -280,9 +279,13 @@ public class ExtraDiamondDayService {
}
@Async
public void sendMessage(String msg, Set<Long> uids) {
uids.forEach(uid -> {
baseSendService.sendSystemMsg(uid.toString(), msg);
public void sendMessage(I18nAlertEnum msg, Map<Long, BigDecimal> sendGoldMap, Integer partitionId) {
sendGoldMap.entrySet().forEach(entry -> {
if (entry.getValue().compareTo(BigDecimal.ZERO) <= 0) {
return;
}
String message = I18NMessageSourceUtil.getMessage(msg, new Object[]{entry.getValue()}, partitionId);
baseSendService.sendSystemMsg(entry.getKey().toString(), message);
});
}
}