|
@@ -72,13 +72,12 @@
|
|
|
ek.knowledge_name,
|
|
|
ek.knowledge_id
|
|
|
FROM
|
|
|
+ (SELECT DISTINCT
|
|
|
+ q.*
|
|
|
+ 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_project_type cpt ON qb.project_id = cpt.id
|
|
|
- LEFT JOIN course_business cb ON qb.business_id = cb.id
|
|
|
- LEFT JOIN course_subject cs ON cs.id = qb.subject_id
|
|
|
- LEFT JOIN exam_knowledge ek ON FIND_IN_SET( ek.knowledge_id, q.knowledge_ids )
|
|
|
+ LEFT JOIN question_business qb ON q.question_id = qb.major_id
|
|
|
+ AND qb.type = 1
|
|
|
WHERE
|
|
|
1 = 1
|
|
|
<if test="status != null and status.size()!=0 ">
|
|
@@ -100,10 +99,30 @@
|
|
|
<if test="prefixName != null and prefixName != ''">
|
|
|
AND q.prefix_name like concat('%', #{prefixName}, '%')
|
|
|
</if>
|
|
|
-
|
|
|
+ <if test="pageSizeSelf != null and pageSizeSelf != ''">
|
|
|
+ LIMIT #{currIndex} , #{pageSizeSelf}
|
|
|
+ </if>
|
|
|
+ )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_project_type cpt ON qb.project_id = cpt.id
|
|
|
+ LEFT JOIN course_business cb ON qb.business_id = cb.id
|
|
|
+ LEFT JOIN course_subject cs ON cs.id = qb.subject_id
|
|
|
+ LEFT JOIN exam_knowledge ek ON FIND_IN_SET( ek.knowledge_id, q.knowledge_ids )
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ <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>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectList_COUNT" resultType="Long">
|
|
|
+ <select id="selectListCount" resultType="Long">
|
|
|
SELECT
|
|
|
count(distinct q.question_id)
|
|
|
FROM
|