release- 歌曲上传和审核的动作

release-2024-08-08
pikaqiudeshujia 6 months ago
parent df964ac563
commit 00e65c8b75

@ -13,20 +13,20 @@ import lombok.Getter;
@Getter @Getter
public enum UserTypeEnum { 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; private String desc;
UserTypeEnum(Integer code, String desc) { UserTypeEnum(String code, String desc) {
this.code = code; this.code = code;
this.desc = desc; this.desc = desc;
} }

@ -341,6 +341,12 @@ public class AlbumService {
.type(ApproveTypeEnum.ALBUM.getCode()) .type(ApproveTypeEnum.ALBUM.getCode())
.build(); .build();
approveDao.save(successApprove); approveDao.save(successApprove);
List<SongInfo> songInfoList = songInfoDao.findByAlbumId(successApprove.getId());
for (SongInfo songInfo : songInfoList) {
songInfo.setState(SongInfoStateEnum.IN_USE.getCode());
songInfoDao.save(songInfo);
}
break; break;
case 3: case 3:
// 审核不通过操作 // 审核不通过操作
@ -615,7 +621,8 @@ public class AlbumService {
BeanUtils.copyProperties(albumSongAddDTO, songInfo); BeanUtils.copyProperties(albumSongAddDTO, songInfo);
songInfo.setId(String.valueOf(idWorker.nextId())); songInfo.setId(String.valueOf(idWorker.nextId()));
songInfo.setAlbum(albumName); songInfo.setAlbum(albumName);
songInfo.setState(SongInfoStateEnum.IN_USE.getCode()); songInfo.setState(SongInfoStateEnum.NO_USE.getCode());
songInfo.setUserType(UserTypeEnum.ARTIST_BAND.getCode());
songInfo.setArtist(artistName); songInfo.setArtist(artistName);
if (user != null) { if (user != null) {
artistAlbum.setCreateUser(user.getUserId()); artistAlbum.setCreateUser(user.getUserId());

Loading…
Cancel
Save