wangliang 3 年之前
父节点
当前提交
850083487b

+ 2 - 2
themis-business/src/main/resources/mapper/TEExamStudentMapper.xml

@@ -222,7 +222,7 @@
         left join t_oe_exam_record toer on
         toer.exam_student_id = t.id
         where t.exam_id = #{examId} and t.current_record_id is not null
-        <if test="activityIds != null">
+        <if test="activityIds != null and activityIds != '' and activityIds.size > 0">
             and t.exam_activity_id in
             <foreach collection="activityIds" item="acid" index="index"
                      open="(" close=")" separator=",">
@@ -238,7 +238,7 @@
         select t.exam_activity_id activityId,t.room_code roomCode,count(1) cc
         from t_e_exam_student t
         where t.exam_id = #{examId} and t.current_record_id is null
-        <if test="activityIds != null">
+        <if test="activityIds != null and activityIds != '' and activityIds.size > 0">
             and t.exam_activity_id in
             <foreach collection="activityIds" item="acid" index="index"
                      open="(" close=")" separator=",">

+ 2 - 2
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -1700,13 +1700,13 @@
             <if test="examId != null and examId != ''">
                 and toer.exam_id = #{examId}
             </if>
-            <if test="courseCodeList != null and courseCodeList != ''">
+            <if test="courseCodeList != null and courseCodeList != '' and courseCodeList.size > 0">
                 and tees.course_code in
                 <foreach collection="courseCodeList" item="courseCode" index="index" open="(" close=")" separator=",">
                     #{courseCode}
                 </foreach>
             </if>
-            <if test="identityList != null and identityList != ''">
+            <if test="identityList != null and identityList != '' and identityList.size > 0">
                 and tees.identity in
                 <foreach collection="identityList" item="identity" index="index" open="(" close=")" separator=",">
                     #{identity}