- **Entries-Service Updates:** - Implemented automatic booking of fees (entry fees and late fees) during entry submission using `TeilnehmerKontoService`. - Enhanced `Bewerb` entity with financial fields (`nenngeldCent`, `nachnenngebuehrCent`). - Added Flyway migration to update `bewerbe` table with new financial fields. - Updated `EntriesServiceApplication` to include billing package scanning for integration. - **Billing-Service Enhancements:** - Adjusted `TeilnehmerKontoService` to support fetching accounts by event and person. - Improved database configuration to handle missing JDBC URLs during tests. - **Tests:** - Added integration tests to validate fee booking logic for entries, including late fee scenarios. - Introduced H2 database setup for test isolation. - **Misc:** - Updated tenant-aware transactions to support H2 and PostgreSQL dialects. - Adjusted log and error handling for robust integration between services.
3.4 KiB
3.4 KiB
| type | status | owner | last_update |
|---|---|---|---|
| Journal | ACTIVE | Curator | 2026-04-10 |
Journal Entry: 2026-04-10 - Billing Service Setup & ZNS Importer Hardening
👷 [Backend Developer] / 🏗️ [Lead Architect] / 🧹 [Curator]
Zusammenfassung der Session
In dieser Session wurde das Fundament für den Kassa-Service (billing-context) gelegt und die Robustheit des ZNS-Importers durch zusätzliche Integrationstests für Funktionäre gesteigert.
Wichtigste Ergebnisse
- Billing Service Initialisierung & API:
billing-serviceModul erstellt, konfiguriert und mitcore-domain(Serialisierung) verknüpft.- Exposed-Tabellendefinitionen (v1) für
TeilnehmerKontoundBuchungimplementiert. BillingControllermit REST-Endpunkten für Konten, Buchungen und Historie erstellt.TeilnehmerKontoServiceum API-Methoden (getKontoById,getKonto,getBuchungsHistorie,buche) erweitert.- Integrationstests (
TeilnehmerKontoServiceTest) erfolgreich mit H2-In-Memory-DB durchgeführt. - OpenAPI-Dokumentation:
documentation.yamlfürbilling-serviceerstellt und CRUD-Endpunkte für Konten und Buchungen dokumentiert.
- Entries-Integration (Neu):
- Automatische Buchung von Nenngeld und Nachnenngebühren bei Einreichung einer Nennung implementiert.
- Erweiterung der
Bewerb-Entität um Finanzfelder (nenngeld_cent,nachnenngebuehr_cent). - Neue Flyway-Migration
V8__add_bewerb_financial_fields.sqlimentries-servicehinzugefügt. NennungUseCasesnutzt nun denTeilnehmerKontoServicezur automatischen Belastung der Teilnehmerkonten (negativer Saldo).EntriesServiceApplicationscannt nun auchat.mocode.billingPakete für die Cross-Context Integration.
- ZNS-Importer Hardening:
- Erweiterung von
ZnsImportServiceTestum Tests für mehrfache Qualifikationen und die Update-Strategie (Delete+Insert) bei Funktionären (RICHT01.dat). - Alle 11 Integrationstests sind erfolgreich durchgelaufen.
- Erweiterung von
- Kompilations-Fixes (Billing):
billing-serviceauf korrekte Exposed DSL Syntax (selectAll().where { ... }) umgestellt.- Explizite
transaction { ... }Blöcke inTeilnehmerKontoServiceeingeführt. - Typ-Konsistenz für
Instant(kotlin.time) inbilling-domainzur Übereinstimmung mitcore-domainhergestellt.
Betroffene Dateien
backend/services/billing/(Neuer SCS-Kontext)backend/infrastructure/zns-importer/src/test/kotlin/at/mocode/zns/importer/ZnsImportServiceTest.kt
Nächste Schritte
- Integration des Billing-Services in den
entries-context(automatische Buchung bei Nennung). - Fix von Kompilationsfehlern und Test-Regressionen (H2/Exposed Kompatibilität).
- UI-Anbindung im Frontend für Kontenübersicht und manuelle Buchungen.
- Erweiterung der Abrechnungs-Logik (z.B. Rechnungserstellung als PDF).
Technische Details & Fixes
- Exposed / H2:
TIMESTAMPTZin Flyway-Migrationen aufTIMESTAMP WITH TIME ZONEumgestellt, um H2-Kompatibilität in Integrationstests zu gewährleisten. - Multi-Tenancy:
ExposedTenantTransactionsunterstützt nun sowohl PostgreSQL (SET search_path) als auch H2 (SET SCHEMA). - Billing Config:
BillingDatabaseConfigurationist nun robust gegen fehlende JDBC-URLs (wichtig für modularisierte Tests).
Co-authored-by: Junie junie@jetbrains.com