Added an optional parameter onlyPreferredCall in the getAllCalls API to filter the response and include only preferred calls

This commit is contained in:
rajesh
2024-11-20 18:43:33 +05:30
parent b8d9ab9c46
commit 49a122aba7
9 changed files with 31 additions and 9 deletions

View File

@@ -45,4 +45,6 @@ public interface CallRepository extends JpaRepository<CallEntity, Long> {
@Query("SELECT COALESCE(SUM(c.amount), 0) FROM CallEntity c WHERE c.status = 'PUBLISH' And c.hub.id = :hubId")
BigDecimal findTotalAmountOfPublishedCallsAndHubId(@Param("hubId") Long hubId);
@Query("SELECT c FROM CallEntity c WHERE c.id IN :ids AND c.status IN :status")
List<CallEntity> findByIdInAndStatusIn(@Param("ids") List<Long> ids, @Param("status") List<String> status);
}