Pārlūkot izejas kodu

1.学生端专辑分类适配专辑分组

yuanliang 1 gadu atpakaļ
vecāks
revīzija
04dee95e34

+ 8 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantAlbumMusicServiceImpl.java

@@ -237,9 +237,12 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
         List<Long> typeIds =list.stream().map(TenantAlbumMusic::getType).distinct().filter(StringUtils::isNotBlank)
                 .filter(NumberUtil::isNumber).map(Long::valueOf).collect(Collectors.toList());
         if (!typeIds.isEmpty()) {
-            List<String> typeNameList = tenantAlbumCategoryDetailService.listByIds(typeIds).stream()
+            List<TenantAlbumCategoryDetail> typeList = tenantAlbumCategoryDetailService.lambdaQuery()
+                    .in(TenantAlbumCategoryDetail::getId, typeIds).list();
+            List<String> typeNameList = typeList.stream()
                     .map(TenantAlbumCategoryDetail::getValue).collect(Collectors.toList());
             data.setTypes(typeNameList);
+            data.setTypeList(typeList);
         } else {
             data.setTypes(new ArrayList<>());
         }
@@ -247,9 +250,12 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
         List<Long> levelIds =list.stream().map(TenantAlbumMusic::getLevel).distinct().filter(StringUtils::isNotBlank)
                 .filter(NumberUtil::isNumber).map(Long::valueOf).collect(Collectors.toList());
         if (!typeIds.isEmpty()) {
-            List<String> levelNameList = tenantAlbumCategoryDetailService.listByIds(levelIds).stream()
+            List<TenantAlbumCategoryDetail> levelList = tenantAlbumCategoryDetailService.lambdaQuery()
+                    .in(TenantAlbumCategoryDetail::getId, levelIds).list();
+            List<String> levelNameList = levelList.stream()
                     .map(TenantAlbumCategoryDetail::getValue).collect(Collectors.toList());
             data.setLevels(levelNameList);
+            data.setLevelList(levelList);
         } else {
             data.setLevels(new ArrayList<>());
         }

+ 9 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantAlbumMusicWrapper.java

@@ -5,11 +5,13 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import com.yonge.cooleshow.biz.dal.entity.MusicTag;
 import com.yonge.cooleshow.biz.dal.entity.Subject;
+import com.yonge.cooleshow.biz.dal.entity.TenantAlbumCategoryDetail;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 import com.yonge.cooleshow.biz.dal.enums.SubjectTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 
@@ -102,9 +104,16 @@ public class TenantAlbumMusicWrapper {
         @ApiModelProperty("级别集合")
         private List<String> levels;
 
+        @ApiModelProperty("级别集合")
+        private List<TenantAlbumCategoryDetail> levelList = new ArrayList<>();
+
         @ApiModelProperty("类型集合")
         private List<String> types;
 
+        @ApiModelProperty("类型集合")
+        private List<TenantAlbumCategoryDetail> typeList = new ArrayList<>();
+
+
         @ApiModelProperty("标签集合")
         private List<MusicTag> tags;