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);