Updated response of communication API
This commit is contained in:
@@ -120,11 +120,17 @@ public class CommunicationDao {
|
||||
public ApplicationAmendmentResponse getAmendmentComments(Long amendmentId) {
|
||||
|
||||
ApplicationAmendmentRequestEntity amendmentData = applicationAmendmentRequestService.validateApplicationAmendmentRequest(amendmentId);
|
||||
List<CommunicationResponseBean> commentsList = communicationRepository.findCommentListDetailsByAmendmentId(amendmentId);
|
||||
List<CommunicationEntity> commentsList = communicationRepository.findByApplicationAmendmentRequestIdAndIsDeletedFalse(amendmentId);
|
||||
if (commentsList == null) {
|
||||
throw new CustomValidationException(Status.NOT_FOUND, Translator.toLocale(GepafinConstant.COMMENT_NOT_FOUND));
|
||||
}
|
||||
return new ApplicationAmendmentResponse(amendmentData, commentsList);
|
||||
List<CommunicationResponseBean> communicationResponseBeans=new ArrayList<>();
|
||||
for(CommunicationEntity communicationEntity:commentsList){
|
||||
List<DocumentResponseBean> communicationDocumentBeans=getDocumentResponseBean(communicationEntity);
|
||||
CommunicationResponseBean communicationResponseBean=convertToCommunicationResponseBean(communicationEntity,communicationDocumentBeans);
|
||||
communicationResponseBeans.add(communicationResponseBean);
|
||||
}
|
||||
return new ApplicationAmendmentResponse(amendmentData, communicationResponseBeans);
|
||||
}
|
||||
|
||||
public CommunicationResponseBean updateAmendmentComment(CommunicationRequestBean communicationRequestBean, Long amendmentId, Long commentId) {
|
||||
|
||||
Reference in New Issue
Block a user