|
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="liveId" column="live_id" />
|
|
<result property="liveId" column="live_id" />
|
|
|
<result property="companyId" column="company_id" />
|
|
<result property="companyId" column="company_id" />
|
|
|
<result property="companyUserId" column="company_user_id" />
|
|
<result property="companyUserId" column="company_user_id" />
|
|
|
|
|
+ <result property="trainingPeriodId" column="training_period_id" />
|
|
|
<result property="talentId" column="talent_id" />
|
|
<result property="talentId" column="talent_id" />
|
|
|
<result property="liveName" column="live_name" />
|
|
<result property="liveName" column="live_name" />
|
|
|
<result property="liveDesc" column="live_desc" />
|
|
<result property="liveDesc" column="live_desc" />
|
|
@@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectLiveVo">
|
|
<sql id="selectLiveVo">
|
|
|
- select live_id, company_id, company_user_id,talent_id, live_name, is_audit, live_desc, show_type, status, anchor_id, live_type, start_time, finish_time,
|
|
|
|
|
|
|
+ select live_id, company_id, company_user_id, training_period_id, talent_id, live_name, is_audit, live_desc, show_type, status, anchor_id, live_type, start_time, finish_time,
|
|
|
live_img_url, live_config, id_card_url, is_show, is_del, qw_qr_code, rtmp_url, flv_hls_url,
|
|
live_img_url, live_config, id_card_url, is_show, is_del, qw_qr_code, rtmp_url, flv_hls_url,
|
|
|
create_time, create_by, update_by, update_time, remark,config_json,global_visible from live
|
|
create_time, create_by, update_by, update_time, remark,config_json,global_visible from live
|
|
|
</sql>
|
|
</sql>
|
|
@@ -68,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectLiveList" parameterType="com.fs.live.domain.Live" resultMap="LiveResult">
|
|
<select id="selectLiveList" parameterType="com.fs.live.domain.Live" resultMap="LiveResult">
|
|
|
- select a.live_id, a.company_id, a.company_user_id,talent_id, a.live_name, a.is_audit, a.live_desc, a.show_type, a.status, a.anchor_id,
|
|
|
|
|
|
|
+ select a.live_id, a.company_id, a.company_user_id, a.training_period_id, a.talent_id, a.live_name, a.is_audit, a.live_desc, a.show_type, a.status, a.anchor_id,
|
|
|
a.live_type, a.start_time, a.finish_time, a.live_img_url, a.live_config, a.id_card_url, a.is_show, a.is_del, a.qw_qr_code, a.rtmp_url,
|
|
a.live_type, a.start_time, a.finish_time, a.live_img_url, a.live_config, a.id_card_url, a.is_show, a.is_del, a.qw_qr_code, a.rtmp_url,
|
|
|
a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,a.global_visible
|
|
a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,a.global_visible
|
|
|
,c.live_code_url,IFNULL(d.company_name, '总台') AS company_name,b.file_size
|
|
,c.live_code_url,IFNULL(d.company_name, '总台') AS company_name,b.file_size
|
|
@@ -80,6 +81,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and c.company_user_id = #{companyUserId}
|
|
and c.company_user_id = #{companyUserId}
|
|
|
left join company d on a.company_id = d.company_id
|
|
left join company d on a.company_id = d.company_id
|
|
|
where 1=1 and a.is_del = 0 and b.video_type in (1,2)
|
|
where 1=1 and a.is_del = 0 and b.video_type in (1,2)
|
|
|
|
|
+ <if test="excludeCampLive != null and excludeCampLive == true"> and a.training_period_id is null </if>
|
|
|
|
|
+ <if test="onlyTrainingCampLive != null and onlyTrainingCampLive == true"> and a.training_period_id is not null </if>
|
|
|
|
|
+ <if test="trainingPeriodId != null"> and a.training_period_id = #{trainingPeriodId}</if>
|
|
|
<if test="companyId != null "> and (a.company_id = #{companyId} or a.company_id is null )</if>
|
|
<if test="companyId != null "> and (a.company_id = #{companyId} or a.company_id is null )</if>
|
|
|
<if test="companyName != null and companyName != ''">
|
|
<if test="companyName != null and companyName != ''">
|
|
|
and (
|
|
and (
|
|
@@ -110,11 +114,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectTrainingLiveAuditList" parameterType="com.fs.live.domain.Live" resultType="com.fs.live.vo.TrainingLiveAuditVO">
|
|
|
|
|
+ select a.live_id as liveId, a.live_name as liveName, a.company_id as companyId,
|
|
|
|
|
+ IFNULL(d.company_name,'总台') as companyName,
|
|
|
|
|
+ a.training_period_id as trainingPeriodId,
|
|
|
|
|
+ p.period_name as periodName, c.camp_name as campName,
|
|
|
|
|
+ a.is_audit as isAudit, a.status, a.live_type as liveType,
|
|
|
|
|
+ a.start_time as startTime, a.create_time as createTime
|
|
|
|
|
+ from live a
|
|
|
|
|
+ left join live_training_period p on a.training_period_id = p.period_id and p.is_del = 0
|
|
|
|
|
+ left join live_training_camp c on p.camp_id = c.camp_id and c.is_del = 0
|
|
|
|
|
+ left join company d on a.company_id = d.company_id
|
|
|
|
|
+ where a.is_del = 0 and a.training_period_id is not null
|
|
|
|
|
+ <if test="companyId != null">and a.company_id = #{companyId}</if>
|
|
|
|
|
+ <if test="isAudit != null">and a.is_audit = #{isAudit}</if>
|
|
|
|
|
+ <if test="liveName != null and liveName != ''">and a.live_name like concat('%', #{liveName}, '%')</if>
|
|
|
|
|
+ order by a.create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<select id="selectLiveByLiveId" parameterType="Long" resultMap="LiveResult">
|
|
<select id="selectLiveByLiveId" parameterType="Long" resultMap="LiveResult">
|
|
|
<include refid="selectLiveVo"/>
|
|
<include refid="selectLiveVo"/>
|
|
|
where live_id = #{liveId} and is_del = 0
|
|
where live_id = #{liveId} and is_del = 0
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectLiveByLiveIdAndCompanyId" resultMap="LiveResult">
|
|
|
|
|
+ <include refid="selectLiveVo"/>
|
|
|
|
|
+ where live_id = #{liveId} and is_del = 0
|
|
|
|
|
+ and (company_id = #{companyId} or company_id is null)
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<select id="selectLiveByLiveIdAndCompanyIdAndCompanyUserId" resultMap="LiveResult">
|
|
<select id="selectLiveByLiveIdAndCompanyIdAndCompanyUserId" resultMap="LiveResult">
|
|
|
<include refid="selectLiveVo"/>
|
|
<include refid="selectLiveVo"/>
|
|
|
where live_id = #{liveId} and company_id = #{companyId} and company_user_id = #{companyUserId}
|
|
where live_id = #{liveId} and company_id = #{companyId} and company_user_id = #{companyUserId}
|
|
@@ -138,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyId != null">company_id,</if>
|
|
<if test="companyId != null">company_id,</if>
|
|
|
<if test="companyUserId != null">company_user_id,</if>
|
|
<if test="companyUserId != null">company_user_id,</if>
|
|
|
|
|
+ <if test="trainingPeriodId != null">training_period_id,</if>
|
|
|
<if test="talentId != null">talent_id,</if>
|
|
<if test="talentId != null">talent_id,</if>
|
|
|
<if test="liveName != null">live_name,</if>
|
|
<if test="liveName != null">live_name,</if>
|
|
|
<if test="liveDesc != null">live_desc,</if>
|
|
<if test="liveDesc != null">live_desc,</if>
|
|
@@ -167,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyId != null">#{companyId},</if>
|
|
<if test="companyId != null">#{companyId},</if>
|
|
|
<if test="companyUserId != null">#{companyUserId},</if>
|
|
<if test="companyUserId != null">#{companyUserId},</if>
|
|
|
|
|
+ <if test="trainingPeriodId != null">#{trainingPeriodId},</if>
|
|
|
<if test="talentId != null">#{talentId},</if>
|
|
<if test="talentId != null">#{talentId},</if>
|
|
|
<if test="liveName != null">#{liveName},</if>
|
|
<if test="liveName != null">#{liveName},</if>
|
|
|
<if test="liveDesc != null">#{liveDesc},</if>
|
|
<if test="liveDesc != null">#{liveDesc},</if>
|
|
@@ -199,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update live
|
|
update live
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="talentId != null">talent_id = #{talentId},</if>
|
|
<if test="talentId != null">talent_id = #{talentId},</if>
|
|
|
|
|
+ <if test="trainingPeriodId != null">training_period_id = #{trainingPeriodId},</if>
|
|
|
<if test="liveName != null">live_name = #{liveName},</if>
|
|
<if test="liveName != null">live_name = #{liveName},</if>
|
|
|
<if test="liveDesc != null">live_desc = #{liveDesc},</if>
|
|
<if test="liveDesc != null">live_desc = #{liveDesc},</if>
|
|
|
<if test="showType != null">show_type = #{showType},</if>
|
|
<if test="showType != null">show_type = #{showType},</if>
|
|
@@ -368,6 +399,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectLiveListNew" resultType="com.fs.live.domain.Live">
|
|
<select id="selectLiveListNew" resultType="com.fs.live.domain.Live">
|
|
|
<include refid="selectLiveVo"/>
|
|
<include refid="selectLiveVo"/>
|
|
|
where is_audit = 1 and is_del = 0 and is_show = 1 and status != 3
|
|
where is_audit = 1 and is_del = 0 and is_show = 1 and status != 3
|
|
|
|
|
+ and training_period_id is null
|
|
|
and (company_id = #{companyId} or company_id is null)
|
|
and (company_id = #{companyId} or company_id is null)
|
|
|
<if test="liveName != null">
|
|
<if test="liveName != null">
|
|
|
and live_name like concat('%',#{liveName},'%')
|
|
and live_name like concat('%',#{liveName},'%')
|