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

Fix: 위치 기반 케이크 샵 조회 시, 클라이언트 요청 파라미터 추가 #166

Merged
merged 4 commits into from
Jul 18, 2024

Conversation

YongsHub
Copy link
Contributor

@YongsHub YongsHub commented Jul 18, 2024

Issue Number

#165

Description

  • 기존 Default 1km와 클라이언트 요청 값으로 쿼리 수정

Core Code

etc

@YongsHub YongsHub added the fix 비즈니스 로직 수정 label Jul 18, 2024
@YongsHub YongsHub requested a review from lcomment July 18, 2024 12:38
@YongsHub YongsHub self-assigned this Jul 18, 2024
Copy link

github-actions bot commented Jul 18, 2024

Test Results

195 tests  ±0   195 ✅ ±0   18s ⏱️ +2s
 33 suites ±0     0 💤 ±0 
 33 files   ±0     0 ❌ ±0 

Results for commit 301f0be. ± Comparison against base commit 8d59e38.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #166      +/-   ##
=============================================
- Coverage      85.62%   85.33%   -0.29%     
+ Complexity       308      306       -2     
=============================================
  Files            103      103              
  Lines            946      948       +2     
  Branches          36       36              
=============================================
- Hits             810      809       -1     
- Misses           116      118       +2     
- Partials          20       21       +1     
Files Coverage Δ Complexity Δ
.../dto/request/shop/SearchShopByLocationRequest.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...in/java/com/cakk/api/service/shop/ShopService.java 98.43% <100.00%> (+0.05%) 18.00 <0.00> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d59e38...301f0be. Read the comment docs.

@YongsHub YongsHub merged commit e82132e into develop Jul 18, 2024
3 checks passed
Copy link
Collaborator

@lcomment lcomment left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

Comment on lines +161 to +165
final Double distance = request.distance();
final Point point = PointMapper.supplyPointBy(latitude, longitude);

final List<CakeShopByLocationParam> result = cakeShopReader.searchShopByLocationBased(point);
final List<CakeShopByLocationParam> result = cakeShopReader
.searchShopByLocationBased(point, Objects.requireNonNullElse(distance, 1000.0));
Copy link
Collaborator

Choose a reason for hiding this comment

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

requireNonNullElse를 distance 변수 초기화 시 쓰는게 어떨까여?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

리뷰를 늦게 봤네요 ㅋㅋ 다음에 수정하겠습니다

@@ -612,7 +611,7 @@ void searchCakeShopsByKeywordWithConditions2() {
assertEquals(ReturnCode.SUCCESS.getCode(), response.getReturnCode());
assertEquals(ReturnCode.SUCCESS.getMessage(), response.getReturnMessage());

assertEquals(3, data.size());
assertThat(data.size()).isGreaterThanOrEqualTo(0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

상황에 따라 다르겠지만, 테스트 검증은 하드코딩이 좋다고 하네요.

@lcomment lcomment deleted the fix/#165 branch July 19, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 비즈니스 로직 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants