|
@@ -41,6 +41,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="excellSort" column="excell_sort" />
|
|
|
<result property="sequeSort" column="seque_sort" />
|
|
|
<result property="placeSort" column="place_sort" />
|
|
|
+ <result property="sequeSort" column="seque_sort" />
|
|
|
+ <result property="placeSort" column="place_sort" />
|
|
|
+ <result property="chapterId" column="chapter_id" />
|
|
|
+ <result property="diffDegree" column="diff_degree" />
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
@@ -81,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="excellIssueName != null and excellIssueName != ''"> and excell_issue_name like concat('%', #{excellIssueName}, '%')</if>
|
|
|
<if test="questionType != null "> and question_type = #{questionType}</if>
|
|
|
<if test="subject != null and subject != ''"> and subject = #{subject}</if>
|
|
|
+ <if test="chapterId != null and chapterId != ''"> and chapter_id = #{chapterId}</if>
|
|
|
+ <if test="diffDegree != null and diffDegree != ''"> and diff_degree = #{diffDegree}</if>
|
|
|
</where>
|
|
|
|
|
|
<if test="isRand!=null and isRand!=''"> order by rand() </if>
|
|
@@ -120,6 +126,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="excellIssueName != null and excellIssueName != ''"> and excell_issue_name like concat('%', #{excellIssueName}, '%')</if>
|
|
|
<if test="classIssueName != null and classIssueName != ''"> and class_issue_name like concat('%', #{classIssueName}, '%')</if>
|
|
|
<if test="questionType != null "> and question_type = #{questionType}</if>
|
|
|
+ <if test="chapterId != null and chapterId != ''"> and chapter_id = #{chapterId}</if>
|
|
|
+ <if test="diffDegree != null and diffDegree != ''"> and diff_degree = #{diffDegree}</if>
|
|
|
</where>
|
|
|
limit 0,50
|
|
|
</select>
|
|
@@ -321,6 +329,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
|
|
|
+ <select id="selectIssueType5" resultType="com.miaxis.question.vo.QuestionInfoExcelTypeVo">
|
|
|
+ SELECT
|
|
|
+ DISTINCT case WHEN seque_issue_name is null then '地方专题' else seque_issue_name end as title,
|
|
|
+ seque_issue as type_id
|
|
|
+ FROM
|
|
|
+ question_info
|
|
|
+ WHERE
|
|
|
+ subject = #{subject}
|
|
|
+ AND lice_car = 1 and
|
|
|
+ seque_issue_name is not null
|
|
|
+ ORDER BY
|
|
|
+ seque_issue + 0 ASC
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selecQuestionInfoExcel5" resultType="com.miaxis.question.vo.QuestionInfoExcelVo">
|
|
|
+ SELECT id,
|
|
|
+ id_ydt,
|
|
|
+ number,
|
|
|
+ issue,
|
|
|
+ image,
|
|
|
+ excell_issue_name,
|
|
|
+ class_issue_name,
|
|
|
+ place_issue_name,
|
|
|
+ seque_issue_name,
|
|
|
+ question_type FROM question_info WHERE seque_issue = #{typeId} and subject_1 =1 and lice_car = 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
<select id="selectQuestionInfoSortList" resultType="com.miaxis.question.vo.QuestionInfoExcelVo">
|
|
|
SELECT id,
|
|
|
id_ydt,
|
|
@@ -384,14 +421,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<select id="selectFreeQuestionInfoList" resultMap="QuestionInfoResult">
|
|
|
- select * from question_info
|
|
|
+ select q1.* from question_info q1 join question_free q2 on q1.id = q2.id
|
|
|
<where>
|
|
|
- and excell_issue_name like '%选学%'
|
|
|
- and lice_car = 1
|
|
|
- <if test="subject != null"> and subject = #{subject}</if>
|
|
|
- <if test="questionType != null"> and question_type = #{questionType}</if>
|
|
|
+ <if test="subject != null"> and q2.subject = #{subject}</if>
|
|
|
</where>
|
|
|
- ORDER BY id limit 0,${num}
|
|
|
+ order by q2.free_sort
|
|
|
</select>
|
|
|
|
|
|
|