|
@@ -9,6 +9,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="periodId" column="period_id" />
|
|
<result property="periodId" column="period_id" />
|
|
<result property="periodName" column="period_name" />
|
|
<result property="periodName" column="period_name" />
|
|
<result property="periodStartingTime" column="period_starting_time" />
|
|
<result property="periodStartingTime" column="period_starting_time" />
|
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
|
+ <result property="companyName" column="company_name" />
|
|
<result property="newUserNum" column="new_user_num" />
|
|
<result property="newUserNum" column="new_user_num" />
|
|
<result property="userNum" column="user_num" />
|
|
<result property="userNum" column="user_num" />
|
|
<result property="watchNum" column="watch_num" />
|
|
<result property="watchNum" column="watch_num" />
|
|
@@ -17,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsUserWatchStatisticsVo">
|
|
<sql id="selectFsUserWatchStatisticsVo">
|
|
- select id, period_id, period_name, period_starting_time, new_user_num, user_num, watch_num, complete_watch_num, complete_watch_rate from fs_user_watch_statistics
|
|
|
|
|
|
+ select id, period_id, period_name, period_starting_time, new_user_num, user_num, watch_num, complete_watch_num, complete_watch_rate, company_id, company_name from fs_user_watch_statistics
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsUserWatchStatisticsList" parameterType="FsUserWatchStatistics" resultMap="FsUserWatchStatisticsResult">
|
|
<select id="selectFsUserWatchStatisticsList" parameterType="FsUserWatchStatistics" resultMap="FsUserWatchStatisticsResult">
|
|
@@ -26,6 +28,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="periodId != null "> and period_id = #{periodId}</if>
|
|
<if test="periodId != null "> and period_id = #{periodId}</if>
|
|
<if test="periodName != null and periodName != ''"> and period_name like concat('%', #{periodName}, '%')</if>
|
|
<if test="periodName != null and periodName != ''"> and period_name like concat('%', #{periodName}, '%')</if>
|
|
<if test="periodStartingTime != null "> and period_starting_time = #{periodStartingTime}</if>
|
|
<if test="periodStartingTime != null "> and period_starting_time = #{periodStartingTime}</if>
|
|
|
|
+ <if test="companyId != null and companyId !='' "> and company_id = #{companyId}</if>
|
|
|
|
+ <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
<if test="newUserNum != null "> and new_user_num = #{newUserNum}</if>
|
|
<if test="newUserNum != null "> and new_user_num = #{newUserNum}</if>
|
|
<if test="userNum != null "> and user_num = #{userNum}</if>
|
|
<if test="userNum != null "> and user_num = #{userNum}</if>
|
|
<if test="watchNum != null "> and watch_num = #{watchNum}</if>
|
|
<if test="watchNum != null "> and watch_num = #{watchNum}</if>
|
|
@@ -45,6 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="periodId != null">period_id,</if>
|
|
<if test="periodId != null">period_id,</if>
|
|
<if test="periodName != null">period_name,</if>
|
|
<if test="periodName != null">period_name,</if>
|
|
<if test="periodStartingTime != null">period_starting_time,</if>
|
|
<if test="periodStartingTime != null">period_starting_time,</if>
|
|
|
|
+ <if test="companyId != null and companyId !='' ">company_id,</if>
|
|
|
|
+ <if test="companyName != null">company_name,</if>
|
|
<if test="newUserNum != null">new_user_num,</if>
|
|
<if test="newUserNum != null">new_user_num,</if>
|
|
<if test="userNum != null">user_num,</if>
|
|
<if test="userNum != null">user_num,</if>
|
|
<if test="watchNum != null">watch_num,</if>
|
|
<if test="watchNum != null">watch_num,</if>
|
|
@@ -55,6 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="periodId != null">#{periodId},</if>
|
|
<if test="periodId != null">#{periodId},</if>
|
|
<if test="periodName != null">#{periodName},</if>
|
|
<if test="periodName != null">#{periodName},</if>
|
|
<if test="periodStartingTime != null">#{periodStartingTime},</if>
|
|
<if test="periodStartingTime != null">#{periodStartingTime},</if>
|
|
|
|
+ <if test="companyId != null and companyId !='' ">#{companyId},</if>
|
|
|
|
+ <if test="companyName != null">#{companyName},</if>
|
|
<if test="newUserNum != null">#{newUserNum},</if>
|
|
<if test="newUserNum != null">#{newUserNum},</if>
|
|
<if test="userNum != null">#{userNum},</if>
|
|
<if test="userNum != null">#{userNum},</if>
|
|
<if test="watchNum != null">#{watchNum},</if>
|
|
<if test="watchNum != null">#{watchNum},</if>
|
|
@@ -69,6 +77,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="periodId != null">period_id = #{periodId},</if>
|
|
<if test="periodId != null">period_id = #{periodId},</if>
|
|
<if test="periodName != null">period_name = #{periodName},</if>
|
|
<if test="periodName != null">period_name = #{periodName},</if>
|
|
<if test="periodStartingTime != null">period_starting_time = #{periodStartingTime},</if>
|
|
<if test="periodStartingTime != null">period_starting_time = #{periodStartingTime},</if>
|
|
|
|
+ <if test="companyId != null and companyId !='' ">company_id = #{companyId},</if>
|
|
|
|
+ <if test="companyName != null">company_name = #{companyName},</if>
|
|
<if test="newUserNum != null">new_user_num = #{newUserNum},</if>
|
|
<if test="newUserNum != null">new_user_num = #{newUserNum},</if>
|
|
<if test="userNum != null">user_num = #{userNum},</if>
|
|
<if test="userNum != null">user_num = #{userNum},</if>
|
|
<if test="watchNum != null">watch_num = #{watchNum},</if>
|
|
<if test="watchNum != null">watch_num = #{watchNum},</if>
|
|
@@ -103,10 +113,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
) AS completeWatchRate,
|
|
) AS completeWatchRate,
|
|
fwl.period_id
|
|
fwl.period_id
|
|
,fs_user_course_period.period_name,
|
|
,fs_user_course_period.period_name,
|
|
- fs_user_course_period.period_starting_time
|
|
|
|
|
|
+ fs_user_course_period.period_starting_time,
|
|
|
|
+ fs_user_course_period.company_id,
|
|
|
|
+ GROUP_CONCAT(DISTINCT company.company_name) company_name
|
|
FROM
|
|
FROM
|
|
fs_course_watch_log fwl
|
|
fs_course_watch_log fwl
|
|
LEFT JOIN fs_user_course_period ON fwl.period_id = fs_user_course_period.period_id
|
|
LEFT JOIN fs_user_course_period ON fwl.period_id = fs_user_course_period.period_id
|
|
|
|
+ LEFT JOIN company ON FIND_IN_SET( company.company_id, fs_user_course_period.company_id ) > 0
|
|
WHERE
|
|
WHERE
|
|
fwl.send_type = 1
|
|
fwl.send_type = 1
|
|
and fs_user_course_period.period_name is not null
|
|
and fs_user_course_period.period_name is not null
|
|
@@ -120,6 +133,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="periodId != null">period_id,</if>
|
|
<if test="periodId != null">period_id,</if>
|
|
<if test="periodName != null">period_name,</if>
|
|
<if test="periodName != null">period_name,</if>
|
|
<if test="periodStartingTime != null">period_starting_time,</if>
|
|
<if test="periodStartingTime != null">period_starting_time,</if>
|
|
|
|
+ <if test="companyId != null and companyId !='' ">company_id,</if>
|
|
|
|
+ <if test="companyName != null">company_name,</if>
|
|
<if test="newUserNum != null">new_user_num,</if>
|
|
<if test="newUserNum != null">new_user_num,</if>
|
|
<if test="userNum != null">user_num,</if>
|
|
<if test="userNum != null">user_num,</if>
|
|
<if test="watchNum != null">watch_num,</if>
|
|
<if test="watchNum != null">watch_num,</if>
|
|
@@ -131,6 +146,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="periodId != null">#{periodId},</if>
|
|
<if test="periodId != null">#{periodId},</if>
|
|
<if test="periodName != null">#{periodName},</if>
|
|
<if test="periodName != null">#{periodName},</if>
|
|
<if test="periodStartingTime != null">#{periodStartingTime},</if>
|
|
<if test="periodStartingTime != null">#{periodStartingTime},</if>
|
|
|
|
+ <if test="companyId != null and companyId !='' ">#{companyId},</if>
|
|
|
|
+ <if test="companyName != null">#{companyName},</if>
|
|
<if test="newUserNum != null">#{newUserNum},</if>
|
|
<if test="newUserNum != null">#{newUserNum},</if>
|
|
<if test="userNum != null">#{userNum},</if>
|
|
<if test="userNum != null">#{userNum},</if>
|
|
<if test="watchNum != null">#{watchNum},</if>
|
|
<if test="watchNum != null">#{watchNum},</if>
|
|
@@ -140,6 +157,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</trim>
|
|
</trim>
|
|
on duplicate key update
|
|
on duplicate key update
|
|
<trim suffixOverrides=",">
|
|
<trim suffixOverrides=",">
|
|
|
|
+ <if test="companyId != null and companyId !='' ">company_id = #{companyId},</if>
|
|
|
|
+ <if test="companyName != null">company_name = #{companyName},</if>
|
|
<if test="newUserNum != null">new_user_num = #{newUserNum},</if>
|
|
<if test="newUserNum != null">new_user_num = #{newUserNum},</if>
|
|
<if test="userNum != null">user_num = #{userNum},</if>
|
|
<if test="userNum != null">user_num = #{userNum},</if>
|
|
<if test="watchNum != null">watch_num = #{watchNum},</if>
|
|
<if test="watchNum != null">watch_num = #{watchNum},</if>
|