From 0814b4ad94bce04001d2487c98fd9749fedf235e Mon Sep 17 00:00:00 2001 From: User_cyk <1020691186@qq.com> Date: Wed, 5 Jul 2023 13:30:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/entity/commentEntity.java | 10 +++++----- src/com/hellogithub/service/commentService.java | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/com/hellogithub/entity/commentEntity.java b/src/com/hellogithub/entity/commentEntity.java index 55e8e48..7c3a297 100644 --- a/src/com/hellogithub/entity/commentEntity.java +++ b/src/com/hellogithub/entity/commentEntity.java @@ -76,13 +76,13 @@ public class commentEntity { this.star = star; } - int likeCount; + int likeNum; - public int getLikeCount() { - return likeCount; + public int getLikeNum() { + return likeNum; } - public void setLikeCount(int likeCount) { - this.likeCount = likeCount; + public void setLikeNum(int likeCount) { + this.likeNum = likeCount; } } diff --git a/src/com/hellogithub/service/commentService.java b/src/com/hellogithub/service/commentService.java index faa1fe6..4068f88 100644 --- a/src/com/hellogithub/service/commentService.java +++ b/src/com/hellogithub/service/commentService.java @@ -29,11 +29,15 @@ public class commentService { int isUsed = commentEntity.getIsUsed(); String content = commentEntity.getContent(); int star = commentEntity.getStar(); + int commentId= commentEntity.getCommentId(); + int likeNum = commentEntity.getLikeNum(); dataMap.put("username",username); dataMap.put("time",time); dataMap.put("content",content); dataMap.put("star",star); dataMap.put("isUsed",isUsed); + dataMap.put("commentId",commentId); + dataMap.put("likeNum",likeNum); dataMap2.put(String.valueOf(i),dataMap); } return JSONArray.toJSONString(dataMap2);