class AisConsentUsageService {

    @Transactional
    public void resetUsage(ConsentEntity consent) {
        List<AisConsentUsage> aisConsentUsageList = aisConsentUsageRepository.findReadByConsentAndUsageDate(consent, LocalDate.now());
        aisConsentUsageList.forEach(acu -> acu.setUsage(0));
        aisConsentUsageRepository.saveAll(aisConsentUsageList);
    }

}