refactoring
This commit is contained in:
@@ -87,15 +87,16 @@ public class FactureRepository implements PanacheRepositoryBase<Facture, UUID> {
|
||||
}
|
||||
|
||||
public List<Facture> findProchesEcheance(int joursAvant) {
|
||||
java.time.LocalDate dateLimite = java.time.LocalDate.now().plusDays(joursAvant);
|
||||
return list(
|
||||
"dateEcheance BETWEEN CURRENT_DATE AND CURRENT_DATE + ?1 AND actif = true ORDER BY"
|
||||
+ " dateEcheance ASC",
|
||||
joursAvant);
|
||||
"dateEcheance BETWEEN CURRENT_DATE AND ?1 AND actif = true ORDER BY dateEcheance ASC",
|
||||
dateLimite);
|
||||
}
|
||||
|
||||
public long countProchesEcheance(int joursAvant) {
|
||||
java.time.LocalDate dateLimite = java.time.LocalDate.now().plusDays(joursAvant);
|
||||
return count(
|
||||
"dateEcheance BETWEEN CURRENT_DATE AND CURRENT_DATE + ?1 AND actif = true", joursAvant);
|
||||
"dateEcheance BETWEEN CURRENT_DATE AND ?1 AND actif = true", dateLimite);
|
||||
}
|
||||
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user