CourseSectionMapper.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.zhongzheng.modules.course.mapper.CourseSectionMapper">
  6. <resultMap type="com.zhongzheng.modules.course.domain.CourseSection" id="CourseSectionResult">
  7. <result property="sectionId" column="section_id"/>
  8. <result property="name" column="name"/>
  9. <result property="sort" column="sort"/>
  10. <result property="createTime" column="create_time"/>
  11. <result property="updateTime" column="update_time"/>
  12. <result property="prefixName" column="prefix_name"/>
  13. <result property="status" column="status"/>
  14. <result property="sectionType" column="section_type"/>
  15. <result property="publishStatus" column="publish_status"/>
  16. <result property="liveUrl" column="live_url"/>
  17. <result property="liveStartTime" column="live_start_time"/>
  18. <result property="liveEndTime" column="live_end_time"/>
  19. <result property="liveDuration" column="live_duration"/>
  20. <result property="recordingUrl" column="recording_url"/>
  21. <result property="recordingDuration" column="recording_duration"/>
  22. <result property="coverUrl" column="cover_url"/>
  23. <result property="code" column="code"/>
  24. </resultMap>
  25. <resultMap type="com.zhongzheng.modules.course.vo.CourseSectionVo" id="CourseSectionResultVo">
  26. <result property="sectionId" column="section_id"/>
  27. <result property="name" column="name"/>
  28. <result property="sort" column="sort"/>
  29. <result property="createTime" column="create_time"/>
  30. <result property="updateTime" column="update_time"/>
  31. <result property="prefixName" column="prefix_name"/>
  32. <result property="status" column="status"/>
  33. <result property="sectionType" column="section_type"/>
  34. <result property="publishStatus" column="publish_status"/>
  35. <result property="liveUrl" column="live_url"/>
  36. <result property="liveStartTime" column="live_start_time"/>
  37. <result property="liveEndTime" column="live_end_time"/>
  38. <result property="liveDuration" column="live_duration"/>
  39. <result property="recordingUrl" column="recording_url"/>
  40. <result property="recordingDuration" column="recording_duration"/>
  41. <result property="coverUrl" column="cover_url"/>
  42. <result property="code" column="code"/>
  43. <collection property="businessList" javaType="java.util.List" resultMap="CourseStreamingBusinessResult"/>
  44. </resultMap>
  45. <resultMap type="com.zhongzheng.modules.course.domain.CourseStreamingBusiness" id="CourseStreamingBusinessResult">
  46. <result property="id" column="id"/>
  47. <result property="streamingId" column="streaming_id"/>
  48. <result property="educationTypeId" column="education_type_id"/>
  49. <result property="businessId" column="business_id"/>
  50. <result property="projectId" column="project_id"/>
  51. <result property="educationName" column="education_name"/>
  52. <result property="projectName" column="project_name"/>
  53. <result property="businessName" column="business_name"/>
  54. </resultMap>
  55. <select id="selectSectionList" parameterType="com.zhongzheng.modules.course.bo.CourseSectionQueryBo" resultMap="CourseSectionResultVo">
  56. SELECT
  57. csb.*,
  58. cet.education_name,
  59. cpt.project_name,
  60. cb.business_name,
  61. cs.subject_name ,
  62. ccs.chapter_id,
  63. cc.name as chapter_name
  64. FROM
  65. course_section_business csb
  66. LEFT JOIN course_education_type cet ON csb.education_type_id = cet.id
  67. LEFT JOIN course_project_type cpt ON csb.project_id = cpt.id
  68. LEFT JOIN course_business cb ON csb.business_id = cb.id
  69. LEFT JOIN course_subject cs ON csb.subject_id = cs.id
  70. LEFT JOIN course_chapter_section ccs on csb.id = ccs.section_id
  71. LEFT JOIN course_chapter cc on ccs.chapter_id = cc.chapter_id
  72. </select>
  73. </mapper>