|
@@ -5,6 +5,8 @@ import com.fs.app.config.ImageStorageConfig;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.domain.ResponseResult;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
+import com.fs.company.domain.CompanyUser;
|
|
|
+import com.fs.company.service.ICompanyUserService;
|
|
|
import com.fs.course.domain.FsUserCoursePeriod;
|
|
|
import com.fs.course.param.FsCourseLinkCreateParam;
|
|
|
import com.fs.course.param.newfs.FsCourseSortLinkParam;
|
|
@@ -30,7 +32,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.io.InputStream;
|
|
|
-import java.time.LocalDate;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -58,6 +59,8 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private IFsUserCoursePeriodService fsUserCoursePeriodService;
|
|
|
+ @Autowired
|
|
|
+ private ICompanyUserService companyUserService;
|
|
|
|
|
|
@Login
|
|
|
@GetMapping("/pageList")
|
|
@@ -108,12 +111,23 @@ public class FsUserCourseVideoController extends AppBaseController {
|
|
|
@RequestParam(required = false) String keyword,
|
|
|
@RequestParam(required = false, defaultValue = "1") Integer pageNum,
|
|
|
@RequestParam(required = false, defaultValue = "10") Integer pageSize) {
|
|
|
- log.debug("参与记录 keyword: {}, pageNum: {}, pageSize: {}", keyword, pageNum, pageSize);
|
|
|
+ log.debug("参与记录 videoId:{}, type:{}, keyword: {}, pageNum: {}, pageSize: {}", videoId, type, keyword, pageNum, pageSize);
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("videoId", videoId);
|
|
|
params.put("type", type);
|
|
|
params.put("keyword", keyword);
|
|
|
|
|
|
+ // type 0 答题领奖记录----答题正确并且领取红包的
|
|
|
+ // type 1 完播----这堂课看完的人
|
|
|
+ // type 2 未完播---看课中断
|
|
|
+ // 管理员看整个公司 否则看自己的
|
|
|
+ CompanyUser companyUser = companyUserService.selectCompanyUserByUserId(Long.parseLong(getUserId()));
|
|
|
+ if (companyUser.isAdmin()) {
|
|
|
+ params.put("companyId", companyUser.getCompanyId());
|
|
|
+ } else {
|
|
|
+ params.put("companyUserId", companyUser.getUserId());
|
|
|
+ }
|
|
|
+
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
List<FsUserCourseParticipationRecordVO> record = fsUserCourseService.getParticipationRecordByMap(params);
|
|
|
return ResponseResult.ok(new PageInfo<>(record));
|