|
@@ -46,7 +46,8 @@
|
|
|
<result property="code" column="code"/>
|
|
|
<result property="subjectId" column="subject_id"/>
|
|
|
<result property="projectId" column="project_id"/>
|
|
|
-
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
<result property="educationName" column="education_name"/>
|
|
|
<result property="projectName" column="project_name"/>
|
|
|
<result property="businessName" column="business_name"/>
|
|
@@ -55,6 +56,46 @@
|
|
|
<result property="subjectName" column="subject_name"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <select id="selectList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="CourseResultVo">
|
|
|
+ SELECT
|
|
|
+ c.*,
|
|
|
+ cet.education_name,
|
|
|
+ cpt.project_name,
|
|
|
+ cb.business_name,
|
|
|
+ s.school_name,
|
|
|
+ m.category_name,
|
|
|
+ cs.subject_name
|
|
|
+ FROM
|
|
|
+ course c
|
|
|
+ LEFT JOIN course_education_type cet ON c.education_type_id = cet.id
|
|
|
+ LEFT JOIN course_project_type cpt ON c.project_id = cpt.id
|
|
|
+ LEFT JOIN course_business cb ON c.business_id = cb.id
|
|
|
+ LEFT JOIN school s ON s.id = c.school_id
|
|
|
+ LEFT JOIN major m ON c.major_id = m.id
|
|
|
+ LEFT JOIN course_subject cs ON cs.id = c.subject_id
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
+ AND c.status in
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
+ AND c.education_type_id = #{educationTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null and subjectId != ''">
|
|
|
+ AND c.subject_id = #{subjectId}
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
+ AND c.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="prefixName != null and prefixName != ''">
|
|
|
+ AND c.prefix_name like concat('%', #{prefixName}, '%')
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectDetailById" parameterType="Long" resultMap="CourseResultVo">
|
|
|
SELECT
|
|
|
c.*,
|