|
@@ -7,6 +7,7 @@ import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
import com.fs.common.enums.BusinessType;
|
|
|
|
|
+import com.fs.common.exception.ServiceException;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.service.impl.CompanyDeptServiceImpl;
|
|
import com.fs.company.service.impl.CompanyDeptServiceImpl;
|
|
@@ -443,4 +444,29 @@ public class FsCourseWatchLogController extends BaseController
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
return R.ok().put("data", new PageInfo<>(fsCourseWatchLogService.getCourseStatisticsUserDetailList(param)));
|
|
return R.ok().put("data", new PageInfo<>(fsCourseWatchLogService.getCourseStatisticsUserDetailList(param)));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 课程小结-用户详情导出(按创建时间倒序,最多50000条)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:courseWatchLog:query')")
|
|
|
|
|
+ @Log(title = "课程小结用户详情导出", businessType = BusinessType.EXPORT)
|
|
|
|
|
+ @GetMapping("/courseStatisticsUserDetailExport")
|
|
|
|
|
+ public AjaxResult courseStatisticsUserDetailExport(
|
|
|
|
|
+ @RequestParam("videoId") Long videoId,
|
|
|
|
|
+ @RequestParam("periodId") Long periodId) {
|
|
|
|
|
+ if (videoId == null || periodId == null) {
|
|
|
|
|
+ return AjaxResult.error("视频ID和营期ID不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ if(loginUser == null || loginUser.getCompany() == null || loginUser.getCompany().getCompanyId() == null){
|
|
|
|
|
+ throw new ServiceException("销售信息不存在!");
|
|
|
|
|
+ }
|
|
|
|
|
+ com.fs.course.param.CourseStatisticsUserDetailParam param = new com.fs.course.param.CourseStatisticsUserDetailParam();
|
|
|
|
|
+ param.setVideoId(videoId);
|
|
|
|
|
+ param.setPeriodId(periodId);
|
|
|
|
|
+ param.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
|
|
+ List<com.fs.course.vo.CourseStatisticsUserDetailVO> list = fsCourseWatchLogService.getCourseStatisticsUserDetailExportList(param);
|
|
|
|
|
+ ExcelUtil<com.fs.course.vo.CourseStatisticsUserDetailVO> util = new ExcelUtil<>(com.fs.course.vo.CourseStatisticsUserDetailVO.class);
|
|
|
|
|
+ return util.exportExcel(list, "用户看课数据");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|