|
@@ -15,6 +15,7 @@ import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -64,12 +65,16 @@ public class SysMusicScoreAccompanimentServiceImpl extends BaseServiceImpl<Integ
|
|
|
if(queryInfo.getCategoriesId() != null){
|
|
|
List<Integer> categoriesIdList = new ArrayList<>();
|
|
|
MusicScoreQueryInfo musicScoreQueryInfo = new MusicScoreQueryInfo();
|
|
|
- musicScoreQueryInfo.setParentId(queryInfo.getCategoriesId());
|
|
|
+ Integer categoriesId = null;
|
|
|
+ if(StringUtils.isNotEmpty(queryInfo.getCategoriesId())){
|
|
|
+ categoriesId = Integer.parseInt(queryInfo.getCategoriesId());
|
|
|
+ }
|
|
|
+ musicScoreQueryInfo.setParentId(categoriesId);
|
|
|
List<SysMusicScoreCategories> scoreCategories = sysMusicScoreCategoriesService.queryTree(musicScoreQueryInfo);
|
|
|
if(scoreCategories.size() > 0){
|
|
|
categoriesIdList = scoreCategories.stream().map(e->e.getId()).collect(Collectors.toList());
|
|
|
}else {
|
|
|
- categoriesIdList.add(queryInfo.getCategoriesId());
|
|
|
+ categoriesIdList.add(categoriesId);
|
|
|
}
|
|
|
queryInfo.setCategoriesIdList(categoriesIdList);
|
|
|
}
|
|
@@ -106,13 +111,17 @@ public class SysMusicScoreAccompanimentServiceImpl extends BaseServiceImpl<Integ
|
|
|
if(queryInfo.getCategoriesId() != null){
|
|
|
List<Integer> categoriesIdList = new ArrayList<>();
|
|
|
MusicScoreQueryInfo musicScoreQueryInfo = new MusicScoreQueryInfo();
|
|
|
- musicScoreQueryInfo.setParentId(queryInfo.getCategoriesId());
|
|
|
+ Integer categoriesId = null;
|
|
|
+ if(StringUtils.isNotEmpty(queryInfo.getCategoriesId())){
|
|
|
+ categoriesId = Integer.parseInt(queryInfo.getCategoriesId());
|
|
|
+ }
|
|
|
+ musicScoreQueryInfo.setParentId(categoriesId);
|
|
|
musicScoreQueryInfo.setOrganId(queryInfo.getOrganId());
|
|
|
List<SysMusicScoreCategories> scoreCategories = sysMusicScoreCategoriesService.queryTree(musicScoreQueryInfo);
|
|
|
if(scoreCategories.size() > 0){
|
|
|
categoriesIdList = scoreCategories.stream().map(e->e.getId()).collect(Collectors.toList());
|
|
|
}else {
|
|
|
- categoriesIdList.add(queryInfo.getCategoriesId());
|
|
|
+ categoriesIdList.add(categoriesId);
|
|
|
}
|
|
|
queryInfo.setCategoriesIdList(categoriesIdList);
|
|
|
}
|