mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 19:36:50 +08:00
study接口加redis过滤
This commit is contained in:
@@ -326,7 +326,7 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
if(redisTemplate.opsForValue().get(sci.getStudyId()+sci.getContentId())==null){
|
if(redisTemplate.opsForValue().get(sci.getStudyId()+sci.getContentId())==null){
|
||||||
redisTemplate.opsForValue().set(sci.getStudyId()+sci.getContentId(),sci.getStudyId());
|
redisTemplate.opsForValue().set(sci.getStudyId()+sci.getContentId(),sci.getStudyId());
|
||||||
//设置过期时间为1天
|
//设置过期时间为1天
|
||||||
redisTemplate.expire(sci.getStudyId()+sci.getContentId(), 60, TimeUnit.SECONDS);
|
redisTemplate.expire(sci.getStudyId()+sci.getContentId(), 5*60, TimeUnit.SECONDS);
|
||||||
}else{
|
}else{
|
||||||
return success("");
|
return success("");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user