qirong
2023-06-14 e1a6bbd46dc46d42e5e58382c132c704a3d8be3b
src/main/resources/mapper/QuestionMapper.xml
@@ -180,24 +180,25 @@
  <select id="page" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM">
    SELECT
    <include refid="Base_Column_List"/>
    FROM t_question
    q.*
    FROM t_question q
    LEFT JOIN t_question_subject qs on q.id = qs.question_id
    <where>
        and deleted=0
        and q.deleted=0 and qs.deleted = 0
      <if test="id != null ">
        and id= #{id}
        and q.id= #{id}
      </if>
      <if test="level != null ">
        and grade_level= #{level}
        and q.grade_level= #{level}
      </if>
      <if test="subjectId != null ">
        and subject_id= #{subjectId}
        and qs.subject_id= #{subjectId}
      </if>
      <if test="questionType != null ">
        and question_type= #{questionType}
        and q.question_type= #{questionType}
      </if>
      <if test="content != null">
        and info_text_content_id in (SELECT id FROM t_text_content WHERE content like concat('%',#{content},'%') )
        and q.info_text_content_id in (SELECT id FROM t_text_content WHERE content like concat('%',#{content},'%') )
      </if>
    </where>
  </select>