Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(KL-163): process client requirements #61

Conversation

ohhamma
Copy link
Contributor

@ohhamma ohhamma commented Sep 4, 2024

πŸ“Œ μ—°κ΄€λœ 이슈

πŸ“ μž‘μ—… λ‚΄μš©

  • κ΅­κ°€ id둜 κΈ°λ³Έ 톡화 쑰회 κΈ°λŠ₯ κ΅¬ν˜„
  • 지역, κ΅­κ°€, λ„μ‹œ ν•œλ²ˆμ— 쑰회 κΈ°λŠ₯ κ΅¬ν˜„
  • μ•Œλ¦Ό λͺ¨λ‘ μ‚­μ œ κΈ°λŠ₯ κ΅¬ν˜„

🌳 μž‘μ—… 브랜치λͺ…

  • KL-163/ν”„λ‘ νŠΈ-μš”κ΅¬μ‚¬ν•­-처리

πŸ“Έ μŠ€ν¬λ¦°μƒ· (선택)

πŸ’¬ 리뷰 μš”κ΅¬μ‚¬ν•­ (선택)

Summary by CodeRabbit

  • New Features

    • Introduced new endpoints for marking notifications as read and deleting all notifications, enhancing notification management.
    • Added CommentNotificationResponse, NotificationUpdateResponse, and ProductNotificationResponse for improved data handling in notifications.
    • New utility classes CountryUtil and RegionUtil for better country and region data management.
  • Improvements

    • Enhanced API documentation for clarity on endpoint functionalities.
    • Updated response types in various services and controllers to provide more structured information.
  • Bug Fixes

    • Corrected endpoint paths and response structures in tests to align with new API behavior.

@ohhamma ohhamma added the ✨ Feature μƒˆλ‘œμš΄ κΈ°λŠ₯ 개발 및 μš”μ²­ label Sep 4, 2024
@ohhamma ohhamma self-assigned this Sep 4, 2024
Copy link

coderabbitai bot commented Sep 4, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes involve updates to various controllers, services, and data transfer objects (DTOs) within the application. Key modifications include enhanced API documentation, restructuring of response types for notifications, and the introduction of utility classes for managing country and region data. The updates aim to improve clarity, flexibility, and the overall organization of data handling across different components.

Changes

Files Change Summary
src/main/java/taco/klkl/domain/category/controller/category/CategoryController.java Updated @Operation annotations for clearer API documentation.
src/main/java/taco/klkl/domain/comment/dto/response/CommentNotificationResponse.java Introduced CommentNotificationResponse DTO with properties for user name, content, and creation timestamp.
src/main/java/taco/klkl/domain/comment/dto/response/CommentResponse.java Reformatted return statement in from method for improved readability.
src/main/java/taco/klkl/domain/notification/controller/NotificationController.java Modified endpoints and response types to reflect new functionality for reading and deleting notifications.
src/main/java/taco/klkl/domain/notification/dto/response/NotificationDeleteResponse.java Introduced NotificationDeleteResponse DTO for deletion results.
src/main/java/taco/klkl/domain/notification/dto/response/NotificationResponse.java Restructured NotificationResponse to include additional fields for improved detail.
src/main/java/taco/klkl/domain/notification/dto/response/NotificationUpdateResponse.java Introduced NotificationUpdateResponse DTO for update results.
src/main/java/taco/klkl/domain/notification/service/NotificationService.java Updated return types to reflect new structured responses.
src/main/java/taco/klkl/domain/notification/service/NotificationServiceImpl.java Implemented new logic for reading and deleting notifications, returning structured responses.
src/main/java/taco/klkl/domain/product/dto/response/ProductNotificationResponse.java Introduced ProductNotificationResponse DTO for product notifications.
src/main/java/taco/klkl/domain/region/controller/currency/CurrencyController.java Updated method to filter currencies by country ID.
src/main/java/taco/klkl/domain/region/controller/region/RegionController.java Updated @Operation annotations for clearer API documentation.
src/main/java/taco/klkl/domain/region/dto/response/country/CountryResponse.java Added a list of cities to CountryResponse.
src/main/java/taco/klkl/domain/region/dto/response/country/CountrySimpleResponse.java Added a list of cities to CountrySimpleResponse.
src/main/java/taco/klkl/domain/region/dto/response/region/RegionResponse.java Added a list of countries to RegionResponse.
src/main/java/taco/klkl/domain/region/service/currency/CurrencyService.java Introduced method to find currency by country ID.
src/main/java/taco/klkl/domain/region/service/currency/CurrencyServiceImpl.java Implemented method to find currency by country ID.
src/main/java/taco/klkl/global/util/CountryUtil.java Introduced utility methods for managing country data.
src/main/java/taco/klkl/global/util/RegionUtil.java Introduced utility method for transforming region data.
src/test/java/taco/klkl/domain/notification/controller/NotificationControllerTest.java Updated tests to reflect new response types and endpoint changes.
src/test/java/taco/klkl/domain/notification/integration/NotificationIntegrationTest.java Updated tests for endpoint paths and expected JSON response structures.
src/test/java/taco/klkl/domain/notification/service/NotificationServiceTest.java Updated tests to reflect new response types and assertions.

