Skip to content

Implemented Paginated User History for Trips, Ratings, Payments, and Requests.#67

Merged
muhammadzkralla merged 6 commits into
masterfrom
develop
Jul 12, 2026
Merged

Implemented Paginated User History for Trips, Ratings, Payments, and Requests.#67
muhammadzkralla merged 6 commits into
masterfrom
develop

Conversation

@muhammadzkralla

Copy link
Copy Markdown
Member

This pull request introduces paginated endpoints for user-related data and adds new DTOs to standardize API responses, improving scalability and API consistency. The main changes include adding paginated endpoints for payments, ratings, trips, and requests, as well as introducing DTOs for payments and trips. Additionally, repository and service layers are updated to support pagination, and some DTOs are reorganized for better structure.

API Enhancements:

  • Added paginated endpoints for user payments, ratings, trips, and trip requests, replacing previous endpoints that returned entire lists. These endpoints now accept page and size parameters and return paginated results sorted by relevant fields. (PaymentController.java, RatingController.java, TripController.java, [1] [2] [3]

DTO Additions and Refactoring:

  • Introduced PaymentDto and TripDto to standardize and encapsulate payment and trip data in API responses. (PaymentDto.java, TripDto.java, [1] [2]
  • Moved RequestDto from the admin package to a new request package for better organization. [1] [2] [3]

Repository Layer Updates:

  • Added paginated query methods (findByUserId(Pageable)) to PaymentRepository, RatingRepository, RequestRepository, and updated TripRepository to support pagination. [1] [2] [3] [4]

Service Layer Updates:

  • Updated PaymentService and its implementation to provide paginated retrieval of user payments, returning PaymentDto objects. [1] [2] [3]

Dependency and Import Updates:

  • Added necessary imports for pagination and sorting (Page, Pageable, PageRequest, Sort) across controllers, repositories, and services. [1] [2] [3] [4]

These changes improve API scalability and consistency, making it easier to handle large datasets and maintain a clean separation of concerns in the codebase.

@muhammadzkralla muhammadzkralla added the enhancement New feature or request label Jul 12, 2026
@muhammadzkralla
muhammadzkralla merged commit 965b213 into master Jul 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants