From c2dce27d2ac71dbb3497b2bdce3425bc25cad222 Mon Sep 17 00:00:00 2001 From: Gary Date: Mon, 29 Jan 2024 13:40:02 +0800 Subject: [PATCH] 1.add default avatar --- luoo_common/src/main/java/constants/Constants.java | 2 ++ .../src/main/java/com/luoo/user/service/UserInfoService.java | 1 + 2 files changed, 3 insertions(+) diff --git a/luoo_common/src/main/java/constants/Constants.java b/luoo_common/src/main/java/constants/Constants.java index 6117e13..b86ce4e 100644 --- a/luoo_common/src/main/java/constants/Constants.java +++ b/luoo_common/src/main/java/constants/Constants.java @@ -18,6 +18,8 @@ public class Constants { public static final String RESOURCE_PREFIX = "http://cdn.indie.cn/"; public static final String MUSIC_RESOURCE_PREFIX = RESOURCE_PREFIX + "music/"; + public static final String DEFAULT_USER_AVATAR = "user/avatar/default_20240129_111811.jpg"; + public static final Integer LENGTH_8 = 8; public static final Integer LENGTH_10 = 10; diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java index cc13754..c596d8a 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java @@ -297,6 +297,7 @@ public class UserInfoService { user.setJoinTime(curDate); user.setLastLoginTime(curDate); user.setStatus(UserStatusEnum.ENABLE.getStatus()); + user.setAvatar(Constants.DEFAULT_USER_AVATAR); } else { user.setLastUseDeviceId(userInfo.getLastUseDeviceId()); user.setLastUseDeviceBrand(userInfo.getLastUseDeviceBrand());