From fc6c8e94d5ac009d85a088f5e0e8c17acde673a5 Mon Sep 17 00:00:00 2001 From: Matthieu Bollot Date: Wed, 17 Apr 2024 11:18:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Bug(owner):=20add=20tenant=20sal?= =?UTF-8?q?ary=20to=20property=20mapper=20(#744)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/dossierfacileapiowner/property/PropertyMapper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dossierfacile-api-owner/src/main/java/fr/dossierfacile/api/dossierfacileapiowner/property/PropertyMapper.java b/dossierfacile-api-owner/src/main/java/fr/dossierfacile/api/dossierfacileapiowner/property/PropertyMapper.java index 1c1c5968e..0083a4cf3 100644 --- a/dossierfacile-api-owner/src/main/java/fr/dossierfacile/api/dossierfacileapiowner/property/PropertyMapper.java +++ b/dossierfacile-api-owner/src/main/java/fr/dossierfacile/api/dossierfacileapiowner/property/PropertyMapper.java @@ -1,7 +1,9 @@ package fr.dossierfacile.api.dossierfacileapiowner.property; +import fr.dossierfacile.common.entity.ApartmentSharing; import fr.dossierfacile.common.entity.Property; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; import org.springframework.stereotype.Component; @Component @@ -10,4 +12,7 @@ public abstract class PropertyMapper { public abstract PropertyModel toPropertyModel(Property property); + @Mapping( target="totalSalary", expression="java(apartmentSharing.totalSalary())" ) + @Mapping( target="totalGuarantorSalary", expression="java(apartmentSharing.totalGuarantorSalary())" ) + public abstract ApartmentSharingModel apartmentSharingToApartmentSharingModel(ApartmentSharing apartmentSharing); }