|
@@ -57,7 +57,7 @@ public class MusicTagServiceImpl extends ServiceImpl<MusicTagDao, MusicTag> impl
|
|
|
|
|
|
// 根据父级id, 将子集分类
|
|
// 根据父级id, 将子集分类
|
|
Map<String, List<MusicTagVo>> musicTagMap = musicTagVoList.stream()
|
|
Map<String, List<MusicTagVo>> musicTagMap = musicTagVoList.stream()
|
|
- .collect(Collectors.groupingBy( vo -> vo.getParentTagId().toString()));
|
|
|
|
|
|
+ .collect(Collectors.groupingBy( vo -> vo.getId().toString()));
|
|
musicTagVoIPage.getRecords()
|
|
musicTagVoIPage.getRecords()
|
|
.forEach(musicTagVo -> {
|
|
.forEach(musicTagVo -> {
|
|
List<MusicTagVo> childrenList = musicTagMap.get(musicTagVo.getId().toString());
|
|
List<MusicTagVo> childrenList = musicTagMap.get(musicTagVo.getId().toString());
|
|
@@ -118,7 +118,7 @@ public class MusicTagServiceImpl extends ServiceImpl<MusicTagDao, MusicTag> impl
|
|
}
|
|
}
|
|
MusicTag musicTag = new MusicTag();
|
|
MusicTag musicTag = new MusicTag();
|
|
musicTag.setId(musicTagId);
|
|
musicTag.setId(musicTagId);
|
|
- musicTag.setState(YesOrNoEnum.YES);
|
|
|
|
|
|
+ musicTag.setState(tag.getState().equals(YesOrNoEnum.YES)?YesOrNoEnum.NO:YesOrNoEnum.YES);
|
|
return this.updateById(musicTag);
|
|
return this.updateById(musicTag);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -141,6 +141,7 @@ public class MusicTagServiceImpl extends ServiceImpl<MusicTagDao, MusicTag> impl
|
|
} else {
|
|
} else {
|
|
musicTag.setParentTagId(musicTagSaveDto.getParentTagId());
|
|
musicTag.setParentTagId(musicTagSaveDto.getParentTagId());
|
|
}
|
|
}
|
|
|
|
+ musicTag.setSortNumber(musicTagSaveDto.getSortNumber());
|
|
musicTag.setName(musicTagSaveDto.getName());
|
|
musicTag.setName(musicTagSaveDto.getName());
|
|
musicTag.setCreateTime(new Date());
|
|
musicTag.setCreateTime(new Date());
|
|
musicTag.setUpdateTime(new Date());
|
|
musicTag.setUpdateTime(new Date());
|
|
@@ -184,6 +185,7 @@ public class MusicTagServiceImpl extends ServiceImpl<MusicTagDao, MusicTag> impl
|
|
MusicTag musicTag = new MusicTag();
|
|
MusicTag musicTag = new MusicTag();
|
|
musicTag.setDelFlag(false);
|
|
musicTag.setDelFlag(false);
|
|
musicTag.setId(musicTagSaveDto.getId());
|
|
musicTag.setId(musicTagSaveDto.getId());
|
|
|
|
+ musicTag.setSortNumber(musicTagSaveDto.getSortNumber());
|
|
musicTag.setType(musicTagSaveDto.getType());
|
|
musicTag.setType(musicTagSaveDto.getType());
|
|
if (musicTagSaveDto.getParentTagId() == null) {
|
|
if (musicTagSaveDto.getParentTagId() == null) {
|
|
musicTag.setParentTagId(0L);
|
|
musicTag.setParentTagId(0L);
|
|
@@ -205,6 +207,7 @@ public class MusicTagServiceImpl extends ServiceImpl<MusicTagDao, MusicTag> impl
|
|
.eq(MusicTag::getDelFlag,YesOrNoEnum.NO.getCode())
|
|
.eq(MusicTag::getDelFlag,YesOrNoEnum.NO.getCode())
|
|
.eq(MusicTag::getState,YesOrNoEnum.YES.getCode())
|
|
.eq(MusicTag::getState,YesOrNoEnum.YES.getCode())
|
|
.eq(MusicTag::getType,type)
|
|
.eq(MusicTag::getType,type)
|
|
|
|
+ .orderByDesc(MusicTag::getSortNumber)
|
|
.list();
|
|
.list();
|
|
if (list == null) {
|
|
if (list == null) {
|
|
return new ArrayList<>();
|
|
return new ArrayList<>();
|