Skip to content

Commit

Permalink
hotfix: GET GET /clothing-sales/products
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroom1324 committed Jul 30, 2024
1 parent a276efd commit c83f9c4
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,17 +325,9 @@ public List<GetProductByClothingSalesDto> findProductDtoByUserIdAndClothingSales
product.discountRate,
product.predictPriceDiscountRate))
.from(product)
.leftJoin(productState).on(product.id.eq(productState.productId))
.where(product.clothingSalesCount.eq(clothingSalesCount)
.and(product.isDeleted.isFalse())
.and(JPAExpressions
.select(productState.id.max())
.from(productState)
.where(productState.productId.eq(product.id))
.groupBy(productState.productId)
.eq(productState.id))
.and(productState.productStateType.eq(ProductStateType.PREPARING))
.or(productState.productStateType.eq(ProductStateType.REJECTED)))
.and(product.productState.eq(ProductStateType.PREPARING).or(product.productState.eq(ProductStateType.REJECTED))))
.distinct()
.fetch();
}
Expand Down

0 comments on commit c83f9c4

Please sign in to comment.