|
@@ -24,6 +24,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="status" column="status"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.zhongzheng.modules.course.vo.CourseSubjectVo" id="CourseSubjectVoResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="encoder" column="encoder"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="subjectName" column="subject_name"/>
|
|
|
+ <association property="courseProjectTypes" javaType="java.util.List" resultMap="CourseProjectTypeVoTwoResult" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap type="com.zhongzheng.modules.course.vo.CourseProjectTypeVo" id="CourseProjectTypeVoTwoResult">
|
|
|
+ <result property="id" column="pid"/>
|
|
|
+ <result property="projectName" column="pproject_name"/>
|
|
|
+ <result property="encoder" column="pencoder"/>
|
|
|
+ <result property="remark" column="premark"/>
|
|
|
+ <result property="educationId" column="peducation_id"/>
|
|
|
+ <result property="educationName" column="peducation_name"/>
|
|
|
+ <result property="status" column="pstatus"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<select id="selectProject" parameterType="com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo" resultMap="CourseProjectTypeVoResult">
|
|
|
SELECT
|
|
|
p.*,
|
|
@@ -43,4 +62,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND j.subject_id = #{id}
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryList" parameterType="com.zhongzheng.modules.course.bo.CourseSubjectQueryBo" resultMap="CourseSubjectVoResult">
|
|
|
+ SELECT
|
|
|
+ s.*,
|
|
|
+ p.id as pid,
|
|
|
+ p.project_name as pproject_name,
|
|
|
+ p.encoder as pencoder,
|
|
|
+ p.remark as premark,
|
|
|
+ p.education_id as peducation_id,
|
|
|
+ p.status as pstatus,
|
|
|
+ e.education_name as peducation_name
|
|
|
+ FROM
|
|
|
+ course_subject s
|
|
|
+ LEFT JOIN course_subject_project c ON s.id = c.subject_id
|
|
|
+ LEFT JOIN course_project_type p ON c.project_id = p.id
|
|
|
+ LEFT JOIN course_education_type e ON p.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="educationId != null and educationId!=0 ">
|
|
|
+ AND e.id = #{educationId}
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null and projectId!=0 ">
|
|
|
+ AND p.id = #{projectId}
|
|
|
+ </if>
|
|
|
+ <if test="subjectName != null and subjectName!=0 ">
|
|
|
+ AND s.subject_name = #{subjectName}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|