修改了医院处理的问题dadasdasdfdfgfd

This commit is contained in:
wucongxing8150 2025-08-12 13:45:13 +08:00
parent 5cc3a7043c
commit 5d86e004b3
19 changed files with 236 additions and 93 deletions

View File

@ -196,6 +196,11 @@ public class CaseClinicalService {
statsCaseClinicalHospitalDao.insert(statsCaseClinicalHospital); statsCaseClinicalHospitalDao.insert(statsCaseClinicalHospital);
}else{ }else{
if (type == 1){ if (type == 1){
if (lastPushDate!=null){
statsCaseClinicalHospital.setLastPushDate(lastPushDate);
statsCaseClinicalHospitalDao.updateById(statsCaseClinicalHospital);
}
statsCaseClinicalHospitalDao.inc(statsCaseClinicalHospital.getHospitalId(),"article_num",num); statsCaseClinicalHospitalDao.inc(statsCaseClinicalHospital.getHospitalId(),"article_num",num);
}else{ }else{
statsCaseClinicalHospitalDao.inc(statsCaseClinicalHospital.getHospitalId(),"video_num",num); statsCaseClinicalHospitalDao.inc(statsCaseClinicalHospital.getHospitalId(),"video_num",num);

View File

@ -51,6 +51,20 @@ public class UserCommentClinicalArticleController {
return userCommentClinicalArticleService.update(updateForm); return userCommentClinicalArticleService.update(updateForm);
} }
@Operation(summary = "修改评论状态 @author xing")
@PostMapping("/userCommentClinicalArticle/updateStatus")
@SaCheckPermission("userCommentClinicalArticle:update")
public ResponseDTO<String> updateStatus(@RequestParam Long commentId, @RequestParam Integer status) {
return userCommentClinicalArticleService.updateStatus(commentId, status);
}
@Operation(summary = "修改置顶状态 @author xing")
@PostMapping("/userCommentClinicalArticle/updateTopStatus")
@SaCheckPermission("userCommentClinicalArticle:update")
public ResponseDTO<String> updateTopStatus(@RequestParam Long commentId, @RequestParam Integer isTop) {
return userCommentClinicalArticleService.updateTopStatus(commentId, isTop);
}
@Operation(summary = "批量删除 @author xing") @Operation(summary = "批量删除 @author xing")
@PostMapping("/userCommentClinicalArticle/batchDelete") @PostMapping("/userCommentClinicalArticle/batchDelete")
@SaCheckPermission("userCommentClinicalArticle:delete") @SaCheckPermission("userCommentClinicalArticle:delete")
@ -61,7 +75,7 @@ public class UserCommentClinicalArticleController {
@Operation(summary = "单个删除 @author xing") @Operation(summary = "单个删除 @author xing")
@GetMapping("/userCommentClinicalArticle/delete/{commentId}") @GetMapping("/userCommentClinicalArticle/delete/{commentId}")
@SaCheckPermission("userCommentClinicalArticle:delete") @SaCheckPermission("userCommentClinicalArticle:delete")
public ResponseDTO<String> batchDelete(@PathVariable Long commentId) { public ResponseDTO<String> delete(@PathVariable Long commentId) {
return userCommentClinicalArticleService.delete(commentId); return userCommentClinicalArticleService.delete(commentId);
} }
} }

View File

@ -17,7 +17,12 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class UserCommentClinicalArticleQueryForm extends PageParam { public class UserCommentClinicalArticleQueryForm extends PageParam {
@Schema(description = "内容") @Schema(description = "关键词(内容、标题)")
private String keywords; private String keywords;
@Schema(description = "是否置顶0:否 1:是)")
private Integer isTop;
@Schema(description = "是否存在敏感词0:否 1:是)")
private Integer isSensitive;
} }

View File

@ -22,7 +22,9 @@ public class UserCommentClinicalArticleUpdateForm {
@Schema(description = "评论状态0:禁用 1:正常)") @Schema(description = "评论状态0:禁用 1:正常)")
private Integer status; private Integer status;
@Schema(description = "是否置顶0:否 1:是)")
private Integer isTop;
@Schema(description = "评论内容") @Schema(description = "评论内容")
private String content; private String content;
} }

