8888
This commit is contained in:
parent
a16995d845
commit
89dfc5575b
@ -227,6 +227,26 @@ public class CaseClinicalArticleService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取下级评论
|
||||||
|
LambdaQueryWrapper<UserCommentClinicalArticleModel> articleQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
articleQueryWrapper.eq(UserCommentClinicalArticleModel::getRootId, comment.getCommentId());
|
||||||
|
List<UserCommentClinicalArticleModel> userCommentClinicalArticles = userCommentClinicalArticleDao.selectList(articleQueryWrapper);
|
||||||
|
for (UserCommentClinicalArticleModel m : userCommentClinicalArticles){
|
||||||
|
// 删除评论
|
||||||
|
int res = userCommentClinicalArticleDao.deleteById(m.getCommentId());
|
||||||
|
if (res <= 0){
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 减少文章的统计字段
|
||||||
|
boolean r = DecClinicalArticleStats(String.valueOf(comment.getArticleId()),2,1);
|
||||||
|
if (!r){
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 删除评论
|
// 删除评论
|
||||||
int res = userCommentClinicalArticleDao.deleteById(comment.getCommentId());
|
int res = userCommentClinicalArticleDao.deleteById(comment.getCommentId());
|
||||||
if (res <= 0){
|
if (res <= 0){
|
||||||
|
|||||||
@ -249,6 +249,26 @@ public class CaseClinicalVideoService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取下级评论
|
||||||
|
LambdaQueryWrapper<UserCommentClinicalVideoModel> videoQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
videoQueryWrapper.eq(UserCommentClinicalVideoModel::getRootId, comment.getCommentId());
|
||||||
|
List<UserCommentClinicalVideoModel> userCommentClinicalVideos = userCommentClinicalVideoDao.selectList(videoQueryWrapper);
|
||||||
|
for (UserCommentClinicalVideoModel m : userCommentClinicalVideos){
|
||||||
|
// 删除评论
|
||||||
|
int res = userCommentClinicalVideoDao.deleteById(m.getCommentId());
|
||||||
|
if (res <= 0){
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 减少文章的统计字段
|
||||||
|
boolean r = DecClinicalVideoStats(String.valueOf(comment.getVideoId()),2,1);
|
||||||
|
if (!r){
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 删除评论
|
// 删除评论
|
||||||
int res = userCommentClinicalVideoDao.deleteById(comment.getCommentId());
|
int res = userCommentClinicalVideoDao.deleteById(comment.getCommentId());
|
||||||
if (res <= 0){
|
if (res <= 0){
|
||||||
|
|||||||
@ -518,6 +518,26 @@ public class CaseExchangeService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取下级评论
|
||||||
|
LambdaQueryWrapper<UserCommentExchangeModel> exchangeQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
exchangeQueryWrapper.eq(UserCommentExchangeModel::getRootId, comment.getCommentId());
|
||||||
|
List<UserCommentExchangeModel> userCommentExchanges = userCommentExchangeDao.selectList(exchangeQueryWrapper);
|
||||||
|
for (UserCommentExchangeModel m : userCommentExchanges){
|
||||||
|
// 删除评论
|
||||||
|
int res = userCommentExchangeDao.deleteById(m.getCommentId());
|
||||||
|
if (res <= 0){
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 减少文章的统计字段
|
||||||
|
boolean r = DecCaseExchangeStats(String.valueOf(comment.getCommentId()),2,1);
|
||||||
|
if (!r){
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 删除评论
|
// 删除评论
|
||||||
int res = userCommentExchangeDao.deleteById(comment.getCommentId());
|
int res = userCommentExchangeDao.deleteById(comment.getCommentId());
|
||||||
if (res <= 0){
|
if (res <= 0){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user