This commit is contained in:
linfeng 2023-08-16 10:39:03 +08:00
parent 311eccc94f
commit c2c80863b7

View File

@ -133,6 +133,7 @@ public class PostServiceImpl extends ServiceImpl<PostDao, PostEntity> implements
} }
@Override @Override
@Transactional(rollbackFor = Exception.class)
public void addCollection(AddCollectionForm request, AppUserEntity user) { public void addCollection(AddCollectionForm request, AppUserEntity user) {
Boolean collection = postCollectionService.isCollection(user.getUid(), request.getId()); Boolean collection = postCollectionService.isCollection(user.getUid(), request.getId());
if(collection){ if(collection){
@ -198,6 +199,7 @@ public class PostServiceImpl extends ServiceImpl<PostDao, PostEntity> implements
} }
@Override @Override
@Transactional(rollbackFor = Exception.class)
public void addComment(AddCommentForm request, AppUserEntity user) { public void addComment(AddCommentForm request, AppUserEntity user) {
if(user.getStatus()!=0){ if(user.getStatus()!=0){
throw new LinfengException("您的账号已被禁用!"); throw new LinfengException("您的账号已被禁用!");