|
@@ -4,7 +4,11 @@ import com.fs.app.annotation.Login;
|
|
import com.fs.app.config.ImageStorageConfig;
|
|
import com.fs.app.config.ImageStorageConfig;
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.ResponseResult;
|
|
import com.fs.common.core.domain.ResponseResult;
|
|
|
|
+import com.fs.common.enums.BizResponseEnum;
|
|
import com.fs.common.utils.StringUtils;
|
|
import com.fs.common.utils.StringUtils;
|
|
|
|
+import com.fs.company.domain.CompanyUser;
|
|
|
|
+import com.fs.company.service.ICompanyUserService;
|
|
|
|
+import com.fs.company.service.impl.CompanyServiceImpl;
|
|
import com.fs.course.domain.FsUserCoursePeriod;
|
|
import com.fs.course.domain.FsUserCoursePeriod;
|
|
import com.fs.course.param.FsCourseLinkCreateParam;
|
|
import com.fs.course.param.FsCourseLinkCreateParam;
|
|
import com.fs.course.param.FsWatchCourseTimeParam;
|
|
import com.fs.course.param.FsWatchCourseTimeParam;
|
|
@@ -58,6 +62,8 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private IFsUserCoursePeriodService fsUserCoursePeriodService;
|
|
private IFsUserCoursePeriodService fsUserCoursePeriodService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ICompanyUserService companyService;
|
|
|
|
|
|
@Login
|
|
@Login
|
|
@GetMapping("/pageList")
|
|
@GetMapping("/pageList")
|
|
@@ -109,11 +115,24 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
@RequestParam(required = false, defaultValue = "1") Integer pageNum,
|
|
@RequestParam(required = false, defaultValue = "1") Integer pageNum,
|
|
@RequestParam(required = false, defaultValue = "10") Integer pageSize) {
|
|
@RequestParam(required = false, defaultValue = "10") Integer pageSize) {
|
|
log.debug("参与记录 keyword: {}, pageNum: {}, pageSize: {}", keyword, pageNum, pageSize);
|
|
log.debug("参与记录 keyword: {}, pageNum: {}, pageSize: {}", keyword, pageNum, pageSize);
|
|
|
|
+ String userId = getUserId();
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
|
+ //判断是否管理员 管理员查所有
|
|
|
|
+ CompanyUser companyUser = companyService.selectCompanyUserById(Long.valueOf(userId));
|
|
|
|
+ if (companyUser != null) {
|
|
|
|
+ if (companyUser.isAdmin()) {
|
|
|
|
+ params.put("companyId", companyUser.getCompanyId());
|
|
|
|
+ } else {
|
|
|
|
+ params.put("companyUserId", userId);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return ResponseResult.fail(BizResponseEnum.PARAM_ERROR);
|
|
|
|
+ }
|
|
params.put("videoId", videoId);
|
|
params.put("videoId", videoId);
|
|
params.put("type", type);
|
|
params.put("type", type);
|
|
params.put("keyword", keyword);
|
|
params.put("keyword", keyword);
|
|
|
|
|
|
|
|
+
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
List<FsUserCourseParticipationRecordVO> record = fsUserCourseService.getParticipationRecordByMap(params);
|
|
List<FsUserCourseParticipationRecordVO> record = fsUserCourseService.getParticipationRecordByMap(params);
|
|
return ResponseResult.ok(new PageInfo<>(record));
|
|
return ResponseResult.ok(new PageInfo<>(record));
|