|
@@ -106,17 +106,18 @@ public class GameUserChatServiceImpl extends ServiceImpl<GameUserChatMapper, Gam
|
|
|
return;
|
|
|
}
|
|
|
Optional.ofNullable(this.getGameUserRole(gameIds, roleId))
|
|
|
- .filter(gameUserRole -> Strings.isNotBlank(gameUserRole.getExtra()))
|
|
|
.ifPresent(gameUserRole -> {
|
|
|
- Optional.ofNullable(JsonUtil.toMap(gameUserRole.getExtra(), Map.class, String.class))
|
|
|
- .ifPresent(extraMap -> {
|
|
|
- Optional.ofNullable(extraMap.get("countryId"))
|
|
|
- .filter(Strings::isNotBlank)
|
|
|
- .ifPresent(guildIdSetter);
|
|
|
- Optional.ofNullable(extraMap.get("country"))
|
|
|
- .filter(Strings::isNotBlank)
|
|
|
- .ifPresent(guildNameSetter);
|
|
|
- });
|
|
|
+ if (Strings.isNotBlank(gameUserRole.getExtra())) {
|
|
|
+ Optional.ofNullable(JsonUtil.toMap(gameUserRole.getExtra(), Map.class, String.class))
|
|
|
+ .ifPresent(extraMap -> {
|
|
|
+ Optional.ofNullable(extraMap.get("countryId"))
|
|
|
+ .filter(Strings::isNotBlank)
|
|
|
+ .ifPresent(guildIdSetter);
|
|
|
+ Optional.ofNullable(extraMap.get("country"))
|
|
|
+ .filter(Strings::isNotBlank)
|
|
|
+ .ifPresent(guildNameSetter);
|
|
|
+ });
|
|
|
+ }
|
|
|
serverInfoSetter.accept(gameUserRole);
|
|
|
});
|
|
|
}
|