|
@@ -9,11 +9,10 @@ import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.service.impl.CompanyDeptServiceImpl;
|
|
|
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.service.IFsUserCoursePeriodDaysService;
|
|
|
+import com.fs.course.service.IFsUserCoursePeriodService;
|
|
|
import com.fs.course.vo.FsCourseOverVO;
|
|
|
import com.fs.course.vo.FsCourseUserStatisticsListVO;
|
|
|
import com.fs.course.vo.FsCourseWatchLogListVO;
|
|
@@ -54,6 +53,12 @@ public class FsCourseWatchLogController extends BaseController
|
|
|
@Autowired
|
|
|
private CompanyDeptServiceImpl companyDeptService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IFsUserCoursePeriodService userCoursePeriodService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsUserCoursePeriodDaysService userCoursePeriodDaysService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询短链课程看课记录列表
|
|
|
*/
|
|
@@ -62,9 +67,26 @@ public class FsCourseWatchLogController extends BaseController
|
|
|
public TableDataInfo list(FsCourseWatchLogListParam param)
|
|
|
{
|
|
|
|
|
|
- startPage();
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
param.setCompanyId( loginUser.getCompany().getCompanyId());
|
|
|
+
|
|
|
+ if (param.getSendType()==1&& param.getPeriodETime()!=null && param.getPeriodSTime()!=null) {
|
|
|
+ List<Long> periodIds = userCoursePeriodDaysService.selectFsUserCoursePeriodDaysByTime(param.getPeriodSTime(), param.getPeriodETime());
|
|
|
+
|
|
|
+ if (!periodIds.isEmpty()){
|
|
|
+ List<Long> longs = userCoursePeriodService.selectFsUserCoursePeriodListByPeriodId(periodIds, loginUser.getCompany().getCompanyId());
|
|
|
+ if (!longs.isEmpty()){
|
|
|
+ param.setPeriodIds(longs);
|
|
|
+ }else {
|
|
|
+ return getDataTable(new ArrayList<>());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return getDataTable(new ArrayList<>());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ startPage();
|
|
|
List<FsCourseWatchLogListVO> list = fsCourseWatchLogService.selectFsCourseWatchLogListVO(param);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
@@ -96,6 +118,24 @@ public class FsCourseWatchLogController extends BaseController
|
|
|
param.setUserType(loginUser.getUser().getUserType());
|
|
|
param.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
|
|
|
+
|
|
|
+ if (param.getSendType()==1&& param.getPeriodETime()!=null && param.getPeriodSTime()!=null) {
|
|
|
+ List<Long> periodIds = userCoursePeriodDaysService.selectFsUserCoursePeriodDaysByTime(param.getPeriodSTime(), param.getPeriodETime());
|
|
|
+
|
|
|
+ if (!periodIds.isEmpty()){
|
|
|
+ List<Long> longs = userCoursePeriodService.selectFsUserCoursePeriodListByPeriodId(periodIds, loginUser.getCompany().getCompanyId());
|
|
|
+ if (!longs.isEmpty()){
|
|
|
+ param.setPeriodIds(longs);
|
|
|
+ }else {
|
|
|
+ return getDataTable(new ArrayList<>());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return getDataTable(new ArrayList<>());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
startPage();
|
|
|
List<FsCourseWatchLogListVO> list = fsCourseWatchLogService.selectFsCourseWatchLogListVO(param);
|
|
|
|
|
@@ -108,9 +148,27 @@ public class FsCourseWatchLogController extends BaseController
|
|
|
@GetMapping("/myList")
|
|
|
public TableDataInfo myList(FsCourseWatchLogListParam param)
|
|
|
{
|
|
|
- startPage();
|
|
|
+
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
param.setCompanyUserId( loginUser.getUser().getUserId());
|
|
|
+
|
|
|
+ if (param.getSendType()==1&& param.getPeriodETime()!=null && param.getPeriodSTime()!=null) {
|
|
|
+ List<Long> periodIds = userCoursePeriodDaysService.selectFsUserCoursePeriodDaysByTime(param.getPeriodSTime(), param.getPeriodETime());
|
|
|
+ if (!periodIds.isEmpty()){
|
|
|
+ List<Long> longs = userCoursePeriodService.selectFsUserCoursePeriodListByPeriodId(periodIds, loginUser.getCompany().getCompanyId());
|
|
|
+ if (!longs.isEmpty()){
|
|
|
+ param.setPeriodIds(longs);
|
|
|
+ }else {
|
|
|
+ return getDataTable(new ArrayList<>());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return getDataTable(new ArrayList<>());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ startPage();
|
|
|
+
|
|
|
List<FsCourseWatchLogListVO> list = fsCourseWatchLogService.selectFsCourseWatchLogListVO(param);
|
|
|
return getDataTable(list);
|
|
|
}
|