yomi 获取用户头像填充默认值
This commit is contained in:
parent
2efe860daa
commit
8d2237a974
@ -114,11 +114,13 @@ public class YomiGameServiceImpl implements YomiGameService {
|
|||||||
if (response == null || response.getBody() == null) {
|
if (response == null || response.getBody() == null) {
|
||||||
throw new Exception("查询用户余额失败");
|
throw new Exception("查询用户余额失败");
|
||||||
}
|
}
|
||||||
|
String userAvatar = profile.getUserAvatar();
|
||||||
|
String avatar = userAvatar != null && !userAvatar.isEmpty() ? userAvatar : "-";
|
||||||
return YomiUserInfoCO.builder()
|
return YomiUserInfoCO.builder()
|
||||||
.platUserId(cmd.getPlatUserId())
|
.platUserId(cmd.getPlatUserId())
|
||||||
.platUserOpenId("") // 项目暂无 openId 概念,按协议传空
|
.platUserOpenId("") // 项目暂无 openId 概念,按协议传空
|
||||||
.nickname(profile.getUserNickname())
|
.nickname(profile.getUserNickname())
|
||||||
.avatar(profile.getUserAvatar())
|
.avatar(avatar)
|
||||||
.balance(response.getBody().getDollarAmount().longValue())
|
.balance(response.getBody().getDollarAmount().longValue())
|
||||||
.build();
|
.build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user