fix: 评论实体添加isShow字段

This commit is contained in:
sjm
2024-07-19 14:23:01 +08:00
parent 08cf5cf945
commit 1c09e70586
4 changed files with 10 additions and 25 deletions

View File

@@ -42,7 +42,7 @@ public class SchisandraShareCommentReplyController {
* @return
*/
@GetMapping(value = "listreply")
public Result listReply(@RequestParam String commentId) {
public Result<SchisandraShareCommentReplyDTO> listReply(@RequestParam String commentId) {
try {
List<SchisandraShareCommentReplyBO> result = schisandraShareCommentReplyDomainService.listReply(commentId);
if (log.isInfoEnabled()) {
@@ -84,29 +84,6 @@ public class SchisandraShareCommentReplyController {
}
}
// /**
// * 查询该动态下的评论
// */
// @Cacheable(value = "commentcount",key = "#detailId")
// @PostMapping(value = "commentcount")
// public Result listCommentCount(@RequestParam String detailId) {
// try {
// result = schisandraShareCommentReplyDomainService.listCommentCount(detailId);
// if (log.isInfoEnabled()) {
// log.info("获取当前文章评论内容{}", JSON.toJSONString(result));
// }
// return Result.ok(result);
// } catch (IllegalArgumentException e) {
// log.error("参数异常!错误原因{}", e.getMessage(), e);
// return Result.fail(e.getMessage());
// } catch (Exception e) {
// log.error("获取当前文章内容异常!错误原因{}", e.getMessage(), e);
// return Result.fail("获取当前文章内容异常!");
// }
// }
@PostMapping("addreply")
public Result<Boolean> addReply(@RequestBody SchisandraShareCommentReplyDTO schisandraShareCommentReplyDTO) {
try {

View File

@@ -118,5 +118,8 @@ public class SchisandraShareCommentReplyDTO implements Serializable {
private String avatar;
private Boolean isShowReply = false;
private Boolean isShow = false;
}

View File

@@ -114,5 +114,8 @@ public class SchisandraShareCommentReplyBO implements Serializable {
private String avatar;
private Boolean isShowReply = false;
private Boolean isShow = false;
}

View File

@@ -71,6 +71,7 @@ public class SchisandraShareCommentReplyServiceImpl implements SchisandraShareCo
public List<SchisandraShareCommentReply> listComment(String detailId) {
QueryWrapper wrapper = QueryWrapper.create()
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.PIC_URLS,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,
@@ -87,7 +88,8 @@ public class SchisandraShareCommentReplyServiceImpl implements SchisandraShareCo
@Override
public List<SchisandraShareCommentReply> listReply(String commentId){
QueryWrapper wrapper = QueryWrapper.create()
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
.select(SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.ID,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.USER_ID,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.CONTENT,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.PIC_URLS,
SchisandraShareCommentReplyTableDef.SCHISANDRA_SHARE_COMMENT_REPLY.LIKES,