From 3f13c0a2d51b635c9c99c61bb0479b4d71aa0739 Mon Sep 17 00:00:00 2001 From: pikaqiudeshujia Date: Thu, 16 May 2024 16:44:09 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E6=AD=8C=E6=9B=B2=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BA=BA=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../luoo/music/dto/response/UserInfoDTO.java | 2 ++ .../com/luoo/music/service/AlbumService.java | 3 ++- .../main/java/com/luoo/user/pojo/UserInfo.java | 17 +++++++++-------- .../com/luoo/user/service/ArtistService.java | 1 + 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/dto/response/UserInfoDTO.java b/luoo_music/src/main/java/com/luoo/music/dto/response/UserInfoDTO.java index 71bd2c4..248e341 100644 --- a/luoo_music/src/main/java/com/luoo/music/dto/response/UserInfoDTO.java +++ b/luoo_music/src/main/java/com/luoo/music/dto/response/UserInfoDTO.java @@ -126,4 +126,6 @@ public class UserInfoDTO { private int onlineStatus; private String badges; + + private Integer type; } diff --git a/luoo_music/src/main/java/com/luoo/music/service/AlbumService.java b/luoo_music/src/main/java/com/luoo/music/service/AlbumService.java index c5de205..ca3e972 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/AlbumService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/AlbumService.java @@ -622,7 +622,8 @@ public class AlbumService { songInfo.setId(String.valueOf(idWorker.nextId())); songInfo.setAlbum(albumName); songInfo.setState(SongInfoStateEnum.NO_USE.getCode()); - songInfo.setUserType(UserTypeEnum.ARTIST_BAND.getCode()); + UserInfoDTO userInfoDTO = userClient.findByUserId(user.getUserId()); + songInfo.setUserType(String.valueOf(userInfoDTO.getType())); songInfo.setArtist(artistName); if (user != null) { artistAlbum.setCreateUser(user.getUserId()); diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java b/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java index f4945c7..2f63d33 100644 --- a/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java +++ b/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java @@ -1,19 +1,15 @@ package com.luoo.user.pojo; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.luoo.user.util.EmojiConverterUtil; import lombok.*; - -import java.util.Date; +import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.luoo.user.util.EmojiConverterUtil; - -import org.springframework.format.annotation.DateTimeFormat; - import java.io.Serializable; +import java.util.Date; @Getter @@ -185,6 +181,11 @@ public class UserInfo implements Serializable { * 登录用户名 */ private String userName; + + /** + * 用户type + */ + private Integer type; } diff --git a/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java b/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java index ecb0b50..51e3053 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java @@ -81,6 +81,7 @@ public class ArtistService { .thumbnail(Constants.DEFAULT_USER_THUMBNAIL) .signature(Constants.DEFAULT_USER_SIGNATURE) .userName(artistRegisterDto.getUserName()) + .type(artistRegisterDto.getType()) .password(encoder.encode(artistRegisterDto.getPassword())) .build(); userInfoDao.save(userInfo);