From 9bdce9a98cb90c53055de41fcc29a7e3488e9ab6 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 28 May 2026 14:55:06 +0800 Subject: [PATCH] =?UTF-8?q?yomi=20=E6=B8=B8=E6=88=8F=20=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E7=A9=BA=E5=A4=B4=E5=83=8F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../circle/other/app/service/game/YomiGameServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 1f919479..3c02437f 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 @@ -33,6 +33,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; +import java.util.Optional; import java.util.concurrent.TimeUnit; /** @@ -81,11 +82,12 @@ 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(); return YomiTokenCO.builder() .platUserId(cmd.getPlatUserId()) .platUserOpenId("") // 项目暂无 openId 概念,按协议传空 .nickname(profile.getUserNickname()) - .avatar(profile.getUserAvatar()) + .avatar(avatar) .balance(balanceResp.getBody().getDollarAmount().longValue()) .platToken(token) .expireAt(expireAt)