评论,回复,删评

This commit is contained in:
sjm 2023-12-22 10:38:18 +08:00
parent 2d15b6b773
commit e9f593fbfe

View File

@ -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<String, Long> hashMap = new HashMap<>();
hashMap.put("点赞成功:",comment.getLikeCount());
return JSON.toJSONString(hashMap);