mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
Compare commits
29 Commits
zcwy0815-l
...
code-revie
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dadd80372 | ||
|
|
04a4f528bf | ||
|
|
f7cd9f8469 | ||
|
|
1021f0bd43 | ||
|
|
0d0b45f017 | ||
|
|
2ae3d99f21 | ||
|
|
89573debef | ||
|
|
457597eabc | ||
|
|
24ae3c0ec6 | ||
|
|
fffa12344a | ||
|
|
52a58a6c6f | ||
|
|
a4b034752d | ||
|
|
23e63062e9 | ||
|
|
06415d58ac | ||
|
|
3fc8ce614d | ||
|
|
bebe36d39e | ||
|
|
d4af5ba8d5 | ||
|
|
d42d1b2e83 | ||
|
|
cf64f0406f | ||
|
|
f5ff666c07 | ||
|
|
61754d3852 | ||
|
|
a26ee1c707 | ||
|
|
1f0060c4dc | ||
|
|
6b0050286c | ||
|
|
2b07029aca | ||
|
|
d2d7fab96c | ||
|
|
be3bae969c | ||
|
|
8e1b7519ef | ||
|
|
bddb11caf8 |
@@ -58,7 +58,7 @@
|
||||
<artifactId>xboe-module-scorm</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependency>
|
||||
<groupId>com.xboe</groupId>
|
||||
<artifactId>xboe-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
@@ -233,6 +233,31 @@
|
||||
<artifactId>spring-retry</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>5.3.26</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>9.0.83</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.xboe.api.vo.*;
|
||||
import com.xboe.module.course.vo.TeacherVo;
|
||||
import com.xboe.module.usergroup.entity.UserGroupItem;
|
||||
import com.xboe.module.usergroup.service.IUserGroupService;
|
||||
import com.xboe.school.study.dao.StudyCourseDao;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -65,7 +66,9 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@RestController
|
||||
@RequestMapping(value="/xboe/school/study/course")
|
||||
public class StudyCourseApi extends ApiBaseController{
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
IStudyCourseService service;
|
||||
|
||||
@@ -321,8 +324,19 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
token = request.getHeader("token");
|
||||
}
|
||||
|
||||
|
||||
//检查是否已存在
|
||||
StudyCourseItem item = studyService.checkHas(sci.getStudyId(),sci.getContentId());
|
||||
|
||||
// 20240815 特训营结营考试 临时代码
|
||||
// if(item != null && redisTemplate.opsForValue().get(item.getId())==null){
|
||||
// redisTemplate.opsForValue().set(item.getId(),item.getId());
|
||||
// //设置过期时间为1天
|
||||
// redisTemplate.expire(item.getId(), 60, TimeUnit.SECONDS);
|
||||
// }else{
|
||||
// return success("");
|
||||
// }
|
||||
if(item!=null) {
|
||||
//如果记录存在,但是进度不100无成情况,就更新进度,一期不会有这种情况
|
||||
if(item.getProgress()<100 && sci.getProgress()>item.getProgress()) {
|
||||
@@ -407,6 +421,14 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
StudyCourseItem item = studyService.checkHas(sci.getStudyId(),sci.getContentId());
|
||||
if(item!=null) {
|
||||
//如果记录存在,但是进度不到100,未完成情况,就更新进度,一期不会有这种情况
|
||||
// 20240815 特训营结营考试 临时代码
|
||||
// if(item != null && redisTemplate.opsForValue().get(item.getId())==null){
|
||||
// redisTemplate.opsForValue().set(item.getId(),item.getId());
|
||||
// //设置过期时间为1天
|
||||
// redisTemplate.expire(item.getId(), 60, TimeUnit.SECONDS);
|
||||
// }else{
|
||||
// return success("");
|
||||
// }
|
||||
if(item.getProgress()<100) {
|
||||
studyService.updateProcess(item.getId(),sci.getStudyId(),sci.getCourseId(), sci.getContentTotal(),100,token);
|
||||
}
|
||||
@@ -512,6 +534,14 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
token = request.getHeader("token");
|
||||
}
|
||||
try {
|
||||
// 20240815 特训营结营考试 临时代码
|
||||
// if(itemId != null && redisTemplate.opsForValue().get(itemId)==null){
|
||||
// redisTemplate.opsForValue().set(itemId,itemId);
|
||||
// //设置过期时间为1天
|
||||
// redisTemplate.expire(itemId, 60, TimeUnit.SECONDS);
|
||||
// }else{
|
||||
// return success(true);
|
||||
// }
|
||||
studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum,token);
|
||||
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId ,courseId, token);
|
||||
log.info("在线课学习记录"+allUserList);
|
||||
@@ -693,9 +723,10 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
return error("查询失败",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value="/study-course-content",method = {RequestMethod.GET,RequestMethod.POST})
|
||||
public JsonResponse<StudyCourseItem> findStudyCourseItem(String studyId,String contentId){
|
||||
public JsonResponse<StudyCourseItem> findStudyCourseItem(String studyId,String contentId, HttpServletRequest request){
|
||||
if(StringUtils.isBlank(studyId)){
|
||||
return error("无学习信息");
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.school.study.dao.StudyCourseDao;
|
||||
import com.xboe.school.study.entity.StudyCourse;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -32,6 +33,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@RestController
|
||||
@RequestMapping(value="/xboe/school/study/exam")
|
||||
public class StudyExamApi extends ApiBaseController{
|
||||
@Autowired
|
||||
StudyCourseDao scDao;
|
||||
|
||||
@Autowired
|
||||
IStudyExamService sexamService;
|
||||
|
||||
Reference in New Issue
Block a user