From 8de5e5b37639f675c32f3c19af068413704027f7 Mon Sep 17 00:00:00 2001 From: wangqing <408564126@qq.com> Date: Mon, 4 Mar 2024 12:55:22 +0800 Subject: [PATCH] fix comment thumbupCount field names --- .../comment/controller/CommentController.java | 20 +++++++++---------- .../java/com/luoo/comment/pojo/Comment.java | 1 + .../com/luoo/comment/pojo/CommentResp.java | 5 +++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/luoo_comment/src/main/java/com/luoo/comment/controller/CommentController.java b/luoo_comment/src/main/java/com/luoo/comment/controller/CommentController.java index 6625e0f..3e37b88 100644 --- a/luoo_comment/src/main/java/com/luoo/comment/controller/CommentController.java +++ b/luoo_comment/src/main/java/com/luoo/comment/controller/CommentController.java @@ -202,11 +202,11 @@ public class CommentController extends BaseController { } commentResp.setTopChildrenComment(topComment); } - commentResp.setThumbupCountString(comment.getThumbupCount()+""); - commentResp.setThumbupCountInt(comment.getThumbupCount()); - if(comment.getThumbupCount()>999) { - commentResp.setThumbupCountString("999+"); - } +// commentResp.setThumbupCountString(comment.getThumbupCount()+""); + commentResp.setThumbupCount(comment.getThumbupCount()); +// if(comment.getThumbupCount()>999) { +// commentResp.setThumbupCountString("999+"); +// } return commentResp; } @@ -237,11 +237,11 @@ public class CommentController extends BaseController { } commentResp.setTopChildrenComment(topComment); } - commentResp.setThumbupCountString(comment.getThumbupCount()+""); - commentResp.setThumbupCountInt(comment.getThumbupCount()); - if(comment.getThumbupCount()>999) { - commentResp.setThumbupCountString("999+"); - } +// commentResp.setThumbupCountString(comment.getThumbupCount()+""); + commentResp.setThumbupCount(comment.getThumbupCount()); +// if(comment.getThumbupCount()>999) { +// commentResp.setThumbupCountString("999+"); +// } return commentResp; } diff --git a/luoo_comment/src/main/java/com/luoo/comment/pojo/Comment.java b/luoo_comment/src/main/java/com/luoo/comment/pojo/Comment.java index 05a236e..cd02d8e 100644 --- a/luoo_comment/src/main/java/com/luoo/comment/pojo/Comment.java +++ b/luoo_comment/src/main/java/com/luoo/comment/pojo/Comment.java @@ -62,4 +62,5 @@ public class Comment implements Serializable { private String replyToUserId; private String replyToNickname; + } diff --git a/luoo_comment/src/main/java/com/luoo/comment/pojo/CommentResp.java b/luoo_comment/src/main/java/com/luoo/comment/pojo/CommentResp.java index dbdc23b..711ae77 100644 --- a/luoo_comment/src/main/java/com/luoo/comment/pojo/CommentResp.java +++ b/luoo_comment/src/main/java/com/luoo/comment/pojo/CommentResp.java @@ -26,9 +26,10 @@ public class CommentResp implements Serializable { private String avatar; // 点赞数 - private String thumbupCountString; +// private String thumbupCountString; - private int thumbupCountInt; + // 点赞数 + private Integer thumbupCount; // 转发数 // private Integer share; // 评论数量