diff --git a/src/main/java/com/lovenav/controller/CommentController.java b/src/main/java/com/lovenav/controller/CommentController.java index 0f8dbeb..b66f2c3 100644 --- a/src/main/java/com/lovenav/controller/CommentController.java +++ b/src/main/java/com/lovenav/controller/CommentController.java @@ -45,8 +45,8 @@ public class CommentController { // 显示回复 @RequestMapping(method = RequestMethod.GET, value = "/comment/view_reply") - public String View_reply(int id){ - return commentService.View_Reply(id); + public String View_reply(){ + return commentService.View_Reply(); } diff --git a/src/main/java/com/lovenav/dao/CommentDao.java b/src/main/java/com/lovenav/dao/CommentDao.java index 0e93025..7ac5c63 100644 --- a/src/main/java/com/lovenav/dao/CommentDao.java +++ b/src/main/java/com/lovenav/dao/CommentDao.java @@ -27,7 +27,7 @@ public interface CommentDao { List selectAllComment(); - List selectByAllReply(int id); + List selectByAllReply(); List queryFirstCommentList (Integer UrlId); diff --git a/src/main/java/com/lovenav/service/CommentService.java b/src/main/java/com/lovenav/service/CommentService.java index bd4758d..4053369 100644 --- a/src/main/java/com/lovenav/service/CommentService.java +++ b/src/main/java/com/lovenav/service/CommentService.java @@ -21,7 +21,7 @@ public interface CommentService { // 显示评论 String View_comment(); // 显示回复 - String View_Reply(int id); + String View_Reply(); List queryCommentByUrlId (Integer UrlId ); diff --git a/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java b/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java index 1b0eefc..ed58299 100644 --- a/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java +++ b/src/main/java/com/lovenav/service/serviceImpl/CommentServiceImpl.java @@ -85,8 +85,8 @@ public class CommentServiceImpl implements CommentService { } // 显示回复 - public String View_Reply(int id){ - List list = commentDao.selectByAllReply(id); + public String View_Reply(){ + List list = commentDao.selectByAllReply(); return JSON.toJSONString(list); } diff --git a/src/main/resources/mybatis/CommentDao.xml b/src/main/resources/mybatis/CommentDao.xml index 1422e1b..58cd776 100644 --- a/src/main/resources/mybatis/CommentDao.xml +++ b/src/main/resources/mybatis/CommentDao.xml @@ -200,7 +200,6 @@ select * from ln_comment - where root_comment_id = #{rootCommentId,jdbcType=INTEGER} and comment_status = 0