Added endpoint to get all users

This commit is contained in:
harish
2024-10-16 17:12:31 +05:30
parent edd9c1cb1a
commit 38db6127f7
10 changed files with 61 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@@ -124,4 +125,10 @@ public class UserServiceImpl implements UserService {
// Calling DAO Function
return userDao.validateUser(userId);
}
@Override
@Transactional(readOnly = true)
public List<UserResponseBean> getAllUsers(Long roleId) {
// Calling DAO Function
return userDao.getAllUsers(roleId);
}
}