|
@@ -38,28 +38,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="queryList" parameterType="com.zhongzheng.modules.exam.bo.ExamKnowledgeQueryBo" resultMap="ExamKnowledgeVoResult">
|
|
|
SELECT
|
|
|
- k.*,
|
|
|
- q.*
|
|
|
+ k.*
|
|
|
FROM
|
|
|
- exam_knowledge k
|
|
|
- LEFT JOIN (
|
|
|
- SELECT
|
|
|
- b.knowledge_id as k_id,
|
|
|
- b.business_id,
|
|
|
- b.subject_id,
|
|
|
- s.business_name,
|
|
|
- j.subject_name,
|
|
|
- e.education_name,
|
|
|
- e.id AS education_id,
|
|
|
- p.project_name,
|
|
|
- p.id as project_id
|
|
|
- FROM
|
|
|
- exam_knowledge_business b
|
|
|
- LEFT JOIN course_business s ON s.id = b.business_id
|
|
|
- LEFT JOIN course_subject j ON j.id = b.subject_id
|
|
|
- LEFT JOIN course_project_type p ON s.project_id = p.id
|
|
|
- LEFT JOIN course_education_type e ON p.education_id = e.id
|
|
|
- ) q ON q.k_id = k.knowledge_id
|
|
|
+ exam_knowledge k where 1=1
|
|
|
<if test="status != null and status.size()!=0 ">
|
|
|
AND k.status in
|
|
|
<foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
@@ -83,4 +64,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND k.knowledge_name like concat('%', #{knowledgeName}, '%')
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryCourseBusinessList" resultType="long" resultMap="CourseBusinessVoResult">
|
|
|
+ SELECT
|
|
|
+ b.knowledge_id as k_id,
|
|
|
+ b.business_id,
|
|
|
+ b.subject_id,
|
|
|
+ s.business_name,
|
|
|
+ j.subject_name,
|
|
|
+ e.education_name,
|
|
|
+ e.id AS education_id,
|
|
|
+ p.project_name,
|
|
|
+ p.id as project_id
|
|
|
+ FROM
|
|
|
+ exam_knowledge_business b
|
|
|
+ LEFT JOIN course_business s ON s.id = b.business_id
|
|
|
+ LEFT JOIN course_subject j ON j.id = b.subject_id
|
|
|
+ LEFT JOIN course_project_type p ON s.project_id = p.id
|
|
|
+ LEFT JOIN course_education_type e ON p.education_id = e.id
|
|
|
+ WHERE b.knowledge_id = #{knowledgeId}
|
|
|
+ </select>
|
|
|
</mapper>
|