|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper
|
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.zhongzheng.modules.bank.mapper.QuestionMapper">
|
|
|
|
|
|
<resultMap type="com.zhongzheng.modules.bank.domain.Question" id="QuestionResult">
|
|
@@ -96,4 +96,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectList_COUNT" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ count(distinct q.question_id)
|
|
|
+ FROM
|
|
|
+ question q
|
|
|
+ LEFT JOIN question_business qb ON q.question_id = qb.major_id and qb.type = 1
|
|
|
+ LEFT JOIN course_education_type cet ON qb.education_type_id = cet.id
|
|
|
+ LEFT JOIN course_business cb ON qb.business_id = cb.id
|
|
|
+ LEFT JOIN course_subject cs ON cs.id = qb.subject_id
|
|
|
+ WHERE
|
|
|
+ 1 = 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="businessId != null and businessId != ''">
|
|
|
+ AND qb.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="prefixName != null and prefixName != ''">
|
|
|
+ AND q.prefix_name like concat('%', #{prefixName}, '%')
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
</mapper>
|