vidakovic commented on code in PR #6013:
URL: https://github.com/apache/fineract/pull/6013#discussion_r3538155109
##########
fineract-rates/src/main/java/org/apache/fineract/portfolio/floatingrates/domain/FloatingRate.java:
##########
@@ -85,37 +80,14 @@ public FloatingRate(String name, boolean isBaseLendingRate,
boolean isActive, Li
}
}
- public static FloatingRate createNew(JsonCommand command) {
-
- final String name = command.stringValueOfParameterNamed("name");
- final boolean isBaseLendingRate =
command.parameterExists("isBaseLendingRate")
- &&
command.booleanPrimitiveValueOfParameterNamed("isBaseLendingRate");
- final boolean isActive = !command.parameterExists("isActive") ||
command.booleanPrimitiveValueOfParameterNamed("isActive");
- final List<FloatingRatePeriod> floatingRatePeriods =
getRatePeriods(command);
+ public static FloatingRate createNew(final FloatingRateRequest request,
final List<FloatingRatePeriod> floatingRatePeriods) {
Review Comment:
This is why we have MapStruct mappers... please don't mix domain entity
classes with DTOs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]