Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Page<MyBook> searchMyBooksWithoutMemberId(
LEFT JOIN m.book b
LEFT JOIN m.bookLogs bl
WHERE m.memberId = :memberId
AND bl.booklogType = 'IMPRESSION'
AND (bl.booklogType = 'IMPRESSION' OR bl.booklogType IS NULL)
AND m.isReading = true
AND m.status = 'ACTIVE'""")
List<MyBook> findByMemberIdAndIsReading(UUID memberId, boolean isReading);
Expand All @@ -93,7 +93,7 @@ Page<MyBook> searchMyBooksWithoutMemberId(
LEFT JOIN m.book b
LEFT JOIN m.bookLogs bl
WHERE
bl.booklogType = 'IMPRESSION'
(bl.booklogType = 'IMPRESSION' OR bl.booklogType IS NULL)
AND m.isReading = true
AND m.status = 'ACTIVE'
""",
Expand All @@ -102,7 +102,7 @@ SELECT COUNT(m) FROM MyBook m
LEFT JOIN m.book b
LEFT JOIN m.bookLogs bl
WHERE
bl.booklogType = 'IMPRESSION'
(bl.booklogType = 'IMPRESSION' OR bl.booklogType IS NULL)
AND m.isReading = true
AND m.status = 'ACTIVE'
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public InProgressBooksRes searchInProgressBooks() {
.title(book.getTitle())
.author(authorNames)
.coverImage(book.getCoverImage())
.progress(String.format("%.2f", (double) myBook.getNowPage() / book.getPage() * 100) + "%")
.progress(String.format("%d", myBook.getNowPage() * 100 / book.getPage()))
.firstImpression(myBook.getBookLogs().isEmpty() ? null : myBook.getBookLogs().get(0).getContent())
.recentEdit(String.valueOf(myBook.getUpdatedAt()))
.build();
Expand Down