|
@@ -17,6 +17,7 @@ import com.yonge.cooleshow.biz.dal.vo.UserOrderDetailVo;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.UserPaymentOrderWrapper;
|
|
|
import com.yonge.cooleshow.common.enums.EActivationCode;
|
|
|
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
|
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
|
import com.yonge.toolset.base.util.StringUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -403,11 +404,26 @@ public class TenantAlbumServiceImpl extends ServiceImpl<TenantAlbumMapper, Tenan
|
|
|
}
|
|
|
List<TenantAlbumMusic> list = tenantAlbumMusicService.lambdaQuery()
|
|
|
.in(TenantAlbumMusic::getTenantAlbumId, bizIds)
|
|
|
+ .eq(TenantAlbumMusic::getDelFlag,0)
|
|
|
.list();
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return new HashMap<>();
|
|
|
}
|
|
|
- return list.stream().collect(Collectors.groupingBy(TenantAlbumMusic::getTenantAlbumId,Collectors.counting()));
|
|
|
+ List<Long> musicIds = list.stream().map(o -> o.getMusicSheetId()).collect(Collectors.toList());
|
|
|
+ List<MusicSheet> musicList = musicSheetService.lambdaQuery()
|
|
|
+ .eq(MusicSheet::getDelFlag, false)
|
|
|
+ .eq(MusicSheet::getState, YesOrNoEnum.YES)
|
|
|
+ .eq(MusicSheet::getAuditVersion, YesOrNoEnum.NO)
|
|
|
+ .in(MusicSheet::getId, musicIds)
|
|
|
+ .list();
|
|
|
+ if (CollectionUtils.isEmpty(musicList)) {
|
|
|
+ return new HashMap<>();
|
|
|
+ }
|
|
|
+ // 曲目ID集合
|
|
|
+ List<Long> musicSheetIds = musicList.stream().map(o -> o.getId()).collect(Collectors.toList());
|
|
|
+
|
|
|
+ return list.stream().filter(o -> musicSheetIds.contains(o.getMusicSheetId()))
|
|
|
+ .collect(Collectors.groupingBy(TenantAlbumMusic::getTenantAlbumId, Collectors.counting()));
|
|
|
}
|
|
|
|
|
|
@Override
|