Skip to content

Commit e18f7fc

Browse files
authored
Merge pull request #379 from RealMatchTeam/fix/378-hasMatchingTest
[FIX] hasMatchingTest 수정 (#378)
2 parents 3e96ed9 + c9f7e44 commit e18f7fc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/main/java/com/example/RealMatch/user/application/service/UserService.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.springframework.transaction.annotation.Transactional;
77

88
import com.example.RealMatch.global.exception.CustomException;
9-
import com.example.RealMatch.match.domain.repository.MatchCampaignHistoryRepository;
109
import com.example.RealMatch.user.application.util.NicknameValidator;
1110
import com.example.RealMatch.user.domain.entity.AuthenticationMethod;
1211
import com.example.RealMatch.user.domain.entity.User;
@@ -36,7 +35,6 @@
3635
public class UserService {
3736

3837
private final UserRepository userRepository;
39-
private final MatchCampaignHistoryRepository matchCampaignHistoryRepository;
4038
private final ScrapMockDataProvider scrapMockDataProvider;
4139
private final AuthenticationMethodRepository authenticationMethodRepository;
4240
private final UserMatchingDetailRepository userMatchingDetailRepository;
@@ -48,8 +46,8 @@ public MyPageResponseDto getMyPage(Long userId) {
4846
User user = userRepository.findById(userId)
4947
.orElseThrow(() -> new CustomException(UserErrorCode.USER_NOT_FOUND));
5048

51-
// 매칭 검사 여부 확인 (캠페인 매칭 검사 기록 존재 여부)
52-
boolean hasMatchingTest = matchCampaignHistoryRepository.existsByUserId(userId);
49+
// 매칭 검사 여부 확인
50+
boolean hasMatchingTest = userMatchingDetailRepository.existsByUserIdAndIsDeprecatedFalse(userId);
5351

5452
// DTO 변환 및 반환
5553
return MyPageResponseDto.from(user, hasMatchingTest);

0 commit comments

Comments
 (0)