View File

@ -15,21 +15,11 @@ import lombok.Data;
@Data @Data
public class UserCommentClinicalArticleVO { public class UserCommentClinicalArticleVO {
@Schema(description = "主键id") @Schema(description = "主键id")
private Long commentId; private Long commentId;
@Schema(description = "用户id") @Schema(description = "用户名称")
private Long userId; private String userName;
@Schema(description = "临床文章id")
private Long articleId;
@Schema(description = "父级id一级评论为null")
private Long parentId;
@Schema(description = "根评论id一级评论时为null。其余为一级评论id")
private Long rootId;
@Schema(description = "评论状态0:禁用 1:正常)") @Schema(description = "评论状态0:禁用 1:正常)")
private Integer status; private Integer status;
@ -52,13 +42,9 @@ public class UserCommentClinicalArticleVO {
@Schema(description = "评论内容(原版)") @Schema(description = "评论内容(原版)")
private String contentWord; private String contentWord;
@Schema(description = "评论图片") @Schema(description = "文章标题")
private String commentImage; private String articleTitle;
@Schema(description = "创建时间") @Schema(description = "创建时间")
private LocalDateTime createdAt; private LocalDateTime createdAt;
@Schema(description = "修改时间")
private LocalDateTime updatedAt;
} }

View File

@ -60,6 +60,36 @@ public class UserCommentClinicalArticleService {
return ResponseDTO.ok(); return ResponseDTO.ok();
} }
/**
* 修改评论状态
*/
public ResponseDTO<String> 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<String> 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();
}
/** /**
* 批量删除 * 批量删除
*/ */

View File

@ -51,6 +51,20 @@ public class UserCommentClinicalVideoController {
return userCommentClinicalVideoService.update(updateForm); return userCommentClinicalVideoService.update(updateForm);
} }
@Operation(summary = "修改评论状态 @author xing")
@PostMapping("/userCommentClinicalVideo/updateStatus")
@SaCheckPermission("userCommentClinicalVideo:update")
public ResponseDTO<String> updateStatus(@RequestParam Long commentId, @RequestParam Integer status) {
return userCommentClinicalVideoService.updateStatus(commentId, status);
}
@Operation(summary = "修改置顶状态 @author xing")
@PostMapping("/userCommentClinicalVideo/updateTopStatus")
@SaCheckPermission("userCommentClinicalVideo:update")
public ResponseDTO<String> updateTopStatus(@RequestParam Long commentId, @RequestParam Integer isTop) {
return userCommentClinicalVideoService.updateTopStatus(commentId, isTop);
}
@Operation(summary = "批量删除 @author xing") @Operation(summary = "批量删除 @author xing")
@PostMapping("/userCommentClinicalVideo/batchDelete") @PostMapping("/userCommentClinicalVideo/batchDelete")
@SaCheckPermission("userCommentClinicalVideo:delete") @SaCheckPermission("userCommentClinicalVideo:delete")
@ -61,7 +75,7 @@ public class UserCommentClinicalVideoController {
@Operation(summary = "单个删除 @author xing") @Operation(summary = "单个删除 @author xing")
@GetMapping("/userCommentClinicalVideo/delete/{commentId}") @GetMapping("/userCommentClinicalVideo/delete/{commentId}")
@SaCheckPermission("userCommentClinicalVideo:delete") @SaCheckPermission("userCommentClinicalVideo:delete")
public ResponseDTO<String> batchDelete(@PathVariable Long commentId) { public ResponseDTO<String> delete(@PathVariable Long commentId) {
return userCommentClinicalVideoService.delete(commentId); return userCommentClinicalVideoService.delete(commentId);
} }
} }

View File

@ -17,7 +17,12 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class UserCommentClinicalVideoQueryForm extends PageParam { public class UserCommentClinicalVideoQueryForm extends PageParam {
@Schema(description = "内容") @Schema(description = "关键词(内容、标题)")
private String keywords; private String keywords;
@Schema(description = "是否置顶0:否 1:是)")
private Integer isTop;
@Schema(description = "是否存在敏感词0:否 1:是)")
private Integer isSensitive;
} }

View File

