放开注释

This commit is contained in:
670788339
2024-08-15 15:42:45 +08:00
parent 1f0060c4dc
commit a26ee1c707

View File

@@ -327,7 +327,7 @@ public class StudyCourseApi extends ApiBaseController{
StudyCourseItem item = studyService.checkHas(sci.getStudyId(),sci.getContentId());
// 20240815 特训营结营考试 临时代码
if(redisTemplate.opsForValue().get(item.getId())==null){
if(item != null && redisTemplate.opsForValue().get(item.getId())==null){
redisTemplate.opsForValue().set(item.getId(),item.getId());
//设置过期时间为1天
redisTemplate.expire(item.getId(), 60, TimeUnit.SECONDS);
@@ -419,7 +419,7 @@ public class StudyCourseApi extends ApiBaseController{
if(item!=null) {
//如果记录存在但是进度不到100未完成情况就更新进度一期不会有这种情况
// 20240815 特训营结营考试 临时代码
if(redisTemplate.opsForValue().get(item.getId())==null){
if(item != null && redisTemplate.opsForValue().get(item.getId())==null){
redisTemplate.opsForValue().set(item.getId(),item.getId());
//设置过期时间为1天
redisTemplate.expire(item.getId(), 60, TimeUnit.SECONDS);
@@ -532,7 +532,7 @@ public class StudyCourseApi extends ApiBaseController{
}
try {
// 20240815 特训营结营考试 临时代码
if(redisTemplate.opsForValue().get(itemId)==null){
if(itemId != null && redisTemplate.opsForValue().get(itemId)==null){
redisTemplate.opsForValue().set(itemId,itemId);
//设置过期时间为1天
redisTemplate.expire(itemId, 60, TimeUnit.SECONDS);