评论,回复,删评
This commit is contained in:
parent
2d15b6b773
commit
e9f593fbfe
@ -64,6 +64,7 @@ public class CommentServiceImpl implements CommentService {
|
|||||||
public String AddLikeCount(int id){
|
public String AddLikeCount(int id){
|
||||||
Comment comment = commentDao.selectByPrimaryKey(id);
|
Comment comment = commentDao.selectByPrimaryKey(id);
|
||||||
comment.setLikeCount(comment.getLikeCount()+1);
|
comment.setLikeCount(comment.getLikeCount()+1);
|
||||||
|
commentDao.updateByPrimaryKeySelective(comment);
|
||||||
HashMap<String, Long> hashMap = new HashMap<>();
|
HashMap<String, Long> hashMap = new HashMap<>();
|
||||||
hashMap.put("点赞成功:",comment.getLikeCount());
|
hashMap.put("点赞成功:",comment.getLikeCount());
|
||||||
return JSON.toJSONString(hashMap);
|
return JSON.toJSONString(hashMap);
|
||||||
|
Loading…
Reference in New Issue
Block a user