fix(character-image): 리스트 응답 ownedCount에 프로필(+1) 반영
프로필 이미지는 무료로 항상 열람 가능하므로 보유 개수(ownedCount)에도 프로필 1장을 포함하도록 수정했습니다. 이를 통해 전체 개수(totalCount)와 보유 개수 산정 기준이 일관되게 맞춰집니다.
This commit is contained in:
parent
2f55303d16
commit
ad69dad725
|
@ -43,7 +43,8 @@ class CharacterImageController(
|
||||||
|
|
||||||
// 전체 활성 이미지 수(프로필 제외) 파악을 위해 최소 페이지 조회
|
// 전체 활성 이미지 수(프로필 제외) 파악을 위해 최소 페이지 조회
|
||||||
val totalActiveElements = imageService.pageActiveByCharacter(characterId, PageRequest.of(0, 1)).totalElements
|
val totalActiveElements = imageService.pageActiveByCharacter(characterId, PageRequest.of(0, 1)).totalElements
|
||||||
val ownedCount = imageService.countOwnedActiveByCharacterForMember(characterId, member.id!!)
|
// 프로필 이미지는 무료로 볼 수 있으므로 보유 개수에도 +1 반영
|
||||||
|
val ownedCount = imageService.countOwnedActiveByCharacterForMember(characterId, member.id!!) + 1
|
||||||
|
|
||||||
val totalCount = totalActiveElements + 1 // 프로필 포함
|
val totalCount = totalActiveElements + 1 // 프로필 포함
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue