|  | @@ -388,7 +388,7 @@
 | 
	
		
			
				|  |  |      <sql id="queryMusicGroupStudentSql">
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  |              <if test="search != null and search != ''">
 | 
	
		
			
				|  |  | -                AND (su.id_ = #{search} OR su.username_ like CONCAT("%",#{search},"%") OR su.phone_ like CONCAT("%",#{search},"%"))
 | 
	
		
			
				|  |  | +                AND (su.id_ = #{search} OR su.username_ LIKE CONCAT("%",#{search},"%") OR su.phone_ LIKE CONCAT("%",#{search},"%"))
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  |              <if test="subjectId != null">
 | 
	
		
			
				|  |  |                  AND sr.actual_subject_id_ = #{subjectId}
 | 
	
	
		
			
				|  | @@ -399,8 +399,11 @@
 | 
	
		
			
				|  |  |              <if test="studentStatus != null and studentStatus != ''">
 | 
	
		
			
				|  |  |                  AND sr.music_group_status_ = #{studentStatus}
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            <if test="paymentStatus != null">
 | 
	
		
			
				|  |  | -                AND sr.payment_status_ = #{paymentStatus}
 | 
	
		
			
				|  |  | +            <if test="paymentStatus != null and paymentStatus = 1">
 | 
	
		
			
				|  |  | +                AND sr.payment_status_ = 2
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="paymentStatus != null and paymentStatus = 0">
 | 
	
		
			
				|  |  | +                AND sr.payment_status_ IN (0,1)
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  |              <if test="musicGroupId != null and musicGroupId != ''">
 | 
	
		
			
				|  |  |                  AND sr.music_group_id_ = #{musicGroupId}
 | 
	
	
		
			
				|  | @@ -433,7 +436,7 @@
 | 
	
		
			
				|  |  |      </resultMap>
 | 
	
		
			
				|  |  |      <select id="queryMusicGroupStudent" resultMap="MusicGroupStudentsDto">
 | 
	
		
			
				|  |  |          SELECT sr.user_id_,su.username_ real_name_,su.gender_,su.phone_ parents_phone_,sr.current_grade_,
 | 
	
		
			
				|  |  | -        sr.current_class_,sr.music_group_status_ student_status_,sr.payment_status_,
 | 
	
		
			
				|  |  | +        sr.current_class_,sr.music_group_status_ student_status_,CASE WHEN sr.payment_status_ = 2 THEN 1 ELSE 0 END payment_status_,
 | 
	
		
			
				|  |  |          s.name_ subject_name_,sr.music_group_id_,case when su.password_ is null then 0 else 1 end isActive_,
 | 
	
		
			
				|  |  |          IF(DATE_FORMAT(sr.create_time_,'%Y-%m-%d') > DATE_FORMAT(mg.payment_expire_date_,'%Y-%m-%d'),1,0) is_new_student_
 | 
	
		
			
				|  |  |          FROM student_registration sr
 |