Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
saysky committed Oct 17, 2019
1 parent 89a9d76 commit 985a0cf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public void after(JoinPoint joinPoint) {
//请求耗时
Long logElapsedTime = endTime - beginTime;
log.setCostTime(logElapsedTime.intValue());

//调用线程保存至数据库
ThreadPoolUtil.getPool().execute(new SaveSystemLogThread(log, logService));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public JsonResult pushPost(@ModelAttribute Post post,
if (StringUtils.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
post.setPostThumbnail(SensConst.OPTIONS.get(BlogPropertiesEnum.BLOG_STATIC_URL.getProp()) + "/static/images/thumbnail/img_" + RandomUtil.randomInt(0, 14) + ".jpg");
}
post.setPostType(PostTypeEnum.POST_TYPE_POST.getValue());
post.setUserId(getLoginUserId());
postService.insertOrUpdate(post);
if (isOpenCheck && !isAdmin) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public String profile(Model model) {
public JsonResult saveProfile(@ModelAttribute User user) {
User loginUser = getLoginUser();

User saveUser = new User();
User saveUser = userService.get(loginUser.getId());
saveUser.setUserPass(null);
saveUser.setId(loginUser.getId());
saveUser.setUserName(user.getUserName());
saveUser.setUserDisplayName(user.getUserDisplayName());
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spring:
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/sens_blog?characterEncoding=utf8&useSSL=false&allowMultiQueries=true
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/sens_blog?characterEncoding=utf8&useSSL=false&allowMultiQueries=true
url: jdbc:mysql://127.0.0.1:3306/sens_blog?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowMultiQueries=true
username: root
password: 123456
redis:
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/mapper/LogMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
request_url,
request_type,
request_param,
name,
`name`,
ip,
create_time
FROM
Expand All @@ -28,7 +28,7 @@
request_url,
request_type,
request_param,
name,
`name`,
ip,
create_time
FROM
Expand Down

0 comments on commit 985a0cf

Please sign in to comment.