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);