|
@@ -180,9 +180,10 @@
|
|
|
|
|
|
<select id="selectListByBo" parameterType="com.zhongzheng.modules.bank.bo.QuestionQueryBo" resultMap="QuestionResultVo">
|
|
|
SELECT
|
|
|
- q.*
|
|
|
+ DISTINCT q.*
|
|
|
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 ">
|
|
@@ -193,16 +194,16 @@
|
|
|
</if>
|
|
|
|
|
|
<if test="educationTypeId != null and educationTypeId != ''">
|
|
|
- AND (select count(*) from question_business qb where qb.type = 1 and q.question_id = qb.major_id and qb.education_type_id = #{educationTypeId}) >0
|
|
|
+ AND qb.education_type_id = #{educationTypeId}
|
|
|
</if>
|
|
|
<if test="subjectId != null and subjectId != ''">
|
|
|
- AND (select count(*) from question_business qb where qb.type = 1 and q.question_id = qb.major_id and qb.subject_id = #{subjectId}) >0
|
|
|
+ AND qb.subject_id = #{subjectId}
|
|
|
</if>
|
|
|
<if test="type != null and type != ''">
|
|
|
AND q.type = #{type}
|
|
|
</if>
|
|
|
<if test="businessId != null and businessId != ''">
|
|
|
- AND (select count(*) from question_business qb where qb.type = 1 and q.question_id = qb.major_id and qb.business_id = #{businessId}) >0
|
|
|
+ AND qb.business_id = #{businessId}
|
|
|
</if>
|
|
|
<if test="publishStatus != null ">
|
|
|
AND q.publish_status = #{publishStatus}
|