🎨 删除无效代码
This commit is contained in:
parent
6a1bd7869a
commit
8b09370cf2
@ -242,14 +242,11 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
|
||||
if (Objects.isNull(user)) {
|
||||
throw new BaseApiException(ErrorCode.INVALID_TOKEN);
|
||||
}
|
||||
Integer roleWeights = userService.findRoleWeightsByUser(user.getIdUser());
|
||||
if (roleWeights > ADMIN_ROLE_WEIGHTS) {
|
||||
Article article = articleMapper.selectByPrimaryKey(id);
|
||||
if (!user.getIdUser().equals(article.getArticleAuthorId())) {
|
||||
map.put("message", "非法访问!");
|
||||
return map;
|
||||
}
|
||||
}
|
||||
int result;
|
||||
// 判断是否有评论
|
||||
boolean isHavComment = articleMapper.existsCommentWithPrimaryKey(id);
|
||||
|
Loading…
Reference in New Issue
Block a user