From 5d86e004b3ad11b64f385780b6086dd227c8c8ba Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Tue, 12 Aug 2025 13:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=8C=BB=E9=99=A2?= =?UTF-8?q?=E5=A4=84=E7=90=86=E7=9A=84=E9=97=AE=E9=A2=98dadasdasdfdfgfd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/CaseClinicalService.java | 5 ++++ .../UserCommentClinicalArticleController.java | 16 +++++++++- .../UserCommentClinicalArticleQueryForm.java | 7 ++++- .../UserCommentClinicalArticleUpdateForm.java | 4 ++- .../vo/UserCommentClinicalArticleVO.java | 22 +++----------- .../UserCommentClinicalArticleService.java | 30 +++++++++++++++++++ .../UserCommentClinicalVideoController.java | 16 +++++++++- .../UserCommentClinicalVideoQueryForm.java | 7 ++++- .../UserCommentClinicalVideoUpdateForm.java | 4 ++- .../domain/vo/UserCommentClinicalVideoVO.java | 22 +++----------- .../UserCommentClinicalVideoService.java | 30 +++++++++++++++++++ .../UserCommentExchangeController.java | 16 +++++++++- .../form/UserCommentExchangeQueryForm.java | 7 ++++- .../form/UserCommentExchangeUpdateForm.java | 4 ++- .../domain/vo/UserCommentExchangeVO.java | 22 +++----------- .../service/UserCommentExchangeService.java | 30 +++++++++++++++++++ .../UserCommentClinicalArticleMapper.xml | 29 +++++++++++------- .../UserCommentClinicalVideoMapper.xml | 29 +++++++++++------- .../UserCommentExchangeMapper.xml | 29 +++++++++++------- 19 files changed, 236 insertions(+), 93 deletions(-) diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinical/service/CaseClinicalService.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinical/service/CaseClinicalService.java index 7ee16fb..6db7338 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinical/service/CaseClinicalService.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinical/service/CaseClinicalService.java @@ -196,6 +196,11 @@ public class CaseClinicalService { statsCaseClinicalHospitalDao.insert(statsCaseClinicalHospital); }else{ if (type == 1){ + if (lastPushDate!=null){ + statsCaseClinicalHospital.setLastPushDate(lastPushDate); + statsCaseClinicalHospitalDao.updateById(statsCaseClinicalHospital); + } + statsCaseClinicalHospitalDao.inc(statsCaseClinicalHospital.getHospitalId(),"article_num",num); }else{ statsCaseClinicalHospitalDao.inc(statsCaseClinicalHospital.getHospitalId(),"video_num",num); diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/controller/UserCommentClinicalArticleController.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/controller/UserCommentClinicalArticleController.java index 6c19c8b..ab95522 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/controller/UserCommentClinicalArticleController.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/controller/UserCommentClinicalArticleController.java @@ -51,6 +51,20 @@ public class UserCommentClinicalArticleController { return userCommentClinicalArticleService.update(updateForm); } + @Operation(summary = "修改评论状态 @author xing") + @PostMapping("/userCommentClinicalArticle/updateStatus") + @SaCheckPermission("userCommentClinicalArticle:update") + public ResponseDTO updateStatus(@RequestParam Long commentId, @RequestParam Integer status) { + return userCommentClinicalArticleService.updateStatus(commentId, status); + } + + @Operation(summary = "修改置顶状态 @author xing") + @PostMapping("/userCommentClinicalArticle/updateTopStatus") + @SaCheckPermission("userCommentClinicalArticle:update") + public ResponseDTO updateTopStatus(@RequestParam Long commentId, @RequestParam Integer isTop) { + return userCommentClinicalArticleService.updateTopStatus(commentId, isTop); + } + @Operation(summary = "批量删除 @author xing") @PostMapping("/userCommentClinicalArticle/batchDelete") @SaCheckPermission("userCommentClinicalArticle:delete") @@ -61,7 +75,7 @@ public class UserCommentClinicalArticleController { @Operation(summary = "单个删除 @author xing") @GetMapping("/userCommentClinicalArticle/delete/{commentId}") @SaCheckPermission("userCommentClinicalArticle:delete") - public ResponseDTO batchDelete(@PathVariable Long commentId) { + public ResponseDTO delete(@PathVariable Long commentId) { return userCommentClinicalArticleService.delete(commentId); } } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleQueryForm.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleQueryForm.java index ca1ba75..4742e22 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleQueryForm.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleQueryForm.java @@ -17,7 +17,12 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = false) public class UserCommentClinicalArticleQueryForm extends PageParam { - @Schema(description = "内容") + @Schema(description = "关键词(内容、标题)") private String keywords; + @Schema(description = "是否置顶(0:否 1:是)") + private Integer isTop; + + @Schema(description = "是否存在敏感词(0:否 1:是)") + private Integer isSensitive; } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleUpdateForm.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleUpdateForm.java index 5c88d8f..55d8925 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleUpdateForm.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/form/UserCommentClinicalArticleUpdateForm.java @@ -22,7 +22,9 @@ public class UserCommentClinicalArticleUpdateForm { @Schema(description = "评论状态(0:禁用 1:正常)") private Integer status; + @Schema(description = "是否置顶(0:否 1:是)") + private Integer isTop; + @Schema(description = "评论内容") private String content; - } \ No newline at end of file diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/vo/UserCommentClinicalArticleVO.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/vo/UserCommentClinicalArticleVO.java index 65ae09e..9b7fc1e 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/vo/UserCommentClinicalArticleVO.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/domain/vo/UserCommentClinicalArticleVO.java @@ -15,21 +15,11 @@ import lombok.Data; @Data public class UserCommentClinicalArticleVO { - @Schema(description = "主键id") private Long commentId; - @Schema(description = "用户id") - private Long userId; - - @Schema(description = "临床文章id") - private Long articleId; - - @Schema(description = "父级id,一级评论为null") - private Long parentId; - - @Schema(description = "根评论id,一级评论时为null。其余为一级评论id") - private Long rootId; + @Schema(description = "用户名称") + private String userName; @Schema(description = "评论状态(0:禁用 1:正常)") private Integer status; @@ -52,13 +42,9 @@ public class UserCommentClinicalArticleVO { @Schema(description = "评论内容(原版)") private String contentWord; - @Schema(description = "评论图片") - private String commentImage; + @Schema(description = "文章标题") + private String articleTitle; @Schema(description = "创建时间") private LocalDateTime createdAt; - - @Schema(description = "修改时间") - private LocalDateTime updatedAt; - } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/service/UserCommentClinicalArticleService.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/service/UserCommentClinicalArticleService.java index 80a6b43..390f0e4 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/service/UserCommentClinicalArticleService.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalArticle/service/UserCommentClinicalArticleService.java @@ -60,6 +60,36 @@ public class UserCommentClinicalArticleService { return ResponseDTO.ok(); } + /** + * 修改评论状态 + */ + public ResponseDTO updateStatus(Long commentId, Integer status) { + if (null == commentId || null == status) { + return ResponseDTO.userErrorParam("参数不能为空"); + } + + UserCommentClinicalArticleEntity entity = new UserCommentClinicalArticleEntity(); + entity.setCommentId(commentId); + entity.setStatus(status); + userCommentClinicalArticleDao.updateById(entity); + return ResponseDTO.ok(); + } + + /** + * 修改置顶状态 + */ + public ResponseDTO updateTopStatus(Long commentId, Integer isTop) { + if (null == commentId || null == isTop) { + return ResponseDTO.userErrorParam("参数不能为空"); + } + + UserCommentClinicalArticleEntity entity = new UserCommentClinicalArticleEntity(); + entity.setCommentId(commentId); + entity.setIsTop(isTop); + userCommentClinicalArticleDao.updateById(entity); + return ResponseDTO.ok(); + } + /** * 批量删除 */ diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/controller/UserCommentClinicalVideoController.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/controller/UserCommentClinicalVideoController.java index dec76fb..7f768b6 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/controller/UserCommentClinicalVideoController.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/controller/UserCommentClinicalVideoController.java @@ -51,6 +51,20 @@ public class UserCommentClinicalVideoController { return userCommentClinicalVideoService.update(updateForm); } + @Operation(summary = "修改评论状态 @author xing") + @PostMapping("/userCommentClinicalVideo/updateStatus") + @SaCheckPermission("userCommentClinicalVideo:update") + public ResponseDTO updateStatus(@RequestParam Long commentId, @RequestParam Integer status) { + return userCommentClinicalVideoService.updateStatus(commentId, status); + } + + @Operation(summary = "修改置顶状态 @author xing") + @PostMapping("/userCommentClinicalVideo/updateTopStatus") + @SaCheckPermission("userCommentClinicalVideo:update") + public ResponseDTO updateTopStatus(@RequestParam Long commentId, @RequestParam Integer isTop) { + return userCommentClinicalVideoService.updateTopStatus(commentId, isTop); + } + @Operation(summary = "批量删除 @author xing") @PostMapping("/userCommentClinicalVideo/batchDelete") @SaCheckPermission("userCommentClinicalVideo:delete") @@ -61,7 +75,7 @@ public class UserCommentClinicalVideoController { @Operation(summary = "单个删除 @author xing") @GetMapping("/userCommentClinicalVideo/delete/{commentId}") @SaCheckPermission("userCommentClinicalVideo:delete") - public ResponseDTO batchDelete(@PathVariable Long commentId) { + public ResponseDTO delete(@PathVariable Long commentId) { return userCommentClinicalVideoService.delete(commentId); } } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoQueryForm.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoQueryForm.java index 466c3b5..78c883f 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoQueryForm.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoQueryForm.java @@ -17,7 +17,12 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = false) public class UserCommentClinicalVideoQueryForm extends PageParam { - @Schema(description = "内容") + @Schema(description = "关键词(内容、标题)") private String keywords; + @Schema(description = "是否置顶(0:否 1:是)") + private Integer isTop; + + @Schema(description = "是否存在敏感词(0:否 1:是)") + private Integer isSensitive; } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoUpdateForm.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoUpdateForm.java index b1ace19..baaada0 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoUpdateForm.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/form/UserCommentClinicalVideoUpdateForm.java @@ -22,7 +22,9 @@ public class UserCommentClinicalVideoUpdateForm { @Schema(description = "评论状态(0:禁用 1:正常)") private Integer status; + @Schema(description = "是否置顶(0:否 1:是)") + private Integer isTop; + @Schema(description = "评论内容") private String content; - } \ No newline at end of file diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/vo/UserCommentClinicalVideoVO.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/vo/UserCommentClinicalVideoVO.java index 6677678..fdb194f 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/vo/UserCommentClinicalVideoVO.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/domain/vo/UserCommentClinicalVideoVO.java @@ -15,21 +15,11 @@ import lombok.Data; @Data public class UserCommentClinicalVideoVO { - @Schema(description = "主键id") private Long commentId; - @Schema(description = "用户id") - private Long userId; - - @Schema(description = "临床视频id") - private Long videoId; - - @Schema(description = "父级id,一级评论为null") - private Long parentId; - - @Schema(description = "根评论id,一级评论时为null。其余为一级评论id") - private Long rootId; + @Schema(description = "用户名称") + private String userName; @Schema(description = "评论状态(0:禁用 1:正常)") private Integer status; @@ -52,13 +42,9 @@ public class UserCommentClinicalVideoVO { @Schema(description = "评论内容(原版)") private String contentWord; - @Schema(description = "评论图片") - private String commentImage; + @Schema(description = "视频标题") + private String videoTitle; @Schema(description = "创建时间") private LocalDateTime createdAt; - - @Schema(description = "修改时间") - private LocalDateTime updatedAt; - } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/service/UserCommentClinicalVideoService.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/service/UserCommentClinicalVideoService.java index aa70d57..04a3ff1 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/service/UserCommentClinicalVideoService.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseClinicalVideo/service/UserCommentClinicalVideoService.java @@ -60,6 +60,36 @@ public class UserCommentClinicalVideoService { return ResponseDTO.ok(); } + /** + * 修改评论状态 + */ + public ResponseDTO updateStatus(Long commentId, Integer status) { + if (null == commentId || null == status) { + return ResponseDTO.userErrorParam("参数不能为空"); + } + + UserCommentClinicalVideoEntity entity = new UserCommentClinicalVideoEntity(); + entity.setCommentId(commentId); + entity.setStatus(status); + userCommentClinicalVideoDao.updateById(entity); + return ResponseDTO.ok(); + } + + /** + * 修改置顶状态 + */ + public ResponseDTO updateTopStatus(Long commentId, Integer isTop) { + if (null == commentId || null == isTop) { + return ResponseDTO.userErrorParam("参数不能为空"); + } + + UserCommentClinicalVideoEntity entity = new UserCommentClinicalVideoEntity(); + entity.setCommentId(commentId); + entity.setIsTop(isTop); + userCommentClinicalVideoDao.updateById(entity); + return ResponseDTO.ok(); + } + /** * 批量删除 */ diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/controller/UserCommentExchangeController.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/controller/UserCommentExchangeController.java index 27f10ff..8488f15 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/controller/UserCommentExchangeController.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/controller/UserCommentExchangeController.java @@ -51,6 +51,20 @@ public class UserCommentExchangeController { return userCommentExchangeService.update(updateForm); } + @Operation(summary = "修改评论状态 @author xing") + @PostMapping("/userCommentExchange/updateStatus") + @SaCheckPermission("userCommentExchange:update") + public ResponseDTO updateStatus(@RequestParam Long commentId, @RequestParam Integer status) { + return userCommentExchangeService.updateStatus(commentId, status); + } + + @Operation(summary = "修改置顶状态 @author xing") + @PostMapping("/userCommentExchange/updateTopStatus") + @SaCheckPermission("userCommentExchange:update") + public ResponseDTO updateTopStatus(@RequestParam Long commentId, @RequestParam Integer isTop) { + return userCommentExchangeService.updateTopStatus(commentId, isTop); + } + @Operation(summary = "批量删除 @author xing") @PostMapping("/userCommentExchange/batchDelete") @SaCheckPermission("userCommentExchange:delete") @@ -61,7 +75,7 @@ public class UserCommentExchangeController { @Operation(summary = "单个删除 @author xing") @GetMapping("/userCommentExchange/delete/{commentId}") @SaCheckPermission("userCommentExchange:delete") - public ResponseDTO batchDelete(@PathVariable Long commentId) { + public ResponseDTO delete(@PathVariable Long commentId) { return userCommentExchangeService.delete(commentId); } } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeQueryForm.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeQueryForm.java index f7b31d0..43ec578 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeQueryForm.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeQueryForm.java @@ -17,7 +17,12 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = false) public class UserCommentExchangeQueryForm extends PageParam { - @Schema(description = "内容") + @Schema(description = "关键词(内容、标题)") private String keywords; + @Schema(description = "是否置顶(0:否 1:是)") + private Integer isTop; + + @Schema(description = "是否存在敏感词(0:否 1:是)") + private Integer isSensitive; } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeUpdateForm.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeUpdateForm.java index 1397c58..2315ac2 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeUpdateForm.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/form/UserCommentExchangeUpdateForm.java @@ -22,7 +22,9 @@ public class UserCommentExchangeUpdateForm { @Schema(description = "评论状态(0:禁用 1:正常)") private Integer status; + @Schema(description = "是否置顶(0:否 1:是)") + private Integer isTop; + @Schema(description = "评论内容") private String content; - } \ No newline at end of file diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/vo/UserCommentExchangeVO.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/vo/UserCommentExchangeVO.java index ef67d5d..65a248f 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/vo/UserCommentExchangeVO.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/domain/vo/UserCommentExchangeVO.java @@ -15,21 +15,11 @@ import lombok.Data; @Data public class UserCommentExchangeVO { - @Schema(description = "主键id") private Long commentId; - @Schema(description = "用户id") - private Long userId; - - @Schema(description = "病例交流id") - private Long exchangeId; - - @Schema(description = "父级id,一级评论为null") - private Long parentId; - - @Schema(description = "根评论id,一级评论时为null。其余为一级评论id") - private Long rootId; + @Schema(description = "用户名称") + private String userName; @Schema(description = "评论状态(0:禁用 1:正常)") private Integer status; @@ -52,13 +42,9 @@ public class UserCommentExchangeVO { @Schema(description = "评论内容(原版)") private String contentWord; - @Schema(description = "评论图片") - private String commentImage; + @Schema(description = "交流标题") + private String exchangeTitle; @Schema(description = "创建时间") private LocalDateTime createdAt; - - @Schema(description = "修改时间") - private LocalDateTime updatedAt; - } diff --git a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/service/UserCommentExchangeService.java b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/service/UserCommentExchangeService.java index a064afd..c05f64b 100644 --- a/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/service/UserCommentExchangeService.java +++ b/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/caseExchange/service/UserCommentExchangeService.java @@ -60,6 +60,36 @@ public class UserCommentExchangeService { return ResponseDTO.ok(); } + /** + * 修改评论状态 + */ + public ResponseDTO updateStatus(Long commentId, Integer status) { + if (null == commentId || null == status) { + return ResponseDTO.userErrorParam("参数不能为空"); + } + + UserCommentExchangeEntity entity = new UserCommentExchangeEntity(); + entity.setCommentId(commentId); + entity.setStatus(status); + userCommentExchangeDao.updateById(entity); + return ResponseDTO.ok(); + } + + /** + * 修改置顶状态 + */ + public ResponseDTO updateTopStatus(Long commentId, Integer isTop) { + if (null == commentId || null == isTop) { + return ResponseDTO.userErrorParam("参数不能为空"); + } + + UserCommentExchangeEntity entity = new UserCommentExchangeEntity(); + entity.setCommentId(commentId); + entity.setIsTop(isTop); + userCommentExchangeDao.updateById(entity); + return ResponseDTO.ok(); + } + /** * 批量删除 */ diff --git a/sa-admin/src/main/resources/mapper/business/caseClinicalArticle/UserCommentClinicalArticleMapper.xml b/sa-admin/src/main/resources/mapper/business/caseClinicalArticle/UserCommentClinicalArticleMapper.xml index 1d587e2..37eacda 100644 --- a/sa-admin/src/main/resources/mapper/business/caseClinicalArticle/UserCommentClinicalArticleMapper.xml +++ b/sa-admin/src/main/resources/mapper/business/caseClinicalArticle/UserCommentClinicalArticleMapper.xml @@ -5,10 +5,7 @@ user_comment_clinical_article.comment_id, - user_comment_clinical_article.user_id, - user_comment_clinical_article.article_id, - user_comment_clinical_article.parent_id, - user_comment_clinical_article.root_id, + user.user_name, user_comment_clinical_article.status, user_comment_clinical_article.is_sensitive, user_comment_clinical_article.is_top, @@ -16,9 +13,8 @@ user_comment_clinical_article.is_author, user_comment_clinical_article.content, user_comment_clinical_article.content_word, - user_comment_clinical_article.comment_image, - user_comment_clinical_article.created_at, - user_comment_clinical_article.updated_at + case_clinical_article.article_title, + user_comment_clinical_article.created_at @@ -26,13 +22,26 @@ SELECT FROM user_comment_clinical_article + LEFT JOIN user ON user_comment_clinical_article.user_id = user.user_id + LEFT JOIN case_clinical_article ON user_comment_clinical_article.article_id = case_clinical_article.article_id - + - AND INSTR(user_comment_clinical_article.content,#{queryForm.keywords}) + AND ( + INSTR(user_comment_clinical_article.content, #{queryForm.keywords}) > 0 + OR INSTR(case_clinical_article.article_title, #{queryForm.keywords}) > 0 + ) + + + + AND user_comment_clinical_article.is_top = #{queryForm.isTop} + + + + AND user_comment_clinical_article.is_sensitive = #{queryForm.isSensitive} + ORDER BY user_comment_clinical_article.created_at DESC - diff --git a/sa-admin/src/main/resources/mapper/business/caseClinicalVideo/UserCommentClinicalVideoMapper.xml b/sa-admin/src/main/resources/mapper/business/caseClinicalVideo/UserCommentClinicalVideoMapper.xml index ebb9007..ea2aa0a 100644 --- a/sa-admin/src/main/resources/mapper/business/caseClinicalVideo/UserCommentClinicalVideoMapper.xml +++ b/sa-admin/src/main/resources/mapper/business/caseClinicalVideo/UserCommentClinicalVideoMapper.xml @@ -5,10 +5,7 @@ user_comment_clinical_video.comment_id, - user_comment_clinical_video.user_id, - user_comment_clinical_video.video_id, - user_comment_clinical_video.parent_id, - user_comment_clinical_video.root_id, + user.user_name, user_comment_clinical_video.status, user_comment_clinical_video.is_sensitive, user_comment_clinical_video.is_top, @@ -16,9 +13,8 @@ user_comment_clinical_video.is_author, user_comment_clinical_video.content, user_comment_clinical_video.content_word, - user_comment_clinical_video.comment_image, - user_comment_clinical_video.created_at, - user_comment_clinical_video.updated_at + case_clinical_video.video_title, + user_comment_clinical_video.created_at @@ -26,13 +22,26 @@ SELECT FROM user_comment_clinical_video + LEFT JOIN user ON user_comment_clinical_video.user_id = user.user_id + LEFT JOIN case_clinical_video ON user_comment_clinical_video.video_id = case_clinical_video.video_id - + - AND INSTR(user_comment_clinical_video.content,#{queryForm.keywords}) + AND ( + INSTR(user_comment_clinical_video.content, #{queryForm.keywords}) > 0 + OR INSTR(case_clinical_video.video_title, #{queryForm.keywords}) > 0 + ) + + + + AND user_comment_clinical_video.is_top = #{queryForm.isTop} + + + + AND user_comment_clinical_video.is_sensitive = #{queryForm.isSensitive} + ORDER BY user_comment_clinical_video.created_at DESC - diff --git a/sa-admin/src/main/resources/mapper/business/caseExchange/UserCommentExchangeMapper.xml b/sa-admin/src/main/resources/mapper/business/caseExchange/UserCommentExchangeMapper.xml index 4275a75..af8068e 100644 --- a/sa-admin/src/main/resources/mapper/business/caseExchange/UserCommentExchangeMapper.xml +++ b/sa-admin/src/main/resources/mapper/business/caseExchange/UserCommentExchangeMapper.xml @@ -5,10 +5,7 @@ user_comment_exchange.comment_id, - user_comment_exchange.user_id, - user_comment_exchange.exchange_id, - user_comment_exchange.parent_id, - user_comment_exchange.root_id, + user.user_name, user_comment_exchange.status, user_comment_exchange.is_sensitive, user_comment_exchange.is_top, @@ -16,9 +13,8 @@ user_comment_exchange.is_author, user_comment_exchange.content, user_comment_exchange.content_word, - user_comment_exchange.comment_image, - user_comment_exchange.created_at, - user_comment_exchange.updated_at + case_exchange.exchange_title, + user_comment_exchange.created_at @@ -26,13 +22,26 @@ SELECT FROM user_comment_exchange + LEFT JOIN user ON user_comment_exchange.user_id = user.user_id + LEFT JOIN case_exchange ON user_comment_exchange.exchange_id = case_exchange.exchange_id - + - AND INSTR(user_comment_exchange.content,#{queryForm.keywords}) + AND ( + INSTR(user_comment_exchange.content, #{queryForm.keywords}) > 0 + OR INSTR(case_exchange.exchange_title, #{queryForm.keywords}) > 0 + ) + + + + AND user_comment_exchange.is_top = #{queryForm.isTop} + + + + AND user_comment_exchange.is_sensitive = #{queryForm.isSensitive} + ORDER BY user_comment_exchange.created_at DESC -