修改评论

This commit is contained in:
cyk
2023-07-05 13:30:12 +08:00
parent c8661e12dc
commit 0814b4ad94
2 changed files with 9 additions and 5 deletions

View File

@@ -76,13 +76,13 @@ public class commentEntity {
this.star = star; this.star = star;
} }
int likeCount; int likeNum;
public int getLikeCount() { public int getLikeNum() {
return likeCount; return likeNum;
} }
public void setLikeCount(int likeCount) { public void setLikeNum(int likeCount) {
this.likeCount = likeCount; this.likeNum = likeCount;
} }
} }

View File

@@ -29,11 +29,15 @@ public class commentService {
int isUsed = commentEntity.getIsUsed(); int isUsed = commentEntity.getIsUsed();
String content = commentEntity.getContent(); String content = commentEntity.getContent();
int star = commentEntity.getStar(); int star = commentEntity.getStar();
int commentId= commentEntity.getCommentId();
int likeNum = commentEntity.getLikeNum();
dataMap.put("username",username); dataMap.put("username",username);
dataMap.put("time",time); dataMap.put("time",time);
dataMap.put("content",content); dataMap.put("content",content);
dataMap.put("star",star); dataMap.put("star",star);
dataMap.put("isUsed",isUsed); dataMap.put("isUsed",isUsed);
dataMap.put("commentId",commentId);
dataMap.put("likeNum",likeNum);
dataMap2.put(String.valueOf(i),dataMap); dataMap2.put(String.valueOf(i),dataMap);
} }
return JSONArray.toJSONString(dataMap2); return JSONArray.toJSONString(dataMap2);