public List<ProductPagingSimpleResponse> findAllWithPagingByCategoryId(
            final Long memberId,
            final Long productId,
            final Long categoryId,
            final int pageSize
    ) {
        QProduct product = QProduct.product;
        QProductImage productImage = QProductImage.productImage;
        QMember member = QMember.member;
        QProductLike productLike = QProductLike.productLike;

        return jpaQueryFactory.select(Projections.constructor(ProductPagingSimpleResponse.class,
                        product.id,
                        new CaseBuilder()
                                .when(productImage.id.isNull())
                                .then(NOT_FOUND_IMAGE_NUMBER)
                                .otherwise(productImage.id).as("imageId"),
                        new CaseBuilder()
                                .when(productImage.uniqueName.isNull())
                                .then("null")
                                .otherwise(
                                        stringTemplate("CONCAT('https://atwozimage.s3.ap-northeast-2.amazonaws.com/', {0})", productImage.uniqueName)
                                ).as("uniqueName"),
                        product.description.location,
                        product.description.title,
                        product.price.price,
                        product.statisticCount.visitedCount,
                        product.statisticCount.contactCount,
                        product.productStatus,
                        member.id,
                        member.nickname,
                        product.statisticCount.likedCount,
                        isLikedAlreadyByMe(memberId),
                        product.createdAt
                ))
                .from(product)
                .leftJoin(member).on(product.memberId.eq(member.id))
                .leftJoin(productLike).on(productLike.productId.eq(product.id).and(productLike.memberId.eq(memberId)))
                .leftJoin(productImage).on(productImage.product.id.eq(product.id))
                .where(
                        ltProductId(productId),
                        categoryId != null ? product.categoryId.eq(categoryId) : product.categoryId.isNull()
                )
                .orderBy(product.id.desc())
                .limit(pageSize)
                .fetch();
    }
@Test
    void no_offset_페이징_두번째_조회() {
        // given
        for (long i = 1L; i <= 20L; i++) {
            productRepository.save(Product.builder()
                    .id(i)
                    .categoryId(1L)
                    .memberId(1L)
                    .description(new Description("title", "content", Location.BUILDING_CENTER))
                    .statisticCount(StatisticCount.createDefault())
                    .price(new Price(10000))
                    .productStatus(ProductStatus.WAITING)
                    .build()
            );
        }

        // when
        List<ProductPagingSimpleResponse> result = productQueryRepository.findAllWithPagingByCategoryId(1L, 11L, 1L, 10);

        // then
        assertSoftly(softly -> {
            softly.assertThat(result).hasSize(10);
            softly.assertThat(result.get(0).id()).isEqualTo(10L);
            softly.assertThat(result.get(9).id()).isEqualTo(1L);
        });
    }