diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java index 3c02437f..876c585b 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/game/YomiGameServiceImpl.java @@ -82,7 +82,8 @@ public class YomiGameServiceImpl implements YomiGameService { long expireAt = System.currentTimeMillis() / 1000 + yomiConfig.getTokenExpireSeconds(); redisTemplate.opsForValue().set(buildTokenCacheKey(token), cmd.getPlatUserId(), yomiConfig.getTokenExpireSeconds(), TimeUnit.SECONDS); - String avatar = profile.getUserAvatar().isBlank() ? "-" : profile.getUserAvatar(); + String userAvatar = profile.getUserAvatar(); + String avatar = userAvatar != null && !userAvatar.isEmpty() ? userAvatar : "-"; return YomiTokenCO.builder() .platUserId(cmd.getPlatUserId()) .platUserOpenId("") // 项目暂无 openId 概念,按协议传空