Poem

🐰
In fields of code, I hop with glee,
New changes bloom like flowers, you see!
With clearer paths and data bright,
Notifications dance in the soft moonlight.
Hooray for updates, let’s cheer and play,
For every little change makes a brighter day!
🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ohhamma
Copy link
Contributor Author

ohhamma commented Sep 4, 2024

@coderabbitai review

Copy link

coderabbitai bot commented Sep 4, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (4)
src/main/java/taco/klkl/domain/region/dto/response/country/CountrySimpleResponse.java (1)

13-13: Add a description for the cities parameter.

The @param tag for the cities field is missing a description.

-* @param cities
+* @param cities the list of cities associated with the country
src/main/java/taco/klkl/global/util/CountryUtil.java (1)

26-32: Consider refactoring the method for a more concise implementation.

The method can be slightly refactored to use method references and Stream.ofNullable for a more concise implementation.

Apply this diff to refactor the method:

-public static List<CityResponse> createCitiesByCountry(final Country country) {
-	return Optional.ofNullable(country.getCities())
-		.map(cities -> cities.stream()
-			.map(CityResponse::from)
-			.toList())
-		.orElse(Collections.emptyList());
-}
+public static List<CityResponse> createCitiesByCountry(final Country country) {
+	return Stream.ofNullable(country.getCities())
+		.flatMap(List::stream)
+		.map(CityResponse::from)
+		.toList();
+}
src/main/java/taco/klkl/domain/region/controller/currency/CurrencyController.java (1)

28-34: LGTM! Consider adding API documentation for the new parameter.

The code changes are approved. The method correctly handles the optional country_id parameter and maintains the previous functionality of retrieving all currencies when no filter is applied. The changes enhance flexibility by allowing clients to request currencies filtered by country.

To further improve the code, consider adding API documentation for the new country_id parameter using the @Parameter annotation from the io.swagger.v3.oas.annotations.Parameter package. This will provide clear documentation for clients using the API.

+import io.swagger.v3.oas.annotations.Parameter;

@Operation(summary = "λͺ¨λ“  톡화 쑰회", description = "λͺ¨λ“  톡화 λͺ©λ‘μ„ μ‘°νšŒν•©λ‹ˆλ‹€.")
@GetMapping
public List<CurrencyResponse> findCurrencies(
+	@Parameter(description = "κ΅­κ°€ ID")
	@RequestParam(name = "country_id", required = false) Long countryId
) {
	if (countryId == null) {
		return currencyService.findAllCurrencies();
	}
	return List.of(currencyService.findCurrencyByCountryId(countryId));
}
src/main/java/taco/klkl/domain/region/service/currency/CurrencyServiceImpl.java (1)

42-46: LGTM with a suggestion!

The code changes are approved.

Suggestion: Add error handling for invalid countryId.

