|
|
@@ -26,10 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="lastHeartbeatTime" column="last_heartbeat_time" />
|
|
|
<result property="project" column="project" />
|
|
|
<result property="periodId" column="period_id" />
|
|
|
+ <result property="watchType" column="watch_type" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsCourseWatchLogVo">
|
|
|
- select log_id, user_id,finish_time,send_finish_msg,sop_id,video_id,reward_type, log_type, create_time, update_time, qw_external_contact_id, duration, qw_user_id, company_user_id, company_id, course_id,camp_period_time,project,period_id from fs_course_watch_log
|
|
|
+ select log_id, user_id,finish_time,send_finish_msg,sop_id,video_id,reward_type, log_type, create_time, update_time, qw_external_contact_id, duration, qw_user_id, company_user_id, company_id, course_id,camp_period_time,project,period_id,watch_type from fs_course_watch_log
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsCourseWatchLogList" parameterType="FsCourseWatchLog" resultMap="FsCourseWatchLogResult">
|
|
|
@@ -47,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="sendType != null "> and send_type = #{sendType}</if>
|
|
|
<if test="campPeriodTime != null "> and camp_period_time = #{campPeriodTime}</if>
|
|
|
<if test="project != null "> and project = #{project}</if>
|
|
|
+ <if test="watchType != null "> and watch_type = #{watchType}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -94,6 +96,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test ='maps.courseId !=null'>
|
|
|
and l.course_id = #{maps.courseId}
|
|
|
</if>
|
|
|
+ <if test ='maps.watchType !=null'>
|
|
|
+ and l.watch_type = #{maps.watchType}
|
|
|
+ </if>
|
|
|
<if test ='maps.videoId !=null'>
|
|
|
and l.video_id = #{maps.videoId}
|
|
|
</if>
|
|
|
@@ -229,6 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{sopId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="maps.watchType != null "> and l.watch_type = #{maps.watchType}</if>
|
|
|
</where>
|
|
|
order by l.log_id desc
|
|
|
</select>
|
|
|
@@ -254,7 +260,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="campPeriodTime != null">camp_period_time,</if>
|
|
|
<if test="periodId != null">period_id,</if>
|
|
|
<if test="project != null">project,</if>
|
|
|
- <if test="typeFlag != null">type_flag,</if>
|
|
|
+ <if test="watchType != null">watch_type,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
@@ -276,7 +282,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="campPeriodTime != null">#{campPeriodTime},</if>
|
|
|
<if test="periodId != null">#{periodId},</if>
|
|
|
<if test="project != null">#{project},</if>
|
|
|
- <if test="typeFlag != null">#{typeFlag},</if>
|
|
|
+ <if test="watchType != null">#{watchType},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -301,7 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="sendFinishMsg != null">send_finish_msg,</if>
|
|
|
<if test="campPeriodTime != null">camp_period_time,</if>
|
|
|
<if test="project != null">project,</if>
|
|
|
- <if test="typeFlag != null">type_flag,</if>
|
|
|
+ <if test="watchType != null">watch_type,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
@@ -322,7 +328,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="sendFinishMsg != null">#{sendFinishMsg},</if>
|
|
|
<if test="campPeriodTime != null">#{campPeriodTime},</if>
|
|
|
<if test="project != null">#{project},</if>
|
|
|
- <if test="typeFlag != null">#{typeFlag},</if>
|
|
|
+ <if test="watchType != null">#{watchType},</if>
|
|
|
</trim>
|
|
|
on duplicate key update
|
|
|
<trim suffixOverrides=",">
|
|
|
@@ -352,7 +358,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
project,
|
|
|
period_id,
|
|
|
im_msg_send_detail_id,
|
|
|
- type_flag
|
|
|
+ watch_type
|
|
|
)
|
|
|
VALUES
|
|
|
<foreach collection="watchLogs" item="log" separator=",">
|
|
|
@@ -375,7 +381,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{log.project},
|
|
|
#{log.periodId},
|
|
|
#{log.imMsgSendDetailId},
|
|
|
- #{log.typeFlag}
|
|
|
+ #{log.watchType}
|
|
|
)
|
|
|
</foreach>
|
|
|
ON DUPLICATE KEY UPDATE
|
|
|
@@ -407,7 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="lastHeartbeatTime != null">last_heartbeat_time = #{lastHeartbeatTime},</if>
|
|
|
<if test="periodId != null">period_id = #{periodId},</if>
|
|
|
<if test="project != null">project = #{project},</if>
|
|
|
- <if test="typeFlag != null">type_flag = #{typeFlag},</if>
|
|
|
+ <if test="watchType != null">watch_type = #{watchType},</if>
|
|
|
</trim>
|
|
|
where log_id = #{logId}
|
|
|
</update>
|
|
|
@@ -1461,6 +1467,10 @@ FROM
|
|
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
|
|
AND create_time >= #{startDate} AND create_time < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
|
|
|
</if>
|
|
|
+ <!-- 看课方式筛选 -->
|
|
|
+ <if test="watchType != null and watchType != ''">
|
|
|
+ AND watch_type = #{watchType}
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<!-- 公司维度筛选 -->
|
|
|
<when test="dimension == 'company'">
|
|
|
@@ -1517,6 +1527,10 @@ FROM
|
|
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
|
|
AND w.create_time >= #{startDate} AND w.create_time < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
|
|
|
</if>
|
|
|
+ <!-- 看课方式筛选 -->
|
|
|
+ <if test="watchType != null and watchType != ''">
|
|
|
+ AND w.watch_type = #{watchType}
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<!-- 公司维度筛选 -->
|
|
|
<when test="dimension == 'company'">
|
|
|
@@ -1575,6 +1589,10 @@ FROM
|
|
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
|
|
AND w.create_time >= #{startDate} AND w.create_time < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
|
|
|
</if>
|
|
|
+ <!-- 看课方式筛选 -->
|
|
|
+ <if test="watchType != null and watchType != ''">
|
|
|
+ AND w.watch_type = #{watchType}
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<!-- 公司维度筛选 -->
|
|
|
<when test="dimension == 'company'">
|