qirong
2023-08-17 81dfe248054eaa3c2751ba32576f48598adcd04f
src/main/resources/mapper/ExamPaperMapper.xml
@@ -271,10 +271,8 @@
    FROM t_exam_paper e
    LEFT JOIN t_exam_paper_department s on s.exam_paper_id = e.id
    <where>
      and e.deleted=0 and s.deleted = 0
      and e.deleted=0
      and e.task_exam_id is null
      and s.department_id =
        #{level}
      and e.paper_type=#{paperType}
    </where>
    group by e.id
@@ -325,6 +323,11 @@
          </if>
          <if test="examPaperType == 3 ">
          </if>
        <foreach item="examPaperType" collection="examPaperType">
          <if test="examPaperType == 4 ">
            and #{dateTime} between e.limit_start_time and e.limit_end_time
          </if>
        </foreach>
          <if test="examPaperType == 4 ">
              and #{dateTime} between e.limit_start_time and e.limit_end_time
          </if>
@@ -335,9 +338,21 @@
      SELECT e.id,e.name,e.limit_start_time,e.limit_end_time
      FROM t_exam_paper e
      LEFT JOIN t_exam_paper_user u on u.exam_paper_id = e.id
      where
      <where>
      e.deleted=0 and u.deleted = 0 and e.type = 0
      and u.user_id = #{userId} ORDER BY e.id desc ) t
      and u.user_id = #{userId}
        and e.paper_type in
        <foreach item="examPaperType" collection="examPaperType" open="(" separator=","
                 close=")">
          #{examPaperType}
        </foreach>
        <foreach item="examPaperType" collection="examPaperType">
          <if test="examPaperType == 4 ">
            and #{dateTime} between e.limit_start_time and e.limit_end_time
          </if>
        </foreach>
      </where>
      ORDER BY e.id desc ) t
  </select>