The method assumes that the countryId is valid and that the corresponding Country entity exists in the database. If an invalid countryId is passed, it might lead to an exception.

Consider adding error handling for the case when an invalid countryId is passed. For example:

@Override
public CurrencyResponse findCurrencyByCountryId(final Long countryId) {
+	try {
		final Country country = countryUtil.findCountryEntityById(countryId);
		return CurrencyResponse.from(country.getCurrency());
+	} catch (EntityNotFoundException e) {
+		throw new IllegalArgumentException("Invalid countryId: " + countryId);
+	}
}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6ec5529 and 43d3edc.

Files selected for processing (22)
  • src/main/java/taco/klkl/domain/category/controller/category/CategoryController.java (1 hunks)
  • src/main/java/taco/klkl/domain/comment/dto/response/CommentNotificationResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/comment/dto/response/CommentResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/notification/controller/NotificationController.java (3 hunks)
  • src/main/java/taco/klkl/domain/notification/dto/response/NotificationDeleteResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/notification/dto/response/NotificationResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/notification/dto/response/NotificationUpdateResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/notification/service/NotificationService.java (1 hunks)
  • src/main/java/taco/klkl/domain/notification/service/NotificationServiceImpl.java (2 hunks)
  • src/main/java/taco/klkl/domain/product/dto/response/ProductNotificationResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/region/controller/currency/CurrencyController.java (2 hunks)
  • src/main/java/taco/klkl/domain/region/controller/region/RegionController.java (1 hunks)
  • src/main/java/taco/klkl/domain/region/dto/response/country/CountryResponse.java (3 hunks)
  • src/main/java/taco/klkl/domain/region/dto/response/country/CountrySimpleResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/region/dto/response/region/RegionResponse.java (1 hunks)
  • src/main/java/taco/klkl/domain/region/service/currency/CurrencyService.java (1 hunks)
  • src/main/java/taco/klkl/domain/region/service/currency/CurrencyServiceImpl.java (3 hunks)
  • src/main/java/taco/klkl/global/util/CountryUtil.java (1 hunks)
  • src/main/java/taco/klkl/global/util/RegionUtil.java (1 hunks)
  • src/test/java/taco/klkl/domain/notification/controller/NotificationControllerTest.java (5 hunks)
  • src/test/java/taco/klkl/domain/notification/integration/NotificationIntegrationTest.java (3 hunks)
  • src/test/java/taco/klkl/domain/notification/service/NotificationServiceTest.java (4 hunks)
Files skipped from review due to trivial changes (3)
  • src/main/java/taco/klkl/domain/category/controller/category/CategoryController.java
  • src/main/java/taco/klkl/domain/comment/dto/response/CommentResponse.java
  • src/main/java/taco/klkl/domain/region/controller/region/RegionController.java
Additional comments not posted (51)
src/main/java/taco/klkl/domain/notification/dto/response/NotificationDeleteResponse.java (1)

1-9: LGTM!

The NotificationDeleteResponse record is a well-structured and concise DTO for encapsulating the response data of a notification deletion operation. The use of a Java record is appropriate here, and the of factory method provides a convenient way to create instances of the record. The code follows Java naming conventions and is easy to understand.

The code changes are approved.

src/main/java/taco/klkl/domain/notification/dto/response/NotificationUpdateResponse.java (2)

1-5: LGTM!

The code changes are approved.


6-8: LGTM!

The code changes are approved.

src/main/java/taco/klkl/domain/region/service/currency/CurrencyService.java (1)

14-14: LGTM!

The new method findCurrencyByCountryId is a good addition to the CurrencyService interface. It enhances the functionality by allowing the retrieval of currency information based on a country ID.

The method signature is well-defined and follows the naming convention. The return type CurrencyResponse is appropriate for the use case of retrieving currency information for a specific country.

The code changes are approved.

src/main/java/taco/klkl/domain/comment/dto/response/CommentNotificationResponse.java (2)

7-11: LGTM!

The CommentNotificationResponse record is a valid Java 16 record with appropriately named and typed fields.


