|  | @@ -504,15 +504,12 @@
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectMusicNum" resultType="com.yonge.cooleshow.biz.dal.vo.HomeMusicSheetVo">
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          select
 | 
	
		
			
				|  |  |              sum(if(ms.source_type_ = 'PLATFORM',1,0)) as musicSheetPlatformCount,
 | 
	
		
			
				|  |  |              sum(if(ms.source_type_ = 'TEACHER',1,0)) as musicSheetTeacherCount,
 | 
	
		
			
				|  |  |              count(1) as musicSheetCount
 | 
	
		
			
				|  |  |          from music_sheet ms
 | 
	
		
			
				|  |  |          where ms.state_ = 1 and ms.del_flag_ = 0 and ms.audit_status_ = 'PASS' and ms.charge_type_ = 'CHARGE'
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectPayMusicSheet" resultType="com.yonge.cooleshow.biz.dal.vo.HomeMusicSheetVo$MusicSheetSmall">
 | 
	
	
		
			
				|  | @@ -532,7 +529,6 @@
 | 
	
		
			
				|  |  |          GROUP BY ms.id_
 | 
	
		
			
				|  |  |          ORDER BY count(DISTINCT pr.student_id_)  DESC,ms.id_ desc
 | 
	
		
			
				|  |  |          limit 5
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectTeacherCount" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherAuditMusicSheetVo">
 | 
	
	
		
			
				|  | @@ -544,7 +540,6 @@
 | 
	
		
			
				|  |  |          from
 | 
	
		
			
				|  |  |              music_sheet t
 | 
	
		
			
				|  |  |          where t.user_id_ = #{userId}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="queryStudentTotal" resultType="com.yonge.cooleshow.biz.dal.vo.StudentTotalVo">
 | 
	
	
		
			
				|  | @@ -575,6 +570,11 @@
 | 
	
		
			
				|  |  |              </where>
 | 
	
		
			
				|  |  |              group by user_id_
 | 
	
		
			
				|  |  |          ) b on t.user_id_ = b.user_id_
 | 
	
		
			
				|  |  | +        <where>
 | 
	
		
			
				|  |  | +            <if test="null != userId">
 | 
	
		
			
				|  |  | +                and t.user_id_ = #{userId}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +        </where>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="queryTeacherTotal" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherTotalVo">
 | 
	
	
		
			
				|  | @@ -592,5 +592,10 @@
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  |              group by user_id_
 | 
	
		
			
				|  |  |          ) a on t.user_id_ = a.user_id_
 | 
	
		
			
				|  |  | +        <where>
 | 
	
		
			
				|  |  | +            <if test="null != userId">
 | 
	
		
			
				|  |  | +                and t.user_id_ = #{userId}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +        </where>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  </mapper>
 |