0

I am currently working on a user list requirement: all users (active and inactive) must be displayed, this list must be sorted by the most recent user edit date; so far I have done my job; However, I was recently asked for deleted users to appear at the bottom of the list. I really have no idea how to work it out, as I feel like they're mutually exclusive things. If anyone has any suggestions to fix this requirement I will be extremely grateful.

I am using Springboot, OrderBy function:

@Override
    public List<User> getAllUsers() throws SQLException {
        List<User> users = (List<User>) this.userRepository.findAllByOrderByUpdatedAt();
        return users;

    }
JulienD
  • 7,102
  • 9
  • 50
  • 84
Claudia Bermúdez
  • 125
  • 1
  • 3
  • 11

0 Answers0