|  | @@ -168,23 +168,23 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectMusicAlbumById" resultType="com.yonge.cooleshow.biz.dal.vo.MusicAlbumVo">
 | 
	
		
			
				|  |  |          select <include refid="Base_Column_List"/>
 | 
	
		
			
				|  |  | -        ,(select group_concat(mt.name_) from music_tag mt
 | 
	
		
			
				|  |  | -        where find_in_set(mt.id_,t.album_tag_) and mt.del_flag_ = 0 and mt.state_ = 1) as musicTagNames
 | 
	
		
			
				|  |  | -        ,(select group_concat(s.name_) from subject s
 | 
	
		
			
				|  |  | -        where find_in_set(s.id_,t.subject_id_) and s.del_flag_ = 0 ) as subjectNames
 | 
	
		
			
				|  |  | -        , t1.num as musicSheetCount
 | 
	
		
			
				|  |  | -        ,t2.num as albumFavoriteCount
 | 
	
		
			
				|  |  | +            ,(select group_concat(mt.name_) from music_tag mt
 | 
	
		
			
				|  |  | +            where find_in_set(mt.id_,t.album_tag_) and mt.del_flag_ = 0 and mt.state_ = 1) as musicTagNames
 | 
	
		
			
				|  |  | +            ,(select group_concat(s.name_) from subject s
 | 
	
		
			
				|  |  | +            where find_in_set(s.id_,t.subject_id_) and s.del_flag_ = 0 ) as subjectNames
 | 
	
		
			
				|  |  | +            , (
 | 
	
		
			
				|  |  | +                select count(1) as num from album_music_relate amr
 | 
	
		
			
				|  |  | +                join music_sheet ms on amr.music_sheet_id_ = ms.id_
 | 
	
		
			
				|  |  | +                left join sys_user su on su.id_ = ms.user_id_
 | 
	
		
			
				|  |  | +                where ms.del_flag_ = 0 and ms.state_ = 1 and ms.audit_status_ = 'PASS' and su.del_flag_ = 0
 | 
	
		
			
				|  |  | +                and amr.album_id_ = t.id_
 | 
	
		
			
				|  |  | +            ) as musicSheetCount
 | 
	
		
			
				|  |  | +            ,(
 | 
	
		
			
				|  |  | +                select count(1) as num from album_favorite af
 | 
	
		
			
				|  |  | +                left join sys_user su on af.user_id_ = su.id_
 | 
	
		
			
				|  |  | +                where su.del_flag_ = 0 and af.album_id_ = t.id_
 | 
	
		
			
				|  |  | +            ) as albumFavoriteCount
 | 
	
		
			
				|  |  |          from music_album t
 | 
	
		
			
				|  |  | -        left join (select count(1) as num,amr.album_id_
 | 
	
		
			
				|  |  | -            from album_music_relate amr
 | 
	
		
			
				|  |  | -            join music_sheet ms on amr.music_sheet_id_ = ms.id_
 | 
	
		
			
				|  |  | -            left join sys_user su on su.id_ = ms.user_id_
 | 
	
		
			
				|  |  | -            where ms.del_flag_ = 0 and ms.state_ = 1 and ms.audit_status_ = 'PASS' and su.del_flag_ = 0
 | 
	
		
			
				|  |  | -            group by amr.album_id_) t1 on t1.album_id_ = t.id_
 | 
	
		
			
				|  |  | -        left join (select count(1) as num,af.album_id_ from album_favorite af
 | 
	
		
			
				|  |  | -            left join sys_user su on af.user_id_ = su.id_
 | 
	
		
			
				|  |  | -            where su.del_flag_ = 0 group by af.album_id_
 | 
	
		
			
				|  |  | -        ) t2 on t2.album_id_ = t.id_
 | 
	
		
			
				|  |  |          where t.id_ = #{musicAlbumId}
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 |