|
@@ -3,11 +3,12 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.live.mapper.LiveMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="Live" id="LiveResult">
|
|
|
<result property="liveId" column="live_id" />
|
|
|
<result property="companyId" column="company_id" />
|
|
|
<result property="companyUserId" column="company_user_id" />
|
|
|
+ <result property="talentId" column="talent_id" />
|
|
|
<result property="liveName" column="live_name" />
|
|
|
<result property="liveDesc" column="live_desc" />
|
|
|
<result property="showType" column="show_type" />
|
|
@@ -30,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLiveVo">
|
|
|
- select live_id, company_id, company_user_id, live_name, live_desc, show_type, status, anchor_id, live_type, start_time, finish_time, live_img_url, live_config, is_show, is_del, qw_qr_code, rtmp_url, create_time, create_by, update_by, update_time, remark from live
|
|
|
+ select live_id, company_id, company_user_id,talent_id, live_name, live_desc, show_type, status, anchor_id, live_type, start_time, finish_time, live_img_url, live_config, is_show, is_del, qw_qr_code, rtmp_url, create_time, create_by, update_by, update_time, remark from live
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectLiveList" parameterType="Live" resultMap="LiveResult">
|
|
@@ -38,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<where>
|
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
<if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="talentId != null "> and talent_id = #{talentId}</if>
|
|
|
<if test="liveName != null and liveName != ''"> and live_name like concat('%', #{liveName}, '%')</if>
|
|
|
<if test="liveDesc != null and liveDesc != ''"> and live_desc = #{liveDesc}</if>
|
|
|
<if test="showType != null "> and show_type = #{showType}</if>
|
|
@@ -54,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="rtmpUrl != null and rtmpUrl != ''"> and rtmp_url = #{rtmpUrl}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectLiveByLiveId" parameterType="Long" resultMap="LiveResult">
|
|
|
<include refid="selectLiveVo"/>
|
|
|
where live_id = #{liveId}
|
|
@@ -83,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyId != null">company_id,</if>
|
|
|
<if test="companyUserId != null">company_user_id,</if>
|
|
|
+ <if test="talentId != null">talent_id,</if>
|
|
|
<if test="liveName != null">live_name,</if>
|
|
|
<if test="liveDesc != null">live_desc,</if>
|
|
|
<if test="showType != null">show_type,</if>
|
|
@@ -106,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyId != null">#{companyId},</if>
|
|
|
<if test="companyUserId != null">#{companyUserId},</if>
|
|
|
+ <if test="talentId != null">#{talentId},</if>
|
|
|
<if test="liveName != null">#{liveName},</if>
|
|
|
<if test="liveDesc != null">#{liveDesc},</if>
|
|
|
<if test="showType != null">#{showType},</if>
|
|
@@ -131,6 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<update id="updateLive" parameterType="Live">
|
|
|
update live
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="talentId != null">talent_id = #{talentId},</if>
|
|
|
<if test="liveName != null">live_name = #{liveName},</if>
|
|
|
<if test="liveDesc != null">live_desc = #{liveDesc},</if>
|
|
|
<if test="showType != null">show_type = #{showType},</if>
|
|
@@ -159,9 +164,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteLiveByLiveIds" parameterType="String">
|
|
|
- delete from live where live_id in
|
|
|
+ delete from live where live_id in
|
|
|
<foreach item="liveId" collection="array" open="(" separator="," close=")">
|
|
|
#{liveId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|