@ -22,7 +22,9 @@ public class UserCommentClinicalVideoUpdateForm {
@Schema(description = "评论状态0:禁用 1:正常)") @Schema(description = "评论状态0:禁用 1:正常)")
private Integer status; private Integer status;
@Schema(description = "是否置顶0:否 1:是)")
private Integer isTop;
@Schema(description = "评论内容") @Schema(description = "评论内容")
private String content; private String content;
} }

View File

@ -15,21 +15,11 @@ import lombok.Data;
@Data @Data
public class UserCommentClinicalVideoVO { public class UserCommentClinicalVideoVO {
@Schema(description = "主键id") @Schema(description = "主键id")
private Long commentId; private Long commentId;
@Schema(description = "用户id") @Schema(description = "用户名称")
private Long userId; private String userName;
@Schema(description = "临床视频id")
private Long videoId;
@Schema(description = "父级id一级评论为null")
private Long parentId;
@Schema(description = "根评论id一级评论时为null。其余为一级评论id")
private Long rootId;
@Schema(description = "评论状态0:禁用 1:正常)") @Schema(description = "评论状态0:禁用 1:正常)")
private Integer status; private Integer status;
@ -52,13 +42,9 @@ public class UserCommentClinicalVideoVO {
@Schema(description = "评论内容(原版)") @Schema(description = "评论内容(原版)")
private String contentWord; private String contentWord;
@Schema(description = "评论图片") @Schema(description = "视频标题")
private String commentImage; private String videoTitle;
@Schema(description = "创建时间") @Schema(description = "创建时间")
private LocalDateTime createdAt; private LocalDateTime createdAt;
@Schema(description = "修改时间")
private LocalDateTime updatedAt;
} }

View File

@ -60,6 +60,36 @@ public class UserCommentClinicalVideoService {
return ResponseDTO.ok(); return ResponseDTO.ok();
} }
/**
* 修改评论状态
*/
public ResponseDTO<String> 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<String> 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();
}
/** /**
* 批量删除 * 批量删除
*/ */

View File

@ -51,6 +51,20 @@ public class UserCommentExchangeController {
return userCommentExchangeService.update(updateForm); return userCommentExchangeService.update(updateForm);
} }
@Operation(summary = "修改评论状态 @author xing")
@PostMapping("/userCommentExchange/updateStatus")
@SaCheckPermission("userCommentExchange:update")
public ResponseDTO<String> updateStatus(@RequestParam Long commentId, @RequestParam Integer status) {
return userCommentExchangeService.updateStatus(commentId, status);
}
@Operation(summary = "修改置顶状态 @author xing")
@PostMapping("/userCommentExchange/updateTopStatus")
@SaCheckPermission("userCommentExchange:update")
public ResponseDTO<String> updateTopStatus(@RequestParam Long commentId, @RequestParam Integer isTop) {
return userCommentExchangeService.updateTopStatus(commentId, isTop);
}
@Operation(summary = "批量删除 @author xing") @Operation(summary = "批量删除 @author xing")
@PostMapping("/userCommentExchange/batchDelete") @PostMapping("/userCommentExchange/batchDelete")
@SaCheckPermission("userCommentExchange:delete") @SaCheckPermission("userCommentExchange:delete")
@ -61,7 +75,7 @@ public class UserCommentExchangeController {
@Operation(summary = "单个删除 @author xing") @Operation(summary = "单个删除 @author xing")
@GetMapping("/userCommentExchange/delete/{commentId}") @GetMapping("/userCommentExchange/delete/{commentId}")
@SaCheckPermission("userCommentExchange:delete") @SaCheckPermission("userCommentExchange:delete")
public ResponseDTO<String> batchDelete(@PathVariable Long commentId) { public ResponseDTO<String> delete(@PathVariable Long commentId) {
return userCommentExchangeService.delete(commentId); return userCommentExchangeService.delete(commentId);
} }
} }

View File

@ -17,7 +17,12 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class UserCommentExchangeQueryForm extends PageParam { public class UserCommentExchangeQueryForm extends PageParam {
@Schema(description = "内容") @Schema(description = "关键词(内容、标题)")
private String keywords; private String keywords;
@Schema(description = "是否置顶0:否 1:是)")
private Integer isTop;
@Schema(description = "是否存在敏感词0:否 1:是)")
private Integer isSensitive;
} }

