Skip to content

Commit

Permalink
chore : 판매량정렬 기능시 #1 issue 오류로 img 기능 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
krkarma777 committed Mar 1, 2024
1 parent 35ea59c commit 8de7455
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public interface ProductRepository extends JpaRepository<Product, Long> {
List<Product> findAllProducts();

@Query(value = "SELECT new com.bulkpurchase.domain.dto.product.ProductForSalesVolumeSortDTO" +
"(p.productID, p.productName, p.price, p.stock, p.user.username, p.imageUrls,SUM(od.quantity) , p.user)" +
"(p.productID, p.productName, p.price, p.stock, p.user.username,SUM(od.quantity) , p.user)" +
"FROM OrderDetail od JOIN od.product p " +
"WHERE p.productName LIKE %:productName% " +
"GROUP BY p.productID, p.productName, p.price, p.stock, p.user.username, p.imageUrls,od.order, p.user " +
"GROUP BY p.productID, p.productName, p.price, p.stock, p.user.username,od.order, p.user " +
"ORDER BY SUM(od.quantity) DESC",
countQuery = "SELECT COUNT(DISTINCT p.productID) " +
"FROM OrderDetail od JOIN od.product p " +
Expand Down

0 comments on commit 8de7455

Please sign in to comment.