|
@@ -123,9 +123,8 @@
|
|
|
SELECT
|
|
|
student_id_,
|
|
|
stu.username_ student_name_,
|
|
|
- tea.real_name_ teacher_name_,
|
|
|
+ MAX(tea.real_name_) teacher_name_,
|
|
|
o.name_ organ_name_,
|
|
|
- MAX( teacher_id_ ) teacher_id_,
|
|
|
SUM( expect_exercises_num_ ) expect_exercises_num_,
|
|
|
SUM( actual_exercises_num_ ) actual_exercises_num_,
|
|
|
SUM( exercises_reply_num_ ) exercises_reply_num_,
|
|
@@ -140,7 +139,7 @@
|
|
|
sees.monday_ >= #{monday}
|
|
|
AND sees.sunday_ <= #{sunday}
|
|
|
<if test="search!=null">
|
|
|
- AND (stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
|
|
|
+ AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
student_id_
|
|
@@ -187,7 +186,7 @@
|
|
|
sees.monday_ >= #{monday}
|
|
|
AND sees.sunday_ <= #{sunday}
|
|
|
<if test="search!=null">
|
|
|
- AND (stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
|
|
|
+ AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
student_id_
|