View File

@ -22,7 +22,9 @@ public class UserCommentExchangeUpdateForm {
@Schema(description = "评论状态0:禁用 1:正常)") @Schema(description = "评论状态0:禁用 1:正常)")
private Integer status; private Integer status;
@Schema(description = "是否置顶0:否 1:是)")
private Integer isTop;
@Schema(description = "评论内容") @Schema(description = "评论内容")
private String content; private String content;
} }

View File

@ -15,21 +15,11 @@ import lombok.Data;
@Data @Data
public class UserCommentExchangeVO { public class UserCommentExchangeVO {
@Schema(description = "主键id") @Schema(description = "主键id")
private Long commentId; private Long commentId;
@Schema(description = "用户id") @Schema(description = "用户名称")
private Long userId; private String userName;
@Schema(description = "病例交流id")
private Long exchangeId;
@Schema(description = "父级id一级评论为null")
private Long parentId;
@Schema(description = "根评论id一级评论时为null。其余为一级评论id")
private Long rootId;
@Schema(description = "评论状态0:禁用 1:正常)") @Schema(description = "评论状态0:禁用 1:正常)")
private Integer status; private Integer status;
@ -52,13 +42,9 @@ public class UserCommentExchangeVO {
@Schema(description = "评论内容(原版)") @Schema(description = "评论内容(原版)")
private String contentWord; private String contentWord;
@Schema(description = "评论图片") @Schema(description = "交流标题")
private String commentImage; private String exchangeTitle;
@Schema(description = "创建时间") @Schema(description = "创建时间")
private LocalDateTime createdAt; private LocalDateTime createdAt;
@Schema(description = "修改时间")
private LocalDateTime updatedAt;
} }

View File

@ -60,6 +60,36 @@ public class UserCommentExchangeService {
return ResponseDTO.ok(); return ResponseDTO.ok();
} }
/**
* 修改评论状态
*/
public ResponseDTO<String> 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<String> 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();
}
/** /**
* 批量删除 * 批量删除
*/ */

View File

@ -5,10 +5,7 @@
<!-- 查询结果列 --> <!-- 查询结果列 -->
<sql id="base_columns"> <sql id="base_columns">
user_comment_clinical_article.comment_id, user_comment_clinical_article.comment_id,
user_comment_clinical_article.user_id, user.user_name,
user_comment_clinical_article.article_id,
user_comment_clinical_article.parent_id,
user_comment_clinical_article.root_id,
user_comment_clinical_article.status, user_comment_clinical_article.status,
user_comment_clinical_article.is_sensitive, user_comment_clinical_article.is_sensitive,
user_comment_clinical_article.is_top, user_comment_clinical_article.is_top,
@ -16,9 +13,8 @@
user_comment_clinical_article.is_author, user_comment_clinical_article.is_author,
user_comment_clinical_article.content, user_comment_clinical_article.content,
user_comment_clinical_article.content_word, user_comment_clinical_article.content_word,
user_comment_clinical_article.comment_image, case_clinical_article.article_title,
user_comment_clinical_article.created_at, user_comment_clinical_article.created_at
user_comment_clinical_article.updated_at
</sql> </sql>
<!-- 分页查询 --> <!-- 分页查询 -->
@ -26,13 +22,26 @@
SELECT SELECT
<include refid="base_columns"/> <include refid="base_columns"/>
FROM user_comment_clinical_article 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
<where> <where>
<!--内容--> <!--关键词搜索:支持评论内容、文章标题搜索-->
<if test="queryForm.keywords != null and queryForm.keywords != ''"> <if test="queryForm.keywords != null and queryForm.keywords != ''">
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
)
</if>
<!--是否置顶-->
<if test="queryForm.isTop != null">
AND user_comment_clinical_article.is_top = #{queryForm.isTop}
</if>
<!--是否存在敏感词-->
<if test="queryForm.isSensitive != null">
AND user_comment_clinical_article.is_sensitive = #{queryForm.isSensitive}
</if> </if>
</where> </where>
ORDER BY user_comment_clinical_article.created_at DESC
</select> </select>
</mapper> </mapper>

