Skip to content

[NOOK-125] DB 전체 및 내 저장 장소 검색 API - #84

Open
dh1010a wants to merge 2 commits into
mainfrom
codex/NOOK-125
Open

[NOOK-125] DB 전체 및 내 저장 장소 검색 API#84
dh1010a wants to merge 2 commits into
mainfrom
codex/NOOK-125

Conversation

@dh1010a

@dh1010a dh1010a commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

목적

서비스 DB에 저장된 전체 장소와 로그인 사용자가 저장한 장소를 장소명·주소 부분 일치로 검색할 수 있도록 합니다.

변경 내용

  • DB 전체 장소 검색 API 추가
  • 현재 사용자가 저장한 장소 검색 API 추가
  • 장소명 또는 주소 LIKE 부분 일치 검색
  • 장소명, 장소 ID 기준 안정 정렬
  • page/size 기반 slice 페이징
  • 장소 정보, 썸네일, 대표 태그, 저장 여부 응답
  • 기존 외부 provider 장소 검색 API 유지
  • HTTP 예제와 계층별 테스트 추가

API

  • GET /api/v1/places/database/search
  • GET /api/v1/places/my/search

검증

  • ./gradlew clean check --no-daemon --no-build-cache
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31dd7806d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

val longitude: BigDecimal
val thumbnailUrl: String?
val representativeTags: String?
val bookmarked: Boolean

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Convert native bookmark values before projecting as Boolean

For any non-empty result, both native queries expose EXISTS (...) or TRUE as a MySQL numeric value, but this projection requests Boolean; Connector/J returns these expressions as Long, causing a ClassCastException when toView() reads bookmarked and turning successful searches into HTTP 500 responses. This repository already documents the same failure mode in docs/tasks/NOOK-93/README.md; project the numeric value and explicitly convert it to Boolean instead.

Useful? React with 👍 / 👎.

require(keyword.isNotEmpty()) { "Place search keyword must not be blank" }
require(query.page >= 0) { "Place search page is invalid" }
require(query.size in 1..MAX_PAGE_SIZE) { "Place search page size is invalid" }
val rows = port.searchAll(query.userId, keyword, Math.multiplyExact(query.page, query.size), query.size + 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject page values that overflow the offset

When a client supplies a nonnegative page whose page * size exceeds Int.MAX_VALUE—for example page=21474837&size=100, which passes the controller constraints—Math.multiplyExact throws ArithmeticException. GlobalExceptionHandler does not classify that as an invalid request, so both new search endpoints return HTTP 500 for validly parsed client input; bound the page/offset or calculate it in a wider type and reject out-of-range values as HTTP 400.

Useful? React with 👍 / 👎.

@kkjsw17

kkjsw17 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

이거 어떤 작업이에요??

@kkjsw17

kkjsw17 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

혹쉬 게시물에 장소 추가를 위한 검색?

@kkjsw17 kkjsw17 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

요거 잠깐 이따 리뷰함해보아용

@dh1010a

dh1010a commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

요거 잠깐 이따 리뷰함해보아용

오케잉

@kkjsw17

kkjsw17 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

요거 어떻게 정리 되었드라요

@dh1010a

dh1010a commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

이거 우선 이렇게 검색하지는 않을거같아서 pr 취소하면 될거같아

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants