|  | @@ -8,6 +8,7 @@ import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.*;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.wrapper.StatGroupWrapper;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.enums.ActivityShareEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.enums.PostStatusEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dao.MusicSheetDao;
 | 
	
	
		
			
				|  | @@ -31,13 +32,13 @@ import com.yonge.toolset.utils.easyexcel.ErrMsg;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.utils.easyexcel.ExcelDataReaderProperty;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.utils.easyexcel.ExcelException;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import org.apache.commons.collections.CollectionUtils;
 | 
	
		
			
				|  |  |  import org.slf4j.Logger;
 | 
	
		
			
				|  |  |  import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  |  import org.springframework.beans.BeanUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | -import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -318,6 +319,21 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public IPage<MusicSheetVo> selectStudentPage(IPage<MusicSheetVo> page, StudentMusicSheetSearch query, ClientEnum clientType) {
 | 
	
		
			
				|  |  |      	List<MusicSheetVo> records = baseMapper.selectStudentMusicPage(page, query, clientType);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if (CollectionUtils.isNotEmpty(records)) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            // 统计单曲归属专辑数
 | 
	
		
			
				|  |  | +            List<Long> musicIds = records.stream()
 | 
	
		
			
				|  |  | +                    .map(MusicSheet::getId).distinct().collect(Collectors.toList());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            Map<Long, Integer> collect = getBaseMapper().selectMusicAlbumStatInfo(musicIds).stream()
 | 
	
		
			
				|  |  | +                    .collect(Collectors.toMap(StatGroupWrapper::getId, StatGroupWrapper::getTotal, (o, n) -> n));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            for (MusicSheetVo item : records) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                item.setAlbumNums(collect.getOrDefault(item.getId(), 0));
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |      	
 | 
	
		
			
				|  |  |      	/*if(query.getMyself() != null && query.getMyself() == false){//首页
 | 
	
		
			
				|  |  |          	if(records == null || records.size() == 0){
 |