View File

@ -5,10 +5,7 @@
<!-- 查询结果列 --> <!-- 查询结果列 -->
<sql id="base_columns"> <sql id="base_columns">
user_comment_clinical_video.comment_id, user_comment_clinical_video.comment_id,
user_comment_clinical_video.user_id, user.user_name,
user_comment_clinical_video.video_id,
user_comment_clinical_video.parent_id,
user_comment_clinical_video.root_id,
user_comment_clinical_video.status, user_comment_clinical_video.status,
user_comment_clinical_video.is_sensitive, user_comment_clinical_video.is_sensitive,
user_comment_clinical_video.is_top, user_comment_clinical_video.is_top,
@ -16,9 +13,8 @@
user_comment_clinical_video.is_author, user_comment_clinical_video.is_author,
user_comment_clinical_video.content, user_comment_clinical_video.content,
user_comment_clinical_video.content_word, user_comment_clinical_video.content_word,
user_comment_clinical_video.comment_image, case_clinical_video.video_title,
user_comment_clinical_video.created_at, user_comment_clinical_video.created_at
user_comment_clinical_video.updated_at
</sql> </sql>
<!-- 分页查询 --> <!-- 分页查询 -->
@ -26,13 +22,26 @@
SELECT SELECT
<include refid="base_columns"/> <include refid="base_columns"/>
FROM user_comment_clinical_video 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
<where> <where>
<!--内容--> <!--关键词搜索:支持评论内容、视频标题搜索-->
<if test="queryForm.keywords != null and queryForm.keywords != ''"> <if test="queryForm.keywords != null and queryForm.keywords != ''">
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
)
</if>
<!--是否置顶-->
<if test="queryForm.isTop != null">
AND user_comment_clinical_video.is_top = #{queryForm.isTop}
</if>
<!--是否存在敏感词-->
<if test="queryForm.isSensitive != null">
AND user_comment_clinical_video.is_sensitive = #{queryForm.isSensitive}
</if> </if>
</where> </where>
ORDER BY user_comment_clinical_video.created_at DESC
</select> </select>
</mapper> </mapper>

View File

@ -5,10 +5,7 @@
<!-- 查询结果列 --> <!-- 查询结果列 -->
<sql id="base_columns"> <sql id="base_columns">
user_comment_exchange.comment_id, user_comment_exchange.comment_id,
user_comment_exchange.user_id, user.user_name,
user_comment_exchange.exchange_id,
user_comment_exchange.parent_id,
user_comment_exchange.root_id,
user_comment_exchange.status, user_comment_exchange.status,
user_comment_exchange.is_sensitive, user_comment_exchange.is_sensitive,
user_comment_exchange.is_top, user_comment_exchange.is_top,
@ -16,9 +13,8 @@
user_comment_exchange.is_author, user_comment_exchange.is_author,
user_comment_exchange.content, user_comment_exchange.content,
user_comment_exchange.content_word, user_comment_exchange.content_word,
user_comment_exchange.comment_image, case_exchange.exchange_title,
user_comment_exchange.created_at, user_comment_exchange.created_at
user_comment_exchange.updated_at
</sql> </sql>
<!-- 分页查询 --> <!-- 分页查询 -->
@ -26,13 +22,26 @@
SELECT SELECT
<include refid="base_columns"/> <include refid="base_columns"/>
FROM user_comment_exchange 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
<where> <where>
<!--内容--> <!--关键词搜索:支持评论内容、交流标题搜索-->
<if test="queryForm.keywords != null and queryForm.keywords != ''"> <if test="queryForm.keywords != null and queryForm.keywords != ''">
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
)
</if>
<!--是否置顶-->
<if test="queryForm.isTop != null">
AND user_comment_exchange.is_top = #{queryForm.isTop}
</if>
<!--是否存在敏感词-->
<if test="queryForm.isSensitive != null">
AND user_comment_exchange.is_sensitive = #{queryForm.isSensitive}
</if> </if>
</where> </where>
ORDER BY user_comment_exchange.created_at DESC
</select> </select>
</mapper> </mapper>