|
|
@ -102,6 +102,7 @@ public class AlbumService {
|
|
|
|
private Specification<ArtistAlbum> buildSearchSpecification(AlbumSearchDTO param) {
|
|
|
|
private Specification<ArtistAlbum> buildSearchSpecification(AlbumSearchDTO param) {
|
|
|
|
return (Root<ArtistAlbum> root, CriteriaQuery<?> query, CriteriaBuilder builder) -> {
|
|
|
|
return (Root<ArtistAlbum> root, CriteriaQuery<?> query, CriteriaBuilder builder) -> {
|
|
|
|
List<Predicate> predicateList = new ArrayList<Predicate>();
|
|
|
|
List<Predicate> predicateList = new ArrayList<Predicate>();
|
|
|
|
|
|
|
|
predicateList.add(builder.notEqual(root.get("state"), AlbumStateEnum.FORCE.getCode()));
|
|
|
|
if (StringUtils.isNotBlank(param.getArtistId())) {
|
|
|
|
if (StringUtils.isNotBlank(param.getArtistId())) {
|
|
|
|
// 音乐人id
|
|
|
|
// 音乐人id
|
|
|
|
predicateList.add(builder.equal(root.get("artistId"), param.getArtistId()));
|
|
|
|
predicateList.add(builder.equal(root.get("artistId"), param.getArtistId()));
|
|
|
@ -169,6 +170,9 @@ public class AlbumService {
|
|
|
|
if (artistAlbum == null) {
|
|
|
|
if (artistAlbum == null) {
|
|
|
|
throw new RuntimeException("专辑不存在,请刷新后重试");
|
|
|
|
throw new RuntimeException("专辑不存在,请刷新后重试");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ObjectUtils.equals(AlbumStateEnum.FORCE.getCode(), artistAlbum.getState())) {
|
|
|
|
|
|
|
|
throw new RuntimeException("专辑因不可抗力原因无法显示");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 整个数据库所有的tag
|
|
|
|
// 整个数据库所有的tag
|
|
|
|
List<Tag> tagAllList = tagDao.findAll();
|
|
|
|
List<Tag> tagAllList = tagDao.findAll();
|
|
|
|