修改了医院处理的问题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);
}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);

View File

@ -51,6 +51,20 @@ public class UserCommentClinicalArticleController {
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")
@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<String> batchDelete(@PathVariable Long commentId) {
public ResponseDTO<String> delete(@PathVariable Long commentId) {
return userCommentClinicalArticleService.delete(commentId);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -60,6 +60,36 @@ public class UserCommentClinicalArticleService {
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);
}
@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")
@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<String> batchDelete(@PathVariable Long commentId) {
public ResponseDTO<String> delete(@PathVariable Long commentId) {
return userCommentClinicalVideoService.delete(commentId);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -60,6 +60,36 @@ public class UserCommentClinicalVideoService {
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);
}
@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")
@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<String> batchDelete(@PathVariable Long commentId) {
public ResponseDTO<String> delete(@PathVariable Long commentId) {
return userCommentExchangeService.delete(commentId);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -60,6 +60,36 @@ public class UserCommentExchangeService {
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">
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
</sql>
<!-- 分页查询 -->
@ -26,13 +22,26 @@
SELECT
<include refid="base_columns"/>
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>
<!--内容-->
<!--关键词搜索:支持评论内容、文章标题搜索-->
<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>
</where>
ORDER BY user_comment_clinical_article.created_at DESC
</select>
</mapper>

View File

@ -5,10 +5,7 @@
<!-- 查询结果列 -->
<sql id="base_columns">
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
</sql>
<!-- 分页查询 -->
@ -26,13 +22,26 @@
SELECT
<include refid="base_columns"/>
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>
<!--内容-->
<!--关键词搜索:支持评论内容、视频标题搜索-->
<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>
</where>
ORDER BY user_comment_clinical_video.created_at DESC
</select>
</mapper>

View File

@ -5,10 +5,7 @@
<!-- 查询结果列 -->
<sql id="base_columns">
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
</sql>
<!-- 分页查询 -->
@ -26,13 +22,26 @@
SELECT
<include refid="base_columns"/>
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>
<!--内容-->
<!--关键词搜索:支持评论内容、交流标题搜索-->
<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>
</where>
ORDER BY user_comment_exchange.created_at DESC
</select>
</mapper>