Skip to content

Commit

Permalink
#26 [Update] 구현 중
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna-Jin committed Jul 19, 2022
1 parent 5e5b762 commit a04c748
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/com/mpnp/baechelin/admin/service/AdminService.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ public class AdminService {
private final UserRegisterStoreRepository userRegisterStoreRepository;

public List<AdminResponseDto> getUserRegisterStore() {
Page<UserRegisterStore> foundUserRegisterStores = userRegisterStoreRepository.findAll(Pageable.ofSize(5));
// Page<UserRegisterStore> foundUserRegisterStores = userRegisterStoreRepository.findAll(Pageable.ofSize(5));

return foundUserRegisterStores.stream().map(AdminResponseDto::new).collect(Collectors.toList());
List<UserRegisterStore> foundUserRegisterStores = userRegisterStoreRepository.findAll();
List<AdminResponseDto> result = new ArrayList<>();

for (UserRegisterStore foundUserRegisterStore : foundUserRegisterStores) {
AdminResponseDto adminResponseDto = new AdminResponseDto(foundUserRegisterStore);
result.add(adminResponseDto);
}

return result;
}
}

0 comments on commit a04c748

Please sign in to comment.