|  | @@ -561,7 +561,7 @@
 | 
	
		
			
				|  |  |          cs.class_date_ AS classDate,
 | 
	
		
			
				|  |  |          cs.start_time_ AS startTime,
 | 
	
		
			
				|  |  |          cs.end_time_ AS endTime,
 | 
	
		
			
				|  |  | -        g.status_ AS `status`,
 | 
	
		
			
				|  |  | +        CASE WHEN g.status_ = 'COMPLETE' THEN g.status_ WHEN cs.status_ = 'NOT_START' THEN 'NOT_START' ELSE 'ING' END as status,
 | 
	
		
			
				|  |  |          cs.type_ AS courseType,
 | 
	
		
			
				|  |  |          su.username_ AS realName,
 | 
	
		
			
				|  |  |          su.id_ AS userId,
 | 
	
	
		
			
				|  | @@ -578,7 +578,7 @@
 | 
	
		
			
				|  |  |          FROM
 | 
	
		
			
				|  |  |          (select * from (
 | 
	
		
			
				|  |  |          select cssp.user_id_,cssp.course_id_,cssp.order_no_,cs.type_,
 | 
	
		
			
				|  |  | -               cs.course_group_id_,cs.class_date_,cs.start_time_,cs.end_time_,cs.class_num_
 | 
	
		
			
				|  |  | +               cs.course_group_id_,cs.class_date_,cs.start_time_,cs.end_time_,cs.class_num_,cs.status_
 | 
	
		
			
				|  |  |          from course_schedule_student_payment cssp
 | 
	
		
			
				|  |  |          LEFT JOIN course_schedule cs on cssp.course_id_ = cs.id_
 | 
	
		
			
				|  |  |          WHERE cs.type_ = #{param.type} AND cssp.user_id_ = #{param.studentId}
 | 
	
	
		
			
				|  | @@ -596,7 +596,15 @@
 | 
	
		
			
				|  |  |                  AND g.subject_id_ = #{param.subjectId}
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  |              <if test="param.courseState != null">
 | 
	
		
			
				|  |  | -                and g.status_ = #{param.courseState}
 | 
	
		
			
				|  |  | +                <if test="param.courseState == 'COMPLETE'">
 | 
	
		
			
				|  |  | +                    AND g.status_ = 'COMPLETE'
 | 
	
		
			
				|  |  | +                </if>
 | 
	
		
			
				|  |  | +                <if test="param.courseState == 'NOT_START'">
 | 
	
		
			
				|  |  | +                    AND cs.status_ = 'NOT_START'
 | 
	
		
			
				|  |  | +                </if>
 | 
	
		
			
				|  |  | +                <if test="param.courseState == 'ING'">
 | 
	
		
			
				|  |  | +                    AND cs.status_ = 'ING'
 | 
	
		
			
				|  |  | +                </if>
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  |              <if test="param.search != null and param.search != ''">
 | 
	
		
			
				|  |  |                  and g.name_ like CONCAT('%',#{param.search},'%')
 |