|
|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.live.mapper.LiveTrafficLogMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="LiveTrafficLog" id="LiveTrafficLogResult">
|
|
|
<result property="logId" column="log_id" />
|
|
|
<result property="userId" column="user_id" />
|
|
|
@@ -14,17 +14,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="qwUserId" column="qw_user_id" />
|
|
|
<result property="companyUserId" column="company_user_id" />
|
|
|
<result property="companyId" column="company_id" />
|
|
|
- <result property="courseId" column="course_id" />
|
|
|
+ <result property="videoId" column="video_id" />
|
|
|
<result property="uuId" column="uu_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLiveTrafficLogVo">
|
|
|
- select log_id, user_id, live_id, create_time, qw_external_contact_id, internet_traffic, qw_user_id, company_user_id, company_id, course_id, uu_id from live_traffic_log
|
|
|
+ select log_id, user_id, live_id, create_time, qw_external_contact_id, internet_traffic, qw_user_id, company_user_id, company_id, video_id, uu_id from live_traffic_log
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectLiveTrafficLogList" parameterType="LiveTrafficLog" resultMap="LiveTrafficLogResult">
|
|
|
<include refid="selectLiveTrafficLogVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
<if test="liveId != null "> and live_id = #{liveId}</if>
|
|
|
<if test="qwExternalContactId != null "> and qw_external_contact_id = #{qwExternalContactId}</if>
|
|
|
@@ -32,16 +32,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="qwUserId != null and qwUserId != ''"> and qw_user_id = #{qwUserId}</if>
|
|
|
<if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
- <if test="courseId != null "> and course_id = #{courseId}</if>
|
|
|
+ <if test="videoId != null "> and video_id = #{videoId}</if>
|
|
|
<if test="uuId != null and uuId != ''"> and uu_id = #{uuId}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectLiveTrafficLogById" parameterType="Long" resultMap="LiveTrafficLogResult">
|
|
|
<include refid="selectLiveTrafficLogVo"/>
|
|
|
where log_id = #{logId}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertLiveTrafficLog" parameterType="LiveTrafficLog" useGeneratedKeys="true" keyProperty="logId">
|
|
|
insert into live_traffic_log
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="qwUserId != null">qw_user_id,</if>
|
|
|
<if test="companyUserId != null">company_user_id,</if>
|
|
|
<if test="companyId != null">company_id,</if>
|
|
|
- <if test="courseId != null">course_id,</if>
|
|
|
+ <if test="videoId != null">video_id,</if>
|
|
|
<if test="uuId != null">uu_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="qwUserId != null">#{qwUserId},</if>
|
|
|
<if test="companyUserId != null">#{companyUserId},</if>
|
|
|
<if test="companyId != null">#{companyId},</if>
|
|
|
- <if test="courseId != null">#{courseId},</if>
|
|
|
+ <if test="videoId != null">#{videoId},</if>
|
|
|
<if test="uuId != null">#{uuId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="qwUserId != null">qw_user_id = #{qwUserId},</if>
|
|
|
<if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
<if test="companyId != null">company_id = #{companyId},</if>
|
|
|
- <if test="courseId != null">course_id = #{courseId},</if>
|
|
|
+ <if test="videoId != null">video_id = #{videoId},</if>
|
|
|
<if test="uuId != null">uu_id = #{uuId},</if>
|
|
|
</trim>
|
|
|
where log_id = #{logId}
|
|
|
@@ -92,10 +92,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteLiveTrafficLogByIds" parameterType="String">
|
|
|
- delete from live_traffic_log where log_id in
|
|
|
+ delete from live_traffic_log where log_id in
|
|
|
<foreach item="logId" collection="array" open="(" separator="," close=")">
|
|
|
#{logId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-
|
|
|
-</mapper>
|
|
|
+ <insert id="insertOrUpdateLiveTrafficLog" parameterType="com.fs.live.domain.LiveTrafficLog">
|
|
|
+ INSERT INTO live_traffic_log (
|
|
|
+ user_id,
|
|
|
+ live_id,
|
|
|
+ create_time,
|
|
|
+ qw_external_contact_id,
|
|
|
+ internet_traffic,
|
|
|
+ qw_user_id,
|
|
|
+ company_user_id,
|
|
|
+ company_id,
|
|
|
+ video_id,
|
|
|
+ uu_id
|
|
|
+ ) VALUES (
|
|
|
+ #{userId},
|
|
|
+ #{liveId},
|
|
|
+ #{createTime},
|
|
|
+ #{qwExternalContactId},
|
|
|
+ #{internetTraffic},
|
|
|
+ #{qwUserId},
|
|
|
+ #{companyUserId},
|
|
|
+ #{companyId},
|
|
|
+ #{videoId},
|
|
|
+ #{uuId}
|
|
|
+ ) ON DUPLICATE KEY UPDATE
|
|
|
+ user_id = VALUES(user_id),
|
|
|
+ live_id = VALUES(live_id),
|
|
|
+ create_time = VALUES(createTime),
|
|
|
+ qw_external_contact_id = VALUES(qw_external_contact_id),
|
|
|
+ internet_traffic = VALUES(internet_traffic),
|
|
|
+ qw_user_id = VALUES(qw_user_id),
|
|
|
+ company_user_id = VALUES(company_user_id),
|
|
|
+ company_id = VALUES(company_id),
|
|
|
+ video_id = VALUES(video_id)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+</mapper>
|