|
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="courseId != null "> and course_id = #{courseId}</if>
|
|
<if test="courseId != null "> and course_id = #{courseId}</if>
|
|
<if test="courseName != null and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
|
|
<if test="courseName != null and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
|
|
<if test="videoId != null "> and video_id = #{videoId}</if>
|
|
<if test="videoId != null "> and video_id = #{videoId}</if>
|
|
- <if test="videoTitle != null and videoTitle != ''"> and video_title = #{videoTitle}</if>
|
|
|
|
|
|
+ <if test="videoTitle != null and videoTitle != ''"> and video_title like concat('%', #{videoTitle}, '%')</if>
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
<if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
<if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
@@ -62,6 +62,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="selectFsUserWatchCourseStatisticsListTotal" parameterType="FsUserWatchCourseStatistics" resultMap="FsUserWatchCourseStatisticsResult">
|
|
|
|
+ SELECT
|
|
|
|
+ id,
|
|
|
|
+ period_id,
|
|
|
|
+ period_name,
|
|
|
|
+ course_id,
|
|
|
|
+ course_name,
|
|
|
|
+ video_id,
|
|
|
|
+ video_title,
|
|
|
|
+ company_id,
|
|
|
|
+ company_name,
|
|
|
|
+ company_user_id,
|
|
|
|
+ course_start_date_time,
|
|
|
|
+ -- company_user_name,
|
|
|
|
+ period_starting_time,
|
|
|
|
+-- new_user_num,
|
|
|
|
+-- user_num,
|
|
|
|
+ sum(new_user_num) as new_user_num,
|
|
|
|
+ sum(user_num) as user_num,
|
|
|
|
+ watch_num,
|
|
|
|
+ complete_watch_num,
|
|
|
|
+ complete_watch_rate,
|
|
|
|
+ answer_num,
|
|
|
|
+ answer_right_num,
|
|
|
|
+ answer_right_rate,
|
|
|
|
+ red_packet_num,
|
|
|
|
+ red_packet_amount
|
|
|
|
+ from fs_user_watch_course_statistics
|
|
|
|
+ <where>
|
|
|
|
+ <if test="periodId != null "> and period_id = #{periodId}</if>
|
|
|
|
+ <if test="periodName != null and periodName != ''"> and period_name like concat('%', #{periodName}, '%')</if>
|
|
|
|
+ <if test="courseId != null "> and course_id = #{courseId}</if>
|
|
|
|
+ <if test="courseName != null and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
|
|
|
|
+ <if test="videoId != null "> and video_id = #{videoId}</if>
|
|
|
|
+ <if test="videoTitle != null and videoTitle != ''"> and video_title like concat('%', #{videoTitle}, '%')</if>
|
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
|
+ <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
|
|
+ <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
|
+ <if test="courseStartDateTime != null "> and course_start_date_time like concat(DATE(#{courseStartDateTime}),'%')</if>
|
|
|
|
+ <if test="companyUserName != null and companyUserName != ''"> and company_user_name like concat('%', #{companyUserName}, '%')</if>
|
|
|
|
+ <if test="periodStartingTime != null "> and period_starting_time like concat(DATE(#{periodStartingTime}), '%')</if>
|
|
|
|
+ <if test="newUserNum != null "> and new_user_num = #{newUserNum}</if>
|
|
|
|
+ <if test="userNum != null "> and user_num = #{userNum}</if>
|
|
|
|
+ <if test="watchNum != null "> and watch_num = #{watchNum}</if>
|
|
|
|
+ <if test="completeWatchNum != null "> and complete_watch_num = #{completeWatchNum}</if>
|
|
|
|
+ <if test="completeWatchRate != null "> and complete_watch_rate = #{completeWatchRate}</if>
|
|
|
|
+ <if test="answerNum != null "> and answer_num = #{answerNum}</if>
|
|
|
|
+ <if test="answerRightNum != null "> and answer_right_num = #{answerRightNum}</if>
|
|
|
|
+ <if test="answerRightRate != null "> and answer_right_rate = #{answerRightRate}</if>
|
|
|
|
+ <if test="redPacketNum != null "> and red_packet_num = #{redPacketNum}</if>
|
|
|
|
+ <if test="redPacketAmount != null "> and red_packet_amount = #{redPacketAmount}</if>
|
|
|
|
+ </where>
|
|
|
|
+ group by fs_user_watch_course_statistics.company_id, course_start_date_time
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<select id="selectFsUserWatchCourseStatisticsById" parameterType="Long" resultMap="FsUserWatchCourseStatisticsResult">
|
|
<select id="selectFsUserWatchCourseStatisticsById" parameterType="Long" resultMap="FsUserWatchCourseStatisticsResult">
|
|
<include refid="selectFsUserWatchCourseStatisticsVo"/>
|
|
<include refid="selectFsUserWatchCourseStatisticsVo"/>
|
|
where id = #{id}
|
|
where id = #{id}
|