12-18: LGTM!

The from static factory method is a valid method that creates an instance of CommentNotificationResponse from a Comment object.

src/main/java/taco/klkl/global/util/RegionUtil.java (1)

12-18: LGTM!

The createCountriesByRegion method is well-structured and follows best practices:

  • It uses the Optional class to handle potentially null values returned by the getCountries method of the Region object.
  • It uses the Stream API to efficiently map the Country objects to CountrySimpleResponse objects.
  • It returns an empty list if the getCountries method returns null, avoiding returning null from the method.
  • The method name is clear and descriptive.
  • The method is appropriately designed as a static utility method.
src/main/java/taco/klkl/domain/region/dto/response/country/CountrySimpleResponse.java (3)

3-3: LGTM!

The import statements are correctly added for the new cities field.

Also applies to: 6-6


17-18: LGTM!

The constructor is correctly updated to include the new cities field.


23-24: Verify the CountryUtil.createCitiesByCountry method implementation.

Ensure that the CountryUtil.createCitiesByCountry method returns the correct list of cities associated with the country.

Run the following script to verify the method implementation:

Verification successful

The CountryUtil.createCitiesByCountry method is correctly implemented.

The method safely handles null values and correctly transforms city objects into CityResponse objects, returning an empty list if no cities are present.

  • Located in: src/main/java/taco/klkl/global/util/CountryUtil.java
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `CountryUtil.createCitiesByCountry` method implementation.

# Test: Search for the method implementation. Expect: The method should return the list of cities associated with the country.
ast-grep --lang java --pattern $'class CountryUtil {
  $$$
  createCitiesByCountry(Country $_) {
    $$$
  }
  $$$
}'

Length of output: 118


Script:

#!/bin/bash
# Description: Search for the `createCitiesByCountry` method across the entire codebase.

# Test: Use ripgrep to find the method definition.
rg 'createCitiesByCountry' --type java -A 5

Length of output: 1389

src/main/java/taco/klkl/domain/region/dto/response/region/RegionResponse.java (3)

3-6: LGTM!

The import statements have been correctly updated to support the changes in the RegionResponse record.


13-18: LGTM!

The RegionResponse record has been correctly updated to include the new parameter countries of type List<CountrySimpleResponse>.


22-26: LGTM!

The from method has been correctly updated to include the new parameter countries in the RegionResponse constructor. The RegionUtil.createCountriesByRegion(region) method is used to populate the countries parameter, which is a good practice to keep the from method concise.

src/main/java/taco/klkl/domain/product/dto/response/ProductNotificationResponse.java (2)

6-10: LGTM!

The code changes are approved.


11-22: LGTM!

The code changes are approved.

src/main/java/taco/klkl/domain/notification/service/NotificationService.java (4)

8-8: LGTM!

The import statement is approved.


10-10: LGTM!

The import statement is approved.


17-17: Verify the impact of the return type changes.

The return types of the readAllNotifications and readNotificationById methods have been changed to NotificationUpdateResponse. This may indicate that the methods now return more specific response types that encapsulate additional information about the notifications.

Please ensure that:

  • The NotificationUpdateResponse class is implemented correctly.
  • The changes in the return types are handled correctly in the implementation and the calling code.
  • The API documentation is updated to reflect the changes in the return types.

Also applies to: 19-19


21-21: Verify the implementation and usage of the new method.

The new deleteAllNotifications method allows for the deletion of all notifications and returns a NotificationDeleteResponse.

Please ensure that:

  • The method is implemented correctly in the NotificationServiceImpl class.
  • The NotificationDeleteResponse class is implemented correctly and provides a structured response regarding the outcome of the delete operation.
  • The new method is used correctly in the calling code, such as in the controller layer.
  • The API documentation is updated to include the new method and its usage.
src/main/java/taco/klkl/domain/notification/dto/response/NotificationResponse.java (4)

3-5: LGTM!

The import statements are approved.


10-14: LGTM!

The NotificationResponse record declaration is approved. The new structure provides more granular information about the notification.


18-22: LGTM!

