yonge 5 dni temu
rodzic
commit
9496949df9

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

@@ -118,7 +118,10 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
     		// 判断是否还在生效中
             List<UserTenantAlbumRecord> albumRecordList = userTenantAlbumRecordService.getUseAlbumByUserId(query.getUserId(), query.getClientType());
             List<Long> tenantAlbumIdList = albumRecordList.stream().map(UserTenantAlbumRecord :: getTenantAlbumId).collect(Collectors.toList());
-            query.setTenantAlbumIdList(tenantAlbumIdList);
+            
+            if(tenantAlbumIdList == null || !tenantAlbumIdList.contains(query.getAlbumId())) {
+            	return page.setRecords(musicSheets);
+            }
     	}
         if (query.getSubjectType() != SubjectTypeEnum.COURSEWARE) {
 
@@ -264,10 +267,10 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
     		// 判断是否还在生效中
             List<UserTenantAlbumRecord> albumRecordList = userTenantAlbumRecordService.getUseAlbumByUserId(query.getUserId(), query.getClientType());
             List<Long> tenantAlbumIdList = albumRecordList.stream().map(UserTenantAlbumRecord :: getTenantAlbumId).collect(Collectors.toList());
-            query.setTenantAlbumIdList(tenantAlbumIdList);
-    	}
-    	if(query.getTenantAlbumIdList() == null || query.getTenantAlbumIdList().size() == 0){
-    		return page.setRecords(new ArrayList<TenantAlbumMusicWrapper.MusicSheetSimpleDto>());
+
+            if(tenantAlbumIdList == null || !tenantAlbumIdList.contains(query.getAlbumId())) {
+            	return page.setRecords(new ArrayList<TenantAlbumMusicWrapper.MusicSheetSimpleDto>());
+            }
     	}
         List<TenantAlbumMusicWrapper.MusicSheetSimpleDto> musicSheets = tenantAlbumMusicMapper.selectPageSimple(page, query);
         if (CollectionUtils.isEmpty(musicSheets)) {

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

@@ -155,9 +155,6 @@ public class TenantAlbumMusicWrapper {
         @NotNull(message = "专辑id不能为空")
         private Long albumId;
         
-        @ApiModelProperty(value = "详情专辑id 集合")
-        private List<Long> tenantAlbumIdList;
-
         @ApiModelProperty("当前页")
         private Integer page;
 

+ 0 - 12
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantAlbumMusicMapper.xml

@@ -55,12 +55,6 @@
                     #{item}
                 </foreach>
             </if>
-            <if test="param.tenantAlbumIdList != null and param.tenantAlbumIdList.size() != 0">
-                and t.tenant_album_id_ in
-                <foreach collection="param.tenantAlbumIdList" item="item" index="index" open="(" close=")" separator=",">
-                    #{item}
-                </foreach>
-            </if>
 
             <if test="param.keyword != null and param.keyword != ''">
                 and m.music_sheet_name_ LIKE CONCAT('%',#{param.keyword},'%')
@@ -98,12 +92,6 @@
                     #{item}
                 </foreach>
             </if>
-            <if test="param.tenantAlbumIdList != null and param.tenantAlbumIdList.size() != 0">
-                and t.tenant_album_id_ in
-                <foreach collection="param.tenantAlbumIdList" item="item" index="index" open="(" close=")" separator=",">
-                    #{item}
-                </foreach>
-            </if>
 
             <if test="param.keyword != null and param.keyword != ''">
                 and m.music_sheet_name_ LIKE CONCAT('%',#{param.keyword},'%')