Skip to content

Commit

Permalink
Hotfix | #81 | @lcomment | where 절 파라미터 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lcomment authored Feb 26, 2024
1 parent dbe3c8a commit 1c268a1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
56 changes: 28 additions & 28 deletions lovebird-api/src/main/resources/static/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2112,8 +2112,8 @@ <h5 id="_success_6_http_response"><a class="link" href="#_success_6_http_respons
"nickname" : "test",
"partnerNickname" : "test2",
"firstDate" : "2024-01-01",
"birthday" : "2024-02-25",
"partnerBirthday" : "2024-02-25",
"birthday" : "2024-02-26",
"partnerBirthday" : "2024-02-26",
"dayCount" : 48,
"nextAnniversary" : {
"kind" : "DAY",
Expand Down Expand Up @@ -2275,8 +2275,8 @@ <h4 id="_수정_http_request"><a class="link" href="#_수정_http_request">6.2.1
"imageUrl" : "test-image-url",
"email" : "test-email",
"nickname" : "test-nickname",
"birthday" : "2024-02-25",
"firstDate" : "2024-02-25",
"birthday" : "2024-02-26",
"firstDate" : "2024-02-26",
"gender" : "UNKNOWN"
}</code></pre>
</div>
Expand Down Expand Up @@ -3674,7 +3674,7 @@ <h3 id="_데이트_날짜_기준_다이어리_조회"><a class="link" href="#_
<h4 id="_데이트_날짜_기준_다이어리_조회_http_request"><a class="link" href="#_데이트_날짜_기준_다이어리_조회_http_request">9.2.1. HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/memory-date?memoryDate=2024-02-25 HTTP/1.1
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/memory-date?memoryDate=2024-02-26 HTTP/1.1
Authorization: Bearer access-token
Host: localhost:8080</code></pre>
</div>
Expand Down Expand Up @@ -3738,39 +3738,39 @@ <h4 id="_데이트_날짜_기준_다이어리_조회_http_response"><a class="li
"diaryId" : 1,
"userId" : 1,
"title" : "제목1",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소1",
"content" : "내용1",
"imageUrl" : "imageURL1"
}, {
"diaryId" : 2,
"userId" : 1,
"title" : "제목2",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소2",
"content" : "내용2",
"imageUrl" : "imageURL2"
}, {
"diaryId" : 3,
"userId" : 1,
"title" : "제목3",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소3",
"content" : "내용3",
"imageUrl" : "imageURL3"
}, {
"diaryId" : 4,
"userId" : 1,
"title" : "제목4",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소4",
"content" : "내용4",
"imageUrl" : "imageURL4"
}, {
"diaryId" : 5,
"userId" : 1,
"title" : "제목5",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소5",
"content" : "내용5",
"imageUrl" : "imageURL5"
Expand Down Expand Up @@ -3867,7 +3867,7 @@ <h3 id="_커서_기반_다이어리_리스트_조회"><a class="link" href="#_
<h4 id="_커서_기반_다이어리_리스트_조회_http_request"><a class="link" href="#_커서_기반_다이어리_리스트_조회_http_request">9.3.1. HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/cursor?memoryDate=2024-02-25&amp;searchType=BEFORE&amp;diaryId=-1&amp;pageSize=10 HTTP/1.1
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/cursor?memoryDate=2024-02-26&amp;searchType=BEFORE&amp;diaryId=-1&amp;pageSize=10 HTTP/1.1
Authorization: Bearer access-token
Host: localhost:8080</code></pre>
</div>
Expand Down Expand Up @@ -3943,86 +3943,86 @@ <h4 id="_커서_기반_다이어리_리스트_조회_http_response"><a class="li
"diaryId" : 1,
"userId" : 1,
"title" : "제목1",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용1",
"imageUrls" : [ ]
}, {
"diaryId" : 2,
"userId" : 2,
"title" : "제목2",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용2",
"imageUrls" : [ ]
}, {
"diaryId" : 3,
"userId" : 3,
"title" : "제목3",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용3",
"imageUrls" : [ ]
}, {
"diaryId" : 4,
"userId" : 4,
"title" : "제목4",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용4",
"imageUrls" : [ ]
}, {
"diaryId" : 5,
"userId" : 5,
"title" : "제목5",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용5",
"imageUrls" : [ ]
}, {
"diaryId" : 6,
"userId" : 6,
"title" : "제목6",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용6",
"imageUrls" : [ ]
}, {
"diaryId" : 7,
"userId" : 7,
"title" : "제목7",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용7",
"imageUrls" : [ ]
}, {
"diaryId" : 8,
"userId" : 8,
"title" : "제목8",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용8",
"imageUrls" : [ ]
}, {
"diaryId" : 9,
"userId" : 9,
"title" : "제목9",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용9",
"imageUrls" : [ ]
}, {
"diaryId" : 10,
"userId" : 10,
"title" : "제목10",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : null,
"content" : "내용10",
"imageUrls" : [ ]
} ],
"totalCount" : 10,
"diaryId" : 10,
"memoryDate" : "2024-02-25"
"memoryDate" : "2024-02-26"
}
}</code></pre>
</div>
Expand Down Expand Up @@ -4144,7 +4144,7 @@ <h4 id="_다이어리_상세_조회_http_response"><a class="link" href="#_다
"diaryId" : 1,
"userId" : 1,
"title" : "다이어리 제목",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소",
"content" : "내용",
"imageUrls" : [ ]
Expand Down Expand Up @@ -4237,7 +4237,7 @@ <h4 id="_다이어리_생성_http_request"><a class="link" href="#_다이어리_

