|
@@ -151,7 +151,8 @@ public class TenantAlbumController {
|
|
|
tenantAlbumSheet.setMusicSubject(o.getMusicSubject());
|
|
|
tenantAlbumSheet.setMusicSubjectName(o.getSubjectNames());
|
|
|
tenantAlbumSheet.setErrFlag(true);
|
|
|
- tenantAlbumSheet.setMusicTagName(updateCategory(musicSheetCategories, categoryId, o.getTenantCategoryId(),true,tenantAlbumSheet.getErrFlag()));
|
|
|
+ tenantAlbumSheet.setLoop(true);
|
|
|
+ tenantAlbumSheet.setMusicTagName(updateCategory(musicSheetCategories, categoryId, o.getTenantCategoryId(),tenantAlbumSheet));
|
|
|
|
|
|
return tenantAlbumSheet;
|
|
|
}).collect(Collectors.toList()));
|
|
@@ -161,33 +162,28 @@ public class TenantAlbumController {
|
|
|
}
|
|
|
|
|
|
private String updateCategory(List<MusicSheetCategoriesWrapper.MusicSheetCategories> musicSheetCategories,
|
|
|
- Long categoryId, String tenantCategoryId,Boolean loop,Boolean success) {
|
|
|
+ Long categoryId, String tenantCategoryId,TenantAlbumWrapper.TenantAlbumSheet tenantAlbumSheet) {
|
|
|
|
|
|
if (StringUtils.isBlank(tenantCategoryId)) {
|
|
|
return "";
|
|
|
}
|
|
|
for (MusicSheetCategoriesWrapper.MusicSheetCategories o : musicSheetCategories) {
|
|
|
if (o.getId().equals(Long.parseLong(tenantCategoryId))) {
|
|
|
- success = true;
|
|
|
- loop=false;
|
|
|
return o.getName();
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(o.getMusicSheetCategoriesList())) {
|
|
|
- String s = updateCategory( o.getMusicSheetCategoriesList(), categoryId, tenantCategoryId,loop,success);
|
|
|
- if (Boolean.FALSE.equals(loop)) {
|
|
|
+ String s = updateCategory( o.getMusicSheetCategoriesList(), categoryId, tenantCategoryId,tenantAlbumSheet);
|
|
|
+ if (!tenantAlbumSheet.getLoop()) {
|
|
|
return s;
|
|
|
}
|
|
|
- if (Boolean.TRUE.equals(success)) {
|
|
|
- success = o.getId().equals(categoryId);
|
|
|
- }
|
|
|
- if (o.getId().equals(categoryId)) {
|
|
|
- loop = false;
|
|
|
+ if (o.getId().equals(categoryId) && StringUtils.isNotBlank(s)) {
|
|
|
+ tenantAlbumSheet.setErrFlag(false);
|
|
|
+ tenantAlbumSheet.setLoop(false);
|
|
|
return s;
|
|
|
}
|
|
|
- if (StringUtils.isBlank(s)) {
|
|
|
- return "";
|
|
|
+ if (StringUtils.isNotBlank(s)) {
|
|
|
+ return o.getName() + "/" + s;
|
|
|
}
|
|
|
- return o.getName() + "/" + s;
|
|
|
}
|
|
|
}
|
|
|
return "";
|