diff --git a/health-services/plan-service/src/main/java/digit/repository/querybuilder/PlanQueryBuilder.java b/health-services/plan-service/src/main/java/digit/repository/querybuilder/PlanQueryBuilder.java index 892f87147e..349d08fdac 100644 --- a/health-services/plan-service/src/main/java/digit/repository/querybuilder/PlanQueryBuilder.java +++ b/health-services/plan-service/src/main/java/digit/repository/querybuilder/PlanQueryBuilder.java @@ -184,7 +184,6 @@ private String buildPlanSearchQuery(PlanSearchCriteria planSearchCriteria, List< } } - StringBuilder countQuery = new StringBuilder(); if (isCount) { @@ -197,7 +196,7 @@ private String buildPlanSearchQuery(PlanSearchCriteria planSearchCriteria, List< if (isStatusCount) { return PLAN_STATUS_COUNT_QUERY.replace("{INTERNAL_QUERY}", builder); } - System.out.println(preparedStmtList); + return builder.toString(); } @@ -211,7 +210,7 @@ private String getPaginatedQuery(String query, PlanSearchCriteria planSearchCrit // Append limit paginatedQuery.append(" LIMIT ? "); preparedStmtList.add(ObjectUtils.isEmpty(planSearchCriteria.getLimit()) ? config.getDefaultLimit() : planSearchCriteria.getLimit()); - System.out.println(preparedStmtList); + return paginatedQuery.toString(); }