Skip to content

Commit

Permalink
Added: Sort Mailing Black List by first and last name
Browse files Browse the repository at this point in the history
  • Loading branch information
djuarezgf committed Jan 7, 2025
1 parent c1d62d7 commit 31dcbfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.0.1 - 2024-12-27]
## [0.0.1 - 2025-01-07]
### Added
- First version of the project
- Spring Application
Expand Down Expand Up @@ -184,3 +184,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Annotation Ignore Project Configuration Match
- Send error email if error while sending query to bridgehead
- Mailing Black List
- Sort Mailing Black List by first and last name
4 changes: 3 additions & 1 deletion src/main/java/de/samply/user/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ public boolean isUserInMailingBlackList(@NotNull String email) throws UserServic
}

public List<User> fetchMailingBlackList(){
return userRepository.findByIsInMailingBlackListIsTrue().stream().map(DtoFactory::convert).collect(Collectors.toList());
return userRepository.findByIsInMailingBlackListIsTrue().stream().map(DtoFactory::convert)
.sorted(Comparator.comparing(User::firstName).thenComparing(User::lastName))
.collect(Collectors.toList());
}

public List<User> fetchUsersForAutocompleteInMailingBlackList(String email){
Expand Down

0 comments on commit 31dcbfe

Please sign in to comment.