diff --git a/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java b/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java index 4abc843..b2454d8 100644 --- a/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java +++ b/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java @@ -64,6 +64,7 @@ public class CommentServiceImpl implements CommentService { public String AddLikeCount(int id){ Comment comment = commentDao.selectByPrimaryKey(id); comment.setLikeCount(comment.getLikeCount()+1); + commentDao.updateByPrimaryKeySelective(comment); HashMap hashMap = new HashMap<>(); hashMap.put("η‚Ήθ΅žζˆεŠŸ:",comment.getLikeCount()); return JSON.toJSONString(hashMap);