事务
This commit is contained in:
parent
311eccc94f
commit
c2c80863b7
@ -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("您的账号已被禁用!");
|
||||||
|
Loading…
Reference in New Issue
Block a user