mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
放开redis
This commit is contained in:
@@ -327,13 +327,13 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
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 && 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()) {
|
||||
@@ -419,13 +419,13 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
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 != 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);
|
||||
}
|
||||
@@ -532,13 +532,13 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
}
|
||||
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);
|
||||
}
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user