Explorar el Código

feat:调整会员看课统计修改、h5会员看课中间表的统计调整时间

caoliqin hace 3 días
padre
commit
968d01679a

+ 2 - 2
fs-qw-task/src/main/java/com/fs/app/task/UserCourseWatchCountTask.java

@@ -27,9 +27,9 @@ public class UserCourseWatchCountTask {
 
 
     /**
-     * 每天两点进行会员看课统计
+     * 每20分钟执行一次
      */
-    @Scheduled(cron = "0 0 2 * * ?")  // 2点0分0秒执行
+    @Scheduled(cron = "0 */20 * * * ?")  // 每20分钟执行一次
     public void userCourseCountTask() {
         try {
             log.info("==============会员看课统计任务执行===============开始");

+ 10 - 0
fs-service-system/src/main/resources/mapper/course/FsUserWatchCourseStatisticsMapper.xml

@@ -214,6 +214,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         on duplicate key update
         <trim suffixOverrides=",">
+            <if test="newUserNum != null">new_user_num = #{newUserNum},</if>
+            <if test="userNum != null">user_num = #{userNum},</if>
+            <if test="watchNum != null">watch_num = #{watchNum},</if>
+            <if test="completeWatchNum != null">complete_watch_num = #{completeWatchNum},</if>
+            <if test="completeWatchRate != null">complete_watch_rate = #{completeWatchRate},</if>
+            <if test="answerNum != null">answer_num = #{answerNum},</if>
+            <if test="answerRightNum != null">answer_right_num = #{answerRightNum},</if>
+            <if test="answerRightRate != null">answer_right_rate = #{answerRightRate},</if>
+            <if test="redPacketNum != null">red_packet_num = #{redPacketNum},</if>
+            <if test="redPacketAmount != null">red_packet_amount = #{redPacketAmount},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
     </insert>

+ 5 - 0
fs-service-system/src/main/resources/mapper/course/FsUserWatchStatisticsMapper.xml

@@ -140,6 +140,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         on duplicate key update
         <trim suffixOverrides=",">
+            <if test="newUserNum != null">new_user_num = #{newUserNum},</if>
+            <if test="userNum != null">user_num = #{userNum},</if>
+            <if test="watchNum != null">watch_num = #{watchNum},</if>
+            <if test="completeWatchNum != null">complete_watch_num = #{completeWatchNum},</if>
+            <if test="completeWatchRate != null">complete_watch_rate = #{completeWatchRate},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
     </insert>

+ 10 - 0
fs-service-system/src/main/resources/mapper/store/FsUserCourseCountMapper.xml

@@ -215,6 +215,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         on duplicate key update
         <trim suffixOverrides=",">
+            <if test="watchCourseCount != null">watch_course_count = #{watchCourseCount},</if>
+            <if test="missCourseCount != null">miss_course_count = #{missCourseCount},</if>
+            <if test="missCourseStatus != null">miss_course_status = #{missCourseStatus},</if>
+            <if test="courseIds != null">course_ids = #{courseIds},</if>
+            <if test="partCourseCount != null">part_course_count = #{partCourseCount},</if>
+            <if test="lastWatchDate != null">last_watch_date = #{lastWatchDate},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="completeWatchDate != null">complete_watch_date = #{completeWatchDate},</if>
+            <if test="completeWatchCount != null">complete_watch_count = #{completeWatchCount},</if>
+            <if test="watchTimes != null">watch_times = #{watchTimes},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
     </insert>