fix 优化了登录的记住密码描述,

修改了个人中心的样式。优化了编辑栏位
This commit is contained in:
limqhz
2022-05-17 14:50:16 +08:00
parent e2bd4c5084
commit 95a23b572b
14 changed files with 31 additions and 27 deletions

View File

@@ -58,7 +58,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// http.requiresChannel().anyRequest().requiresSecure();
// 记住我配置 默认为remember-me
http.rememberMe();
http.rememberMe().tokenValiditySeconds(604800);
}
// 用户授权验证

View File

@@ -57,13 +57,14 @@ public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements Bl
}
private void addRecord(BlogWithUser blogRead, String sessionId) {
String value = redisUtils.get(sessionId + blogRead.getBid());
String bid = blogRead.getBid();
String value = redisUtils.get(sessionId + bid);
Blog blog = new Blog();
blog.setBid(blogRead.getBid());
if (!QuinnConstant.SESSION_VIEW_KEY.equals(value)){
blog.setViews(blogRead.getViews()+1);
redisUtils.set(sessionId + blog.getBid(),QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
updateById(blog);
blogRead.setViews(blogRead.getViews()+1);
redisUtils.set(sessionId + bid,QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
update(blog,new QueryWrapper<Blog>().eq("bid",bid));
}
}

View File

@@ -196,9 +196,12 @@ public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> impleme
*/
String value = redisUtils.get(sessionId + source.getSid());
if (!QuinnConstant.SESSION_VIEW_KEY.equals(value)){
source.setDownRecord(source.getDownRecord() + 1);
Source update = new Source();
update.setId(source.getId());
update.setDownRecord(source.getDownRecord() + 1);
redisUtils.set(sessionId + source.getSid(),QuinnConstant.SESSION_VIEW_KEY,QuinnConstant.SESSION_TIME_OUT);
updateById(source);
// 不更新大字段
updateById(update);
}
}