소스 검색

调整客户慧眼列表

yfh 4 일 전
부모
커밋
45daff25b7

+ 10 - 0
fs-admin/src/main/java/com/fs/course/controller/qw/QwFsCourseWatchLogController.java

@@ -10,6 +10,7 @@ import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.course.domain.FsCourseWatchLog;
 import com.fs.course.param.FsCourseWatchLogListParam;
 import com.fs.course.param.FsCourseWatchLogStatisticsListParam;
+import com.fs.course.param.PeriodStatisticCountParam;
 import com.fs.course.service.IFsCourseWatchLogService;
 import com.fs.course.vo.FsCourseWatchLogListVO;
 import com.fs.course.vo.FsCourseWatchLogStatisticsListVO;
@@ -139,4 +140,13 @@ public class QwFsCourseWatchLogController extends BaseController
     {
         return toAjax(fsCourseWatchLogService.deleteFsCourseWatchLogByLogIds(logIds));
     }
+
+//    @PreAuthorize("@ss.hasPermi('course:courseWatchLog:list')")
+    @GetMapping("/listBytrainingCampId")
+    public TableDataInfo listBytrainingCampId(PeriodStatisticCountParam param)
+    {
+        startPage();
+        List<FsCourseWatchLogListVO> list = fsCourseWatchLogService.selectListBytrainingCampId(param);
+        return getDataTable(list);
+    }
 }

+ 10 - 4
fs-company/src/main/java/com/fs/company/controller/course/qw/FsQwCourseWatchLogController.java

@@ -8,10 +8,7 @@ import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.ServletUtils;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.course.domain.FsCourseWatchLog;
-import com.fs.course.param.FsCourseOverParam;
-import com.fs.course.param.FsCourseUserStatisticsListParam;
-import com.fs.course.param.FsCourseWatchLogListParam;
-import com.fs.course.param.FsCourseWatchLogStatisticsListParam;
+import com.fs.course.param.*;
 import com.fs.course.service.IFsCourseWatchLogService;
 import com.fs.course.vo.FsCourseOverVO;
 import com.fs.course.vo.FsCourseUserStatisticsListVO;
@@ -259,4 +256,13 @@ public class FsQwCourseWatchLogController extends BaseController
     {
         return toAjax(fsCourseWatchLogService.deleteFsCourseWatchLogByLogIds(logIds));
     }
+
+    //    @PreAuthorize("@ss.hasPermi('course:courseWatchLog:list')")
+    @GetMapping("/listBytrainingCampId")
+    public TableDataInfo listBytrainingCampId(PeriodStatisticCountParam param)
+    {
+        startPage();
+        List<FsCourseWatchLogListVO> list = fsCourseWatchLogService.selectListBytrainingCampId(param);
+        return getDataTable(list);
+    }
 }

+ 2 - 0
fs-service/src/main/java/com/fs/course/mapper/FsCourseWatchLogMapper.java

@@ -419,4 +419,6 @@ public interface FsCourseWatchLogMapper extends BaseMapper<FsCourseWatchLog> {
             "    qec.corp_id"+
             "</script>")
     List<QwExternalContact> selectQwWatchLogFomExtContact(@Param("logIds") List<Long> logIds);
+
+    List<FsCourseWatchLogListVO> selectListBytrainingCampId(PeriodStatisticCountParam param);
 }

+ 7 - 0
fs-service/src/main/java/com/fs/course/service/IFsCourseWatchLogService.java

@@ -121,4 +121,11 @@ public interface IFsCourseWatchLogService extends IService<FsCourseWatchLog> {
     void scheduleUpdateDurationToDatabase();
 
     void checkFsUserWatchStatus();
+
+    /**
+     * 查询看课记录数据信息
+     * @param param
+     * @return
+     */
+    List<FsCourseWatchLogListVO> selectListBytrainingCampId(PeriodStatisticCountParam param);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsCourseWatchLogServiceImpl.java

@@ -447,6 +447,11 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
 
     }
 
+    @Override
+    public List<FsCourseWatchLogListVO> selectListBytrainingCampId(PeriodStatisticCountParam param) {
+        return baseMapper.selectListBytrainingCampId(param);
+    }
+
 
     public void batchUpdateFsUserCourseWatchLog(List<FsCourseWatchLog> logs, int batchSize) {
         if (logs == null || logs.isEmpty()) {

+ 7 - 0
fs-service/src/main/java/com/fs/course/vo/FsCourseWatchLogVO.java

@@ -4,6 +4,9 @@ import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
 import lombok.Data;
 
+import java.time.LocalDateTime;
+import java.util.Date;
+
 @Data
 public class FsCourseWatchLogVO extends BaseEntity  {
 
@@ -54,4 +57,8 @@ public class FsCourseWatchLogVO extends BaseEntity  {
     private String title;
 
     private String courseName;
+
+    private String videoName;
+    private Date finishTime;
+    private LocalDateTime lastHeartbeatTime;
 }

+ 38 - 0
fs-service/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml

@@ -625,4 +625,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             (#{item.videoId}, #{item.userId}, #{item.companyUserId})
         </foreach>
     </update>
+
+
+    <select id="selectListBytrainingCampId" resultType="com.fs.course.vo.FsCourseWatchLogVO">
+        select
+        uc.course_name,v.title as video_name,
+        watch.log_id,
+        watch.user_id,
+        watch.finish_time,
+        watch.send_finish_msg,
+        watch.sop_id,
+        watch.video_id,
+        watch.reward_type,
+        watch.log_type,
+        watch.create_time,
+        watch.update_time,
+        watch.qw_external_contact_id,
+        watch.duration,
+        watch.qw_user_id,
+        watch.company_user_id,
+        watch.company_id,
+        watch.course_id,
+        watch.camp_period_time
+        from
+        fs_user_course_training_camp camp
+        left join fs_user_course_period period on
+        camp.training_camp_id = period.training_camp_id
+        left join fs_course_watch_log watch on
+        period.period_id = watch.period_id
+        left join fs_user_course uc on uc.course_id = watch.course_id
+        left join fs_user_course_video v on v.video_id = watch.video_id
+        <where>
+            `period`.del_flag = '0' and watch.log_type &lt;&gt; 3
+            <if test="trainingCampId != null">and camp.training_camp_id = #{trainingCampId}</if>
+            <if test="userId != null">and watch.user_id = #{userId}</if>
+            <if test="periodId != null">and `period`.period_id = #{periodId}</if>
+        </where>
+    </select>
+
 </mapper>