123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?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.CourseStreamingMapper">
- <resultMap type="com.zhongzheng.modules.course.domain.CourseStreaming" id="CourseStreamingResult">
- <result property="id" column="id"/>
- <result property="streamingType" column="streaming_type"/>
- <result property="streamingName" column="streaming_name"/>
- <result property="code" column="code"/>
- <result property="liveChannelNumber" column="live_channel_number"/>
- <result property="livePushUrl" column="live_push_url"/>
- <result property="livePullUrl" column="live_pull_url"/>
- <result property="liveUrl" column="live_url"/>
- <result property="streamingAddressType" column="streaming_address_type"/>
- <result property="introduce" column="introduce"/>
- <result property="recordingVideoId" column="recording_video_id"/>
- <result property="playbackUrl" column="playback_url"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="status" column="status"/>
- </resultMap>
- <resultMap type="com.zhongzheng.modules.course.vo.CourseStreamingVo" id="CourseStreamingResultVo">
- <result property="id" column="id"/>
- <result property="streamingType" column="streaming_type"/>
- <result property="streamingName" column="streaming_name"/>
- <result property="code" column="code"/>
- <result property="liveChannelNumber" column="live_channel_number"/>
- <result property="livePushUrl" column="live_push_url"/>
- <result property="livePullUrl" column="live_pull_url"/>
- <result property="liveUrl" column="live_url"/>
- <result property="streamingAddressType" column="streaming_address_type"/>
- <result property="introduce" column="introduce"/>
- <result property="recordingVideoId" column="recording_video_id"/>
- <result property="playbackUrl" column="playback_url"/>
- <result property="status" column="status"/>
- <collection property="businessList" javaType="java.util.List" resultMap="CourseStreamingBusinessResult"/>
- </resultMap>
- <resultMap type="com.zhongzheng.modules.course.domain.CourseStreamingBusiness" id="CourseStreamingBusinessResult">
- <result property="id" column="join_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="selectList" parameterType="com.zhongzheng.modules.course.bo.CourseStreamingQueryBo" resultMap="CourseStreamingResultVo">
- SELECT
- cs.*,
- csb.education_type_id,
- csb.id as join_id,
- csb.business_id,
- csb.project_id,
- cet.education_name,
- cpt.project_name,
- cb.business_name
- FROM
- course_streaming cs
- LEFT JOIN course_streaming_business csb ON cs.id = csb.streaming_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
- WHERE
- 1 = 1
- <if test="businessId != null and businessId != ''">
- AND csb.business_id = #{businessId}
- </if>
- <if test="educationTypeId != null and educationTypeId != ''">
- AND csb.education_type_id = #{educationTypeId}
- </if>
- <if test="streamingAddressType != null and streamingAddressType != ''">
- AND cs.streaming_address_type = #{streamingAddressType}
- </if>
- <if test="streamingType != null and streamingType != ''">
- AND cs.streaming_type = #{streamingType}
- </if>
- <if test="streamingName != null and streamingName != ''">
- AND cs.streaming_name like concat('%', #{streamingName}, '%')
- </if>
- <if test="status != null and status.size()!=0 ">
- AND cs.status in
- <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- </select>
- </mapper>
|