|
@@ -175,6 +175,63 @@
|
|
|
<result property="doExamNum" column="do_exam_num"/>
|
|
|
<result property="subjectNames" column="subject_names"/>
|
|
|
</resultMap>
|
|
|
+ <select id="selectListByBoWithId" parameterType="com.zhongzheng.modules.bank.bo.QuestionQueryBo" resultMap="QuestionResultVo">
|
|
|
+ SELECT
|
|
|
+ q.*
|
|
|
+ FROM
|
|
|
+ question q
|
|
|
+ where 1=1
|
|
|
+ <if test="ids != null and ids.size()!=0 ">
|
|
|
+ AND q.question_id in
|
|
|
+ <foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ ORDER BY q.question_id DESC
|
|
|
+ </select>
|
|
|
+ <select id="selectListByBoBackId" parameterType="com.zhongzheng.modules.bank.bo.QuestionQueryBo" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ q.question_id
|
|
|
+ FROM
|
|
|
+ question q
|
|
|
+ LEFT JOIN question_business qb ON q.question_id = qb.major_id AND qb.type = 1
|
|
|
+ WHERE
|
|
|
+ 1 = 1 AND q.status !=-1
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
+ AND q.status in
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
+ AND qb.education_type_id = #{educationTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null and subjectId != ''">
|
|
|
+ AND qb.subject_id = #{subjectId}
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ AND q.type = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
+ AND qb.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="publishStatus != null ">
|
|
|
+ AND q.publish_status = #{publishStatus}
|
|
|
+ </if>
|
|
|
+ <if test="prefixName != null and prefixName != ''">
|
|
|
+ AND q.prefix_name like concat('%', #{prefixName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="key != null and key != ''">
|
|
|
+ AND (q.content like concat('%', #{key}, '%') or q.prefix_name like concat('%', #{key}, '%') or q.code like concat('%', #{key}, '%'))
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ q.question_id
|
|
|
+ <if test="pageSizeSelf != null and pageSizeSelf != ''">
|
|
|
+ LIMIT #{currIndex} , #{pageSizeSelf}
|
|
|
+ </if>
|
|
|
+ ORDER BY q.question_id DESC
|
|
|
+ </select>
|
|
|
|
|
|
<select id="selectListByBo" parameterType="com.zhongzheng.modules.bank.bo.QuestionQueryBo" resultMap="QuestionResultVo">
|
|
|
SELECT
|