adamsaghy commented on code in PR #4632:
URL: https://github.com/apache/fineract/pull/4632#discussion_r2093222475


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformServiceImpl.java:
##########
@@ -50,54 +45,31 @@
 @RequiredArgsConstructor
 public class BusinessDateWritePlatformServiceImpl implements 
BusinessDateWritePlatformService {
 
-    private final BusinessDateDataParserAndValidator dataValidator;
     private final BusinessDateRepository repository;
     private final ConfigurationDomainService configurationDomainService;
+    private final BusinessDateUpdateRequestMapper updateRequestMapper;
+    private final BusinessDateMapper responseMapper;
 
     @Override
-    public CommandProcessingResult updateBusinessDate(@NotNull final 
JsonCommand command) {
-        BusinessDateData data = dataValidator.validateAndParseUpdate(command);
-        Map<String, Object> changes = new HashMap<>();
-        adjustDate(data, changes);
-        return new 
CommandProcessingResultBuilder().withCommandId(command.commandId()).with(changes).build();
+    public BusinessDateResponse updateBusinessDate(BusinessDateUpdateRequest 
request) {
+        BusinessDateDto businessDateDto = updateRequestMapper.map(request);

Review Comment:
   If its useless remove it... if you want to have DTO separation between API 
and Service, you need to following the above listed steps and create a couple 
extra DTO and move this transformation to the right place... 
   
   However we should avoid half baked solutions... 
   
   I leave it you and @vidakovic decide on whether this is something you are 
happy to implement or not...
   



-- 
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]

Reply via email to