Skip to content

Sprint Sections 17 Stage 2 Compilations#11

Merged
Naz1anmak merged 5 commits into
main_svcfrom
main_svc_compilations
Oct 18, 2025
Merged

Sprint Sections 17 Stage 2 Compilations#11
Naz1anmak merged 5 commits into
main_svcfrom
main_svc_compilations

Conversation

@internet-prodashi

Copy link
Copy Markdown
Collaborator

No description provided.

@Naz1anmak Naz1anmak changed the title The assembly module has been completed, statistics have been corrected Sprint Sections 17 Stage 2 Compilations Oct 18, 2025
@Naz1anmak Naz1anmak force-pushed the main_svc_compilations branch from 432589b to eee4acc Compare October 18, 2025 09:36
@Naz1anmak Naz1anmak added the enhancement New feature or request label Oct 18, 2025
Comment thread main-service/src/main/java/ru/practicum/event/mapper/EventMapper.java Outdated
@Naz1anmak Naz1anmak requested a review from Copilot October 18, 2025 09:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements compilation management functionality for a Spring Boot application, including admin and public endpoints for creating, updating, deleting, and retrieving compilations of events. It also adds global exception handling infrastructure to the stats service.

  • Adds complete CRUD operations for event compilations with admin and public access levels
  • Implements exception handling framework with custom BadRequestException and global error handler
  • Adds date validation for stats requests to ensure start date precedes end date

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
stats/stats-server/src/main/java/ru/practicum/exception/ErrorResponse.java Defines error response structure with request details
stats/stats-server/src/main/java/ru/practicum/exception/ErrorHandler.java Implements global exception handler for BadRequest exceptions
stats/stats-server/src/main/java/ru/practicum/exception/BadRequestException.java Creates custom runtime exception for bad requests
stats/stats-server/src/main/java/ru/practicum/controller/StatsController.java Adds date validation to prevent start date after end date
main-service/src/main/java/ru/practicum/event/mapper/EventMapper.java Adds method to map events to short DTOs without request/view counts
main-service/src/main/java/ru/practicum/compilation/service/CompilationServiceImpl.java Implements core business logic for compilation CRUD operations
main-service/src/main/java/ru/practicum/compilation/service/CompilationService.java Defines service interface for compilation operations
main-service/src/main/java/ru/practicum/compilation/repository/CompilationRepository.java Adds repository methods with custom queries for fetching compilations with events
main-service/src/main/java/ru/practicum/compilation/mapper/CompilationMapper.java Implements MapStruct mapper for compilation entity/DTO conversions
main-service/src/main/java/ru/practicum/compilation/dto/UpdateCompilationRequest.java Removes @notblank validation from title field
main-service/src/main/java/ru/practicum/compilation/dto/CompilationDto.java Changes events field type from List to Set
main-service/src/main/java/ru/practicum/compilation/controller/PublicCompilationController.java Implements public endpoints for retrieving compilations
main-service/src/main/java/ru/practicum/compilation/controller/AdminCompilationController.java Implements admin endpoints for managing compilations
.github/copilot-instructions.md Adds exclamation mark to review language instruction

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread main-service/src/main/java/ru/practicum/event/mapper/EventMapper.java Outdated
Comment thread main-service/src/main/java/ru/practicum/compilation/mapper/CompilationMapper.java Outdated
@Naz1anmak Naz1anmak force-pushed the main_svc_compilations branch from eee4acc to bd85943 Compare October 18, 2025 10:23
@Naz1anmak Naz1anmak force-pushed the main_svc_compilations branch from bd85943 to 7771179 Compare October 18, 2025 10:43
@Naz1anmak Naz1anmak merged commit 78e5c8f into main_svc Oct 18, 2025
2 checks passed
@Naz1anmak Naz1anmak deleted the main_svc_compilations branch October 18, 2025 18:29
@Naz1anmak Naz1anmak added this to the Sprint 17 Stage 2 milestone Oct 18, 2025
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.

3 participants