|
@@ -2,6 +2,9 @@ package com.ruoyi.project.training.elearn.controller;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.ruoyi.project.training.elearn.domain.TElLearn;
|
|
|
+import com.ruoyi.project.training.elearn.mapper.TElLearnMapper;
|
|
|
+import com.ruoyi.project.training.elearn.service.ITElLearnService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -34,6 +37,9 @@ public class TElResourceController extends BaseController
|
|
|
@Autowired
|
|
|
private ITElResourceService tElResourceService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITElLearnService itElLearnService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询课件列表
|
|
|
*/
|
|
@@ -43,6 +49,13 @@ public class TElResourceController extends BaseController
|
|
|
{
|
|
|
startPage();
|
|
|
List<TElResource> list = tElResourceService.selectFileList(tElResource);
|
|
|
+ Long userId = getUserId();
|
|
|
+ for (TElResource elResource : list) {
|
|
|
+ TElLearn learn = new TElLearn();
|
|
|
+ learn.setUserId(userId);
|
|
|
+ learn.setResourceId(elResource.getId());
|
|
|
+ elResource.setLearnTime(itElLearnService.selectLearnByUserIdAndResourceId(learn).getLearnTime());
|
|
|
+ }
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|