家族消息的处理增加事务
This commit is contained in:
parent
65d5a6fbfc
commit
203cd537c3
@ -28,6 +28,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@ -46,7 +47,7 @@ public class ApplyJoinFamilyExe {
|
||||
private final FamilyMessageService familyMessageService;
|
||||
private final FamilyMemberInfoService familyMemberInfoService;
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(ApplyJoinFamilyCmd cmd) {
|
||||
String string = redisService.getString(FamilyKeys.USER_LEAVE.getKey());
|
||||
ResponseAssert.isNull(FamilyErrorCode.USER_RECENT_LEAVE, string);
|
||||
|
||||
@ -26,6 +26,7 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@ -44,6 +45,7 @@ public class FamilyMessageHandleExe {
|
||||
private final FamilyMessageService familyMessageService;
|
||||
private final FamilyMemberInfoService familyMemberInfoService;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(FamilyMessageHandleCmd cmd) {
|
||||
|
||||
isExistFamily(cmd);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user