|  | @@ -23,6 +23,7 @@
 | 
	
		
			
				|  |  |  		</association>
 | 
	
		
			
				|  |  |  		<association property="studentRegistration" javaType="com.ym.mec.biz.dal.entity.StudentRegistration">
 | 
	
		
			
				|  |  |  			<result column="subject_names_" property="subjectName" />
 | 
	
		
			
				|  |  | +			<result column="music_group_status_" property="musicGroupStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 | 
	
		
			
				|  |  |  		</association>
 | 
	
		
			
				|  |  |  	</resultMap>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -144,20 +145,22 @@
 | 
	
		
			
				|  |  |  	<!-- 分页查询 -->
 | 
	
		
			
				|  |  |  	<select id="queryPage" resultMap="MusicGroupPaymentCalenderDetail"
 | 
	
		
			
				|  |  |  		parameterType="map">
 | 
	
		
			
				|  |  | -		SELECT mgpc.*,su.username_,st.name_ subject_names_
 | 
	
		
			
				|  |  | -		FROM music_group_payment_calender_detail mgpc
 | 
	
		
			
				|  |  | -		LEFT JOIN sys_user su ON su.id_ = mgpc.user_id_
 | 
	
		
			
				|  |  | -		LEFT JOIN student_registration sr ON sr.user_id_ = mgpc.user_id_
 | 
	
		
			
				|  |  | +		SELECT mgpcd.*,su.username_,st.name_ subject_names_,sr.music_group_status_
 | 
	
		
			
				|  |  | +		FROM music_group_payment_calender_detail mgpcd
 | 
	
		
			
				|  |  | +		LEFT JOIN sys_user su ON su.id_ = mgpcd.user_id_
 | 
	
		
			
				|  |  | +		LEFT JOIN student_registration sr ON sr.user_id_ = mgpcd.user_id_
 | 
	
		
			
				|  |  |  		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 | 
	
		
			
				|  |  | +		LEFT JOIN music_group_payment_calender mgpc ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
 | 
	
		
			
				|  |  |  		<where>
 | 
	
		
			
				|  |  | +			mgpc.music_group_id_ = sr.music_group_id_
 | 
	
		
			
				|  |  |  			<if test="userId != null">
 | 
	
		
			
				|  |  | -				AND mgpc.user_id_ = #{userId}
 | 
	
		
			
				|  |  | +				AND mgpcd.user_id_ = #{userId}
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="id != null">
 | 
	
		
			
				|  |  | -				AND mgpc.music_group_payment_calender_id_ = #{id}
 | 
	
		
			
				|  |  | +				AND mgpcd.music_group_payment_calender_id_ = #{id}
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="paymentStatus != null">
 | 
	
		
			
				|  |  | -				AND mgpc.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  | +				AND mgpcd.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="subjectId != null">
 | 
	
		
			
				|  |  |  				AND #{subjectId} = sr.actual_subject_id_
 | 
	
	
		
			
				|  | @@ -169,21 +172,21 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	<!-- 查询当前表的总记录数 -->
 | 
	
		
			
				|  |  |  	<select id="queryCount" resultType="int">
 | 
	
		
			
				|  |  | -		SELECT COUNT(mgpc.id_) FROM music_group_payment_calender_detail mgpc
 | 
	
		
			
				|  |  | -		LEFT JOIN student_registration sr ON sr.user_id_ = mgpc.user_id_
 | 
	
		
			
				|  |  | +		SELECT COUNT(DISTINCT mgpcd.id_) FROM music_group_payment_calender_detail mgpcd
 | 
	
		
			
				|  |  | +		LEFT JOIN student_registration sr ON sr.user_id_ = mgpcd.user_id_
 | 
	
		
			
				|  |  |  		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 | 
	
		
			
				|  |  |  		<where>
 | 
	
		
			
				|  |  |  			<if test="userId != null">
 | 
	
		
			
				|  |  | -				AND mgpc.user_id_ = #{userId}
 | 
	
		
			
				|  |  | +				AND mgpcd.user_id_ = #{userId}
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="id != null">
 | 
	
		
			
				|  |  | -				AND mgpc.music_group_payment_calender_id_ = #{id}
 | 
	
		
			
				|  |  | +				AND mgpcd.music_group_payment_calender_id_ = #{id}
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="subjectId != null">
 | 
	
		
			
				|  |  |  				AND #{subjectId} = sr.actual_subject_id_
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="paymentStatus != null">
 | 
	
		
			
				|  |  | -				AND mgpc.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  | +				AND mgpcd.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  		</where>
 | 
	
		
			
				|  |  |  	</select>
 |