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