{
"title" : "다이어리 제목",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소",
"content" : "내용",
"imageUrls" : [ "imageUrl1", "imageUrl2" ]
Expand All @@ -4251,7 +4251,7 @@ <h4 id="_다이어리_생성_request_body"><a class="link" href="#_다이어리_
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-json hljs" data-lang="json">{
"title" : "다이어리 제목",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소",
"content" : "내용",
"imageUrls" : [ "imageUrl1", "imageUrl2" ]
Expand Down Expand Up @@ -4388,7 +4388,7 @@ <h4 id="_다이어리_수정_http_request"><a class="link" href="#_다이어리_

{
"title" : "다이어리 제목 수정",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소",
"content" : "내용 수정",
"imageUrls" : [ "imageUrl1", "imageUrl2" ]
Expand All @@ -4402,7 +4402,7 @@ <h4 id="_다이어리_수정_request_body"><a class="link" href="#_다이어리_
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-json hljs" data-lang="json">{
"title" : "다이어리 제목 수정",
"memoryDate" : "2024-02-25",
"memoryDate" : "2024-02-26",
"place" : "장소",
"content" : "내용 수정",
"imageUrls" : [ "imageUrl1", "imageUrl2" ]
Expand Down Expand Up @@ -4585,7 +4585,7 @@ <h4 id="_다이어리_삭제_response_fields"><a class="link" href="#_다이어
<div id="footer">
<div id="footer-text">
Version 1.0.2-SNAPSHOT<br>
Last updated 2024-02-12 13:10:39 +0900
Last updated 2024-02-06 12:23:01 +0900
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.lovebird.domain.repository.query

import com.lovebird.domain.entity.CoupleEntry
import com.lovebird.domain.entity.QCoupleEntry.coupleEntry
import com.lovebird.domain.entity.User
import com.querydsl.core.types.dsl.BooleanExpression
import com.querydsl.jpa.impl.JPAQueryFactory
import org.springframework.stereotype.Repository
Expand All @@ -12,12 +11,12 @@ class CoupleEntryQueryRepository(
private val queryFactory: JPAQueryFactory
) {

fun findByUser(user: User): CoupleEntry? {
fun findByUserId(userId: Long): CoupleEntry? {
return queryFactory
.selectFrom(coupleEntry)
.where(eqUser(user))
.where(eqUserId(userId))
.fetchOne()
}

fun eqUser(user: User): BooleanExpression = coupleEntry.user.eq(user)
fun eqUserId(userId: Long): BooleanExpression = coupleEntry.user.id.eq(userId)
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class CoupleEntryReader(
}

fun findByUser(user: User): CoupleEntry? {
return coupleEntryQueryRepository.findByUser(user)
return coupleEntryQueryRepository.findByUserId(user.id!!)
}
}

0 comments on commit 1c268a1

Please sign in to comment.