diff --git a/luoo_common/src/main/java/enums/UserTypeEnum.java b/luoo_common/src/main/java/enums/UserTypeEnum.java index 3417a46..3c24abb 100644 --- a/luoo_common/src/main/java/enums/UserTypeEnum.java +++ b/luoo_common/src/main/java/enums/UserTypeEnum.java @@ -13,20 +13,20 @@ import lombok.Getter; @Getter public enum UserTypeEnum { - NORMAL(1, "普通用户"), + NORMAL("1", "普通用户"), - ARTIST_PERSON(2, "音乐人个人"), + ARTIST_PERSON("2", "音乐人个人"), - ARTIST_BAND(3, "音乐人乐队"), + ARTIST_BAND("3", "音乐人乐队"), - LABEL(4, "厂牌"), + LABEL("4", "厂牌"), - ARTIST_MEMBER(5, "乐队成员"); + ARTIST_MEMBER("5", "乐队成员"); - private Integer code; + private String code; private String desc; - UserTypeEnum(Integer code, String desc) { + UserTypeEnum(String code, String desc) { this.code = code; this.desc = desc; } 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 89a0b89..c5de205 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 @@ -341,6 +341,12 @@ public class AlbumService { .type(ApproveTypeEnum.ALBUM.getCode()) .build(); approveDao.save(successApprove); + + List songInfoList = songInfoDao.findByAlbumId(successApprove.getId()); + for (SongInfo songInfo : songInfoList) { + songInfo.setState(SongInfoStateEnum.IN_USE.getCode()); + songInfoDao.save(songInfo); + } break; case 3: // 审核不通过操作 @@ -615,7 +621,8 @@ public class AlbumService { BeanUtils.copyProperties(albumSongAddDTO, songInfo); songInfo.setId(String.valueOf(idWorker.nextId())); songInfo.setAlbum(albumName); - songInfo.setState(SongInfoStateEnum.IN_USE.getCode()); + songInfo.setState(SongInfoStateEnum.NO_USE.getCode()); + songInfo.setUserType(UserTypeEnum.ARTIST_BAND.getCode()); songInfo.setArtist(artistName); if (user != null) { artistAlbum.setCreateUser(user.getUserId());