|
@@ -46,4 +46,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryList" parameterType="com.zhongzheng.modules.course.bo.MajorQueryBo" resultMap="MajorResult">
|
|
|
+ SELECT
|
|
|
+ m.*
|
|
|
+ FROM
|
|
|
+ major m
|
|
|
+ LEFT JOIN major_project p ON p.major_id = m.id
|
|
|
+ LEFT JOIN course_business b on b.project_id =p.project_id
|
|
|
+ LEFT JOIN course_project_type t on p.project_id=t.id
|
|
|
+ LEFT JOIN course_education_type e on t.education_id = e.id
|
|
|
+ WHERE
|
|
|
+ 1 =1
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
+ AND p.status in
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="id != null and id!=0 ">
|
|
|
+ AND m.id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="educationId != null and educationId!=0 ">
|
|
|
+ AND e.id = #{educationId}
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null and projectId!=0 ">
|
|
|
+ AND t.id = #{projectId}
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null and businessId!=0 ">
|
|
|
+ AND b.id = #{businessId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|