删除评论

This commit is contained in:
wucongxing8150 2025-07-30 18:22:11 +08:00
parent 0b8413ef79
commit 9964dccf68

View File

@ -240,10 +240,14 @@ public class CaseClinicalVideoService {
} }
// 检测用户是否视频作者 // 检测用户是否视频作者
if (!Objects.equals(comment.getUserId(), Long.valueOf(userId))){
// 检测用户是否文章作者
boolean isAuthor = checkUserIsVideoAuthor(String.valueOf(video.getVideoId()),userId); boolean isAuthor = checkUserIsVideoAuthor(String.valueOf(video.getVideoId()),userId);
if (!isAuthor) { if (!isAuthor) {
System.out.println(333);
return false; return false;
} }
}
// 删除评论 // 删除评论
int res = userCommentClinicalVideoDao.deleteById(comment.getCommentId()); int res = userCommentClinicalVideoDao.deleteById(comment.getCommentId());