|
@@ -41,18 +41,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
COUNT(CASE WHEN day = 1 and status in (1,2) THEN 1 END) AS d1Online,
|
|
COUNT(CASE WHEN day = 1 and status in (1,2) THEN 1 END) AS d1Online,
|
|
COUNT(CASE WHEN day = 1 and status=2 THEN 1 END) AS d1Over,
|
|
COUNT(CASE WHEN day = 1 and status=2 THEN 1 END) AS d1Over,
|
|
COUNT(1) AS line,project,course_id,video_id
|
|
COUNT(1) AS line,project,course_id,video_id
|
|
- from qw_watch_log where
|
|
|
|
- company_user_id=#{companyUserId}
|
|
|
|
- <if test="project != null">
|
|
|
|
- and project=#{project}
|
|
|
|
- </if>
|
|
|
|
- <if test="courseId != null">
|
|
|
|
- and course_id=#{courseId}
|
|
|
|
- </if>
|
|
|
|
- <if test="videoId != null">
|
|
|
|
- and video_id=#{videoId}
|
|
|
|
- </if>
|
|
|
|
- and DATE(line_time) between #{sTime} and #{dTime}
|
|
|
|
|
|
+ from qw_watch_log
|
|
|
|
+ <where>
|
|
|
|
+ <if test="companyUserId">
|
|
|
|
+ and company_user_id = #{companyUserId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyId">
|
|
|
|
+ and company_id = #{companyId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="project != null">
|
|
|
|
+ and project=#{project}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="courseId != null">
|
|
|
|
+ and course_id=#{courseId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="videoId != null">
|
|
|
|
+ and video_id=#{videoId}
|
|
|
|
+ </if>
|
|
|
|
+ and DATE(line_time) between #{sTime} and #{dTime}
|
|
|
|
+ </where>
|
|
group by project,course_id,video_id
|
|
group by project,course_id,video_id
|
|
</select>
|
|
</select>
|
|
<select id="selectQwWatchLogAllStatisticsListVONew"
|
|
<select id="selectQwWatchLogAllStatisticsListVONew"
|
|
@@ -123,12 +130,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
COUNT(1) AS line,project,course_id,video_id
|
|
COUNT(1) AS line,project,course_id,video_id
|
|
from qw_watch_log
|
|
from qw_watch_log
|
|
<where>
|
|
<where>
|
|
- company_user_id=#{companyUserId}
|
|
|
|
|
|
+ <if test="companyUserId">
|
|
|
|
+ and company_user_id=#{companyUserId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyId">
|
|
|
|
+ and company_id = #{companyId}
|
|
|
|
+ </if>
|
|
<if test="project != null">
|
|
<if test="project != null">
|
|
and project = #{project}
|
|
and project = #{project}
|
|
</if>
|
|
</if>
|
|
<if test="courseId != null">
|
|
<if test="courseId != null">
|
|
- and course_id = #{project}
|
|
|
|
|
|
+ and course_id = #{courseId}
|
|
</if>
|
|
</if>
|
|
<if test="videoId != null">
|
|
<if test="videoId != null">
|
|
and video_id =#{videoId}
|
|
and video_id =#{videoId}
|
|
@@ -170,7 +182,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
line_time,
|
|
line_time,
|
|
fs_user_id,
|
|
fs_user_id,
|
|
company_id,
|
|
company_id,
|
|
- company_user_id
|
|
|
|
|
|
+ company_user_id,
|
|
|
|
+ course_id,
|
|
|
|
+ video_id
|
|
)
|
|
)
|
|
VALUES
|
|
VALUES
|
|
<foreach collection="watchLogs" item="log" separator=",">
|
|
<foreach collection="watchLogs" item="log" separator=",">
|
|
@@ -184,7 +198,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
#{log.lineTime},
|
|
#{log.lineTime},
|
|
#{log.fsUserId},
|
|
#{log.fsUserId},
|
|
#{log.companyId},
|
|
#{log.companyId},
|
|
- #{log.companyUserId}
|
|
|
|
|
|
+ #{log.companyUserId},
|
|
|
|
+ #{log.courseId},
|
|
|
|
+ #{log.videoId}
|
|
)
|
|
)
|
|
</foreach>
|
|
</foreach>
|
|
</insert>
|
|
</insert>
|