CourseStreamingBusinessMapper.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  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.CourseStreamingBusinessMapper">
  6. <resultMap type="com.zhongzheng.modules.course.domain.CourseStreamingBusiness" id="CourseStreamingBusinessResult">
  7. <result property="id" column="id"/>
  8. <result property="streamingId" column="streaming_id"/>
  9. <result property="educationTypeId" column="education_type_id"/>
  10. <result property="businessId" column="business_id"/>
  11. <result property="projectId" column="project_id"/>
  12. <result property="educationName" column="education_name"/>
  13. <result property="projectName" column="project_name"/>
  14. <result property="businessName" column="business_name"/>
  15. </resultMap>
  16. <select id="getListById" parameterType="Long" resultMap="CourseStreamingBusinessResult">
  17. SELECT
  18. csb.*,
  19. cet.education_name,
  20. cpt.project_name,
  21. cb.business_name
  22. FROM
  23. course_streaming_business csb
  24. LEFT JOIN course_education_type cet ON csb.education_type_id = cet.id
  25. AND cet.`status` = 1
  26. LEFT JOIN course_project_type cpt ON csb.project_id = cpt.id
  27. AND cpt.`status` = 1
  28. LEFT JOIN course_business cb ON csb.business_id = cb.id
  29. AND cb.`status` = 1
  30. WHERE
  31. csb.streaming_id =#{id}
  32. </select>
  33. </mapper>