The from method is approved. It correctly maps the Notification object to the new NotificationResponse structure.


Line range hint 1-26: Overall, the changes in this file are approved!

The restructuring of the NotificationResponse record enhances the clarity and specificity of the data represented by the class. The updated from method correctly maps the Notification object to the new structure. Great work!

src/main/java/taco/klkl/domain/region/dto/response/country/CountryResponse.java (4)

3-4: LGTM!

The import statement for java.util.List is necessary to use the List type for the new cities field.


7-7: LGTM!

The import statement for taco.klkl.domain.region.dto.response.city.CityResponse is necessary to use the CityResponse type for the new cities field.


9-9: LGTM!

The import statement for taco.klkl.global.util.CountryUtil is necessary to use the CountryUtil class in the from static method.


Line range hint 18-41: LGTM!

The changes to the CountryResponse record class are approved:

  • The addition of the cities field enriches the data model, enabling more comprehensive responses that include city information alongside existing country attributes.
  • The from static method correctly populates the new cities field using the CountryUtil.createCitiesByCountry(country) method.
src/main/java/taco/klkl/global/util/CountryUtil.java (1)

21-24: LGTM!

The code changes are approved.

src/main/java/taco/klkl/domain/region/service/currency/CurrencyServiceImpl.java (2)

13-16: LGTM!

The code changes are approved.


26-26: LGTM!

The code changes are approved.

src/main/java/taco/klkl/domain/notification/controller/NotificationController.java (4)

Line range hint 5-16:


36-38: LGTM!

The changes to the endpoint URL and return type improve clarity and provide a more informative response.


42-44: LGTM!

The changes to the endpoint URL and return type improve clarity and align with the new response structure.


48-52: LGTM!

The new endpoint for deleting all notifications is a useful addition to the API.

Verify the usage of the new endpoint.

Ensure that the new endpoint is being used correctly in the front-end code and any other relevant parts of the system.

Run the following script to verify the endpoint usage:

src/test/java/taco/klkl/domain/notification/integration/NotificationIntegrationTest.java (3)

48-55: LGTM!

The code changes are approved for the following reasons:

  • The method name change improves clarity and aligns with the naming convention.
  • The endpoint change follows RESTful conventions and improves clarity.
  • The assertion change focuses on the count of updated notifications, which is a more meaningful way to verify the read operation.

65-69: LGTM!

The code changes are approved for the following reasons:

  • The endpoint change clarifies the action being performed and improves clarity.
  • The assertion change focuses on the count of updated notifications, which is a more meaningful way to verify the read operation.

79-79: LGTM!

The code changes are approved as the endpoint change aligns with the changes made in the other test methods and maintains consistency.

src/main/java/taco/klkl/domain/notification/service/NotificationServiceImpl.java (4)

17-19: LGTM!

The code changes are approved.


79-84: LGTM!

The code changes are approved.


62-67: Verify the method usage in the codebase.

Ensure that all method calls to readAllNotifications are updated to handle the new return type.

Run the following script to verify the method usage:

Verification successful

All usages of readAllNotifications are consistent with the new return type.

The method readAllNotifications is correctly handled in all identified locations, with the return type NotificationUpdateResponse being used appropriately in tests and the controller.

  • NotificationServiceTest.java at line 189
  • NotificationController.java at line 39
  • NotificationControllerTest.java at line 117
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all method calls to `readAllNotifications` are updated to handle the new return type.

# Test: Search for the method usage. Expect: Only occurrences of the new return type.
ast-grep --lang java --pattern $'$_.readAllNotifications()'

Length of output: 550


72-77: Verify the method usage in the codebase.

Ensure that all method calls to readNotificationById are updated to handle the new return type.

Run the following script to verify the method usage:

Verification successful

Verify the handling of NotificationUpdateResponse in NotificationController.

Check how the NotificationUpdateResponse is processed in the NotificationController to ensure it is handled correctly.


Refine the search for method usage in NotificationController.

Refine the search to identify the specific method in NotificationController.java that calls readNotificationById and inspect how the NotificationUpdateResponse is processed.


