mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
study接口加redis过滤
This commit is contained in:
@@ -418,6 +418,14 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
StudyCourseItem item = studyService.checkHas(sci.getStudyId(),sci.getContentId());
|
||||
if(item!=null) {
|
||||
//如果记录存在,但是进度不到100,未完成情况,就更新进度,一期不会有这种情况
|
||||
// 20240815 特训营结营考试 临时代码
|
||||
if(redisTemplate.opsForValue().get(sci.getStudyId()+sci.getContentId())==null){
|
||||
redisTemplate.opsForValue().set(sci.getStudyId()+sci.getContentId(),sci.getStudyId());
|
||||
//设置过期时间为1天
|
||||
redisTemplate.expire(sci.getStudyId()+sci.getContentId(), 5*60, TimeUnit.SECONDS);
|
||||
}else{
|
||||
return success("");
|
||||
}
|
||||
if(item.getProgress()<100) {
|
||||
studyService.updateProcess(item.getId(),sci.getStudyId(),sci.getCourseId(), sci.getContentTotal(),100,token);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user