diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/repository/ShopUserDutyDetailRepository.java b/eladmin-system/src/main/java/cn/ysk/cashier/repository/ShopUserDutyDetailRepository.java index 62f7c864..187c4c91 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/repository/ShopUserDutyDetailRepository.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/repository/ShopUserDutyDetailRepository.java @@ -16,7 +16,7 @@ import java.util.List; public interface ShopUserDutyDetailRepository extends JpaRepository { @Query(value = "SELECT" + - " row_number() over ( ORDER BY num DESC) AS productId, product.product_name as productName, SUM(product.num)AS num," + + " row_number() over ( ORDER BY SUM(product.num) DESC) AS productId, product.product_name as productName, SUM(product.num)AS num," + " sum(product.amount) as productNum" + " FROM" + " tb_shop_user_duty_detail AS product" + @@ -24,7 +24,6 @@ public interface ShopUserDutyDetailRepository extends JpaRepository searchByDutyId(@Param("shopId") Integer shopId, @Param("startTime") Date startTime, @Param("endTime") Date endTime ,@Param("currentPage") Integer currentPage, @Param("currentSize")Integer currentSize);