Method usage in NotificationController is consistent with changes.

The readNotificationById method is used in NotificationController by directly returning its result, which is consistent with the changes made to the method. Ensure that any client-side handling is prepared for the NotificationUpdateResponse.

  • NotificationController.java: Directly returns NotificationUpdateResponse from readNotificationById.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all method calls to `readNotificationById` are updated to handle the new return type.

# Test: Search for the method usage. Expect: Only occurrences of the new return type.
ast-grep --lang java --pattern $'$_.readNotificationById($_)'

Length of output: 737


Script:

#!/bin/bash
# Description: Inspect the method in NotificationController that calls readNotificationById to verify handling of NotificationUpdateResponse.

# Find the method in NotificationController.java that calls readNotificationById
ast-grep --lang java --pattern $'class NotificationController { $$$ $_.readNotificationById($_); $$$ }' --json

Length of output: 114


Script:

#!/bin/bash
# Description: Refine the search to identify the specific method in NotificationController.java that calls readNotificationById.

# Search for the method definition in NotificationController.java that calls readNotificationById
rg -A 10 'readNotificationById' src/main/java/taco/klkl/domain/notification/controller/NotificationController.java

Length of output: 388

src/test/java/taco/klkl/domain/notification/controller/NotificationControllerTest.java (5)

52-53: LGTM!

The code changes are approved.


101-103: LGTM!

The code changes are approved.


116-118: LGTM!

The code changes are approved.


121-124: LGTM!

The code changes are approved.


135-142: LGTM!

The code changes are approved.

src/test/java/taco/klkl/domain/notification/service/NotificationServiceTest.java (5)

35-35: LGTM!

The import statement has been updated to use NotificationUpdateResponse, which is consistent with the changes made in the test methods.


147-148: LGTM!

The assertions have been updated to directly access the properties of NotificationUpdateResponse, which simplifies the response handling.


186-186: LGTM!

The new assertion checking the count of notifications enhances the test coverage.


189-192: LGTM!

The changes in the testReadAllNotifications method are consistent with the transition to using NotificationUpdateResponse and the focus on checking the count of updated notifications.


205-208: LGTM!

The changes in the testReadNotificationsById method are consistent with the transition to using NotificationUpdateResponse and the focus on checking the count of updated notifications.

Copy link
Contributor

@idealflower-k idealflower-k left a comment

Choose a reason for hiding this comment

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

μˆ˜μ •ν•˜λ©΄μ„œ ν”„λ‘œμ νŠΈμ˜ 완성도가 λ†’μ•„μ§€λŠ”κ±°κ°™λ„€μš”! κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€:)

Copy link

@min3m min3m left a comment

Choose a reason for hiding this comment

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

점점 μ½”λ“œκ°€ 정상화 되고 μžˆλ‹€λŠ” 생각이 λ“œλŠ”κ΅°μš” γ…‹γ…‹γ…‹γ…‹... μ§€κΈˆ μ½”λ“œ λ³΄λ‹ˆκΉŒ 쫌 많이 λΆ€λ„λŸ¬μš΄λ°μš”... ν”„λ‘ νŠΈ μš”κ΅¬ μ²˜λ¦¬ν•΄ λ†“μœΌμ‹ κ²ƒλ“€ λ‹€ ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€!! κ³ μƒλ§ŽμœΌμ…¨μ–΄μš”~~ γ…Žγ…‡γ…Œ!

@ohhamma ohhamma merged commit 5e8f458 into develop Sep 5, 2024
2 checks passed
@ohhamma ohhamma deleted the KL-163/ν”„λ‘ νŠΈ-μš”κ΅¬μ‚¬ν•­-처리 branch September 5, 2024 04:28
@ohhamma ohhamma restored the KL-163/ν”„λ‘ νŠΈ-μš”κ΅¬μ‚¬ν•­-처리 branch September 6, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature μƒˆλ‘œμš΄ κΈ°λŠ₯ 개발 및 μš”μ²­
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants