Quellcode durchsuchen

1、课外训练-教学

Joburgess vor 5 Jahren
Ursprung
Commit
860296ec25

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -329,7 +329,7 @@
 		SELECT cs.actual_teacher_id_
 		FROM course_schedule_student_payment cssp
 		LEFT JOIN course_schedule cs ON cs.id_=cssp.course_schedule_id_
-		WHERE cssp.user_id_=#{studentId}
+		WHERE cssp.user_id_=#{studentId} AND cs.actual_teacher_id_ IS NOT NULL
 		ORDER BY CONCAT(cs.class_date_, ' ', cs.start_class_time_) LIMIT 1;
 	</select>
 

+ 11 - 4
mec-biz/src/main/resources/config/mybatis/StudentExtracurricularExercisesSituationMapper.xml

@@ -141,6 +141,9 @@
 			<if test="search!=null">
 				AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
+			<if test="organIdList != null">
+				AND FIND_IN_SET(stu.organ_id_,#{organIdList})
+			</if>
 			GROUP BY
 			student_id_
 			<trim prefix="HAVING" suffixOverrides="and">
@@ -177,17 +180,21 @@
 	<select id="countExercisesSituations" resultType="int">
 		SELECT COUNT(1) FROM (
 			SELECT
-			1
+				1
 			FROM
-			student_extracurricular_exercises_situation_ sees
-			LEFT JOIN sys_user stu ON stu.id_=sees.student_id_
-			LEFT JOIN sys_user tea ON tea.id_=sees.teacher_id_
+				student_extracurricular_exercises_situation_ sees
+				LEFT JOIN sys_user stu ON stu.id_=sees.student_id_
+				LEFT JOIN sys_user tea ON tea.id_=sees.teacher_id_
+				LEFT JOIN organization o ON stu.organ_id_=o.id_
 			WHERE
 			sees.monday_ &gt;= #{monday}
 			AND sees.sunday_ &lt;= #{sunday}
 			<if test="search!=null">
 				AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
+			<if test="organIdList != null">
+				AND FIND_IN_SET(stu.organ_id_, #{organIdList})
+			</if>
 			GROUP BY
 			student_id_
 			<trim prefix="HAVING" suffixOverrides="and">