Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public List<SnsAccount> findByUserId(Long userId) {
}

@Override
public Optional<Long> findUserIdByAccountId(Long accountId) {
return snsAccountJpaRepository.findUserIdByAccountId(accountId);
public Optional<Long> findUserIdById(Long accountId) {
return snsAccountJpaRepository.findUserIdById(accountId);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public interface SnsAccountJpaRepository extends BaseJpaRepository<SnsAccount, L
List<SnsAccount> findByUserId(Long userId);
List<SnsAccount> findByUserIdAndType(Long userId, SnsType type);

// accountId로 userId 조회
Optional<Long> findUserIdByAccountId(Long accountId);
// accountId로 userId 조회 (id 필드가 accountId 역할)
Optional<Long> findUserIdById(Long accountId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public interface SnsAccountRepositoryPort {
long countAll();
List<SnsAccount> findByUserId(Long userId);

// accountId로 userId 조회
Optional<Long> findUserIdByAccountId(Long accountId);
// accountId로 userId 조회 (id 필드가 accountId 역할)
Optional<Long> findUserIdById(Long accountId);

void deleteById(Long id);
List<SnsAccount> findAllWithPagination(int page, int size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ private void validatePostExists(Long postId) {
* 계정 ID로 사용자 ID 조회
*/
private Long getUserIdByAccountId(Long accountId) {
return snsAccountRepositoryPort.findUserIdByAccountId(accountId)
return snsAccountRepositoryPort.findUserIdById(accountId)
.orElseThrow(() -> new BusinessException(AnalyticsErrorCode.ACCOUNT_NOT_FOUND));
}

Expand Down
Loading