| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.zhongzheng.modules.course.mapper.CourseSectionMapper">
- <resultMap type="com.zhongzheng.modules.course.domain.CourseSection" id="CourseSectionResult">
- <result property="sectionId" column="section_id"/>
- <result property="name" column="name"/>
- <result property="sort" column="sort"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="prefixName" column="prefix_name"/>
- <result property="status" column="status"/>
- <result property="sectionType" column="section_type"/>
- <result property="publishStatus" column="publish_status"/>
- <result property="liveUrl" column="live_url"/>
- <result property="liveStartTime" column="live_start_time"/>
- <result property="liveEndTime" column="live_end_time"/>
- <result property="liveDuration" column="live_duration"/>
- <result property="recordingUrl" column="recording_url"/>
- <result property="recordingDuration" column="recording_duration"/>
- <result property="coverUrl" column="cover_url"/>
- <result property="code" column="code"/>
- </resultMap>
- <resultMap type="com.zhongzheng.modules.course.vo.CourseSectionVo" id="CourseSectionResultVo">
- <result property="sectionId" column="section_id"/>
- <result property="name" column="name"/>
- <result property="sort" column="sort"/>
- <result property="prefixName" column="prefix_name"/>
- <result property="status" column="status"/>
- <result property="sectionType" column="section_type"/>
- <result property="publishStatus" column="publish_status"/>
- <result property="liveUrl" column="live_url"/>
- <result property="liveStartTime" column="live_start_time"/>
- <result property="liveEndTime" column="live_end_time"/>
- <result property="liveDuration" column="live_duration"/>
- <result property="recordingUrl" column="recording_url"/>
- <result property="recordingDuration" column="recording_duration"/>
- <result property="coverUrl" column="cover_url"/>
- <result property="code" column="code"/>
- <collection property="businessList" javaType="java.util.List" resultMap="CourseStreamingBusinessResult"/>
- </resultMap>
- <resultMap type="com.zhongzheng.modules.course.domain.CourseStreamingBusiness" id="CourseStreamingBusinessResult">
- <result property="id" column="id"/>
- <result property="streamingId" column="streaming_id"/>
- <result property="educationTypeId" column="education_type_id"/>
- <result property="businessId" column="business_id"/>
- <result property="projectId" column="project_id"/>
- <result property="educationName" column="education_name"/>
- <result property="projectName" column="project_name"/>
- <result property="businessName" column="business_name"/>
- </resultMap>
- <select id="selectSectionList" parameterType="com.zhongzheng.modules.course.bo.CourseSectionQueryBo" resultMap="CourseSectionResultVo">
- SELECT
- c.*,
- csb.education_type_id,
- csb.id,
- csb.business_id,
- csb.subject_id,
- csb.project_id,
- cet.education_name,
- cpt.project_name,
- cb.business_name,
- cs.subject_name,
- ccs.chapter_id,
- cc.NAME AS chapter_name
- FROM
- course_section c
- LEFT JOIN course_section_business csb ON c.section_id = csb.section_id
- LEFT JOIN course_education_type cet ON csb.education_type_id = cet.id
- LEFT JOIN course_project_type cpt ON csb.project_id = cpt.id
- LEFT JOIN course_business cb ON csb.business_id = cb.id
- LEFT JOIN course_subject cs ON csb.subject_id = cs.id
- LEFT JOIN course_chapter_section ccs ON csb.id = ccs.section_id
- LEFT JOIN course_chapter cc ON ccs.chapter_id = cc.chapter_id
- </select>
- </mapper>
|