|
@@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="answerRightRate" column="answer_right_rate" />
|
|
|
<result property="redPacketNum" column="red_packet_num" />
|
|
|
<result property="redPacketAmount" column="red_packet_amount" />
|
|
|
+ <result property="companyBelongOwner" column="company_belong_owner" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsUserWatchCourseStatisticsVo">
|
|
|
- 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, watch_num, complete_watch_num, online_rate, complete_watch_rate, answer_num, answer_right_num, answer_right_rate, red_packet_num, red_packet_amount from fs_user_watch_course_statistics
|
|
|
+ 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, watch_num, complete_watch_num, online_rate, complete_watch_rate, answer_num, answer_right_num, answer_right_rate, red_packet_num, red_packet_amount,company_belong_owner from fs_user_watch_course_statistics
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsUserWatchCourseStatisticsList" parameterType="FsUserWatchCourseStatistics" resultMap="FsUserWatchCourseStatisticsResult">
|
|
@@ -93,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
), 0
|
|
|
) as complete_watch_rate,
|
|
|
sum(red_packet_num) as red_packet_num,
|
|
|
- sum(red_packet_amount) as red_packet_amount
|
|
|
+ sum(red_packet_amount) as red_packet_amount,
|
|
|
+ company_belong_owner
|
|
|
from fs_user_watch_course_statistics
|
|
|
<where>
|
|
|
<if test="periodId != null "> and period_id = #{periodId}</if>
|
|
@@ -250,6 +252,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="redPacketNum != null">red_packet_num,</if>
|
|
|
<if test="redPacketAmount != null">red_packet_amount,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
+ <if test="companyBelongOwner != null">company_belong_owner,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="periodId != null">#{periodId},</if>
|
|
@@ -276,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="redPacketNum != null">#{redPacketNum},</if>
|
|
|
<if test="redPacketAmount != null">#{redPacketAmount},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="companyBelongOwner != null">#{companyBelongOwner},</if>
|
|
|
</trim>
|
|
|
on duplicate key update
|
|
|
<trim suffixOverrides=",">
|