|
|
@@ -28,6 +28,8 @@ import com.fs.qw.service.IQwWatchLogService;
|
|
|
import com.fs.qw.vo.QwWatchLogAllStatisticsListVO;
|
|
|
import com.fs.qw.vo.QwWatchLogStatisticsListVO;
|
|
|
import com.fs.sop.mapper.SopUserLogsMapper;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import com.google.gson.Gson;
|
|
|
import com.google.gson.reflect.TypeToken;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -407,4 +409,38 @@ public class FsCourseWatchLogController extends BaseController
|
|
|
param.setPeriodId(periodId);
|
|
|
return R.ok().put("data", fsCourseWatchLogService.getCourseStatisticsDetail(param));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 课程小结-用户详情列表(分页)
|
|
|
+ * 根据videoId、periodId查询观看记录,区分首次/第2-n次观看时长,关联订单及销售公司
|
|
|
+ *
|
|
|
+ * @param videoId 视频ID
|
|
|
+ * @param periodId 营期ID
|
|
|
+ * @param pageNum 页码
|
|
|
+ * @param pageSize 每页条数
|
|
|
+ * @return 分页用户详情
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:courseWatchLog:query')")
|
|
|
+ @GetMapping("/courseStatisticsUserDetail")
|
|
|
+ public R getCourseStatisticsUserDetail(
|
|
|
+ @RequestParam("videoId") Long videoId,
|
|
|
+ @RequestParam("periodId") Long periodId,
|
|
|
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
+ if (videoId == null || periodId == null) {
|
|
|
+ return R.error("视频ID和营期ID不能为空");
|
|
|
+ }
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ if(loginUser == null || loginUser.getCompany() == null || loginUser.getCompany().getCompanyId() == null){
|
|
|
+ return R.error("销售信息不存在!");
|
|
|
+ }
|
|
|
+ com.fs.course.param.CourseStatisticsUserDetailParam param = new com.fs.course.param.CourseStatisticsUserDetailParam();
|
|
|
+ param.setVideoId(videoId);
|
|
|
+ param.setPeriodId(periodId);
|
|
|
+ param.setPageNum(pageNum);
|
|
|
+ param.setPageSize(pageSize);
|
|
|
+ param.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
+ return R.ok().put("data", new PageInfo<>(fsCourseWatchLogService.getCourseStatisticsUserDetailList(param)));
|
|
|
+ }
|
|
|
}
|