Fix issue related to senderUserId and receiverUserId

This commit is contained in:
rajesh
2024-11-25 12:57:05 +05:30
parent 24a1bc024f
commit bc11a40723
3 changed files with 16 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ public class CommunicationDao {
public ApplicationAmendmentResponse getAmendmentComments(Long amendmentId) {
ApplicationAmendmentRequestEntity amendmentData = applicationAmendmentRequestService.validateApplicationAmendmentRequest(amendmentId);
List<CommunicationResponseBean> commentsList = communicationRepository.findCommentDetailsByAmendmentId(amendmentId);
List<CommunicationResponseBean> commentsList = communicationRepository.findCommentListDetailsByAmendmentId(amendmentId);
if (commentsList == null) {
throw new CustomValidationException(Status.NOT_FOUND, Translator.toLocale(GepafinConstant.COMMENT_NOT_FOUND));
}

View File

@@ -31,6 +31,18 @@ public class CommunicationResponseBean {
this.amendmentId = amendmentId;
}
public CommunicationResponseBean(LocalDateTime commentedDate, String comment, String title, LocalDateTime createdDate, LocalDateTime updatedDate, Long amendmentId,Long senderUserId,Long receiverUserId) {
this.commentedDate = commentedDate;
this.comment = comment;
this.title = title;
this.createdDate = createdDate;
this.updatedDate = updatedDate;
this.amendmentId = amendmentId;
this.senderUserId = senderUserId;
this.receiverUserId = receiverUserId;
}
public CommunicationResponseBean() {
}

View File

@@ -15,7 +15,8 @@ public interface CommunicationRepository extends JpaRepository<CommunicationEnti
List<CommunicationResponseBean> findCommentsByApplicationAmendmentRequestId(@Param("applicationAmendmentRequestId") Long amendmentRequestId);
@Query("SELECT new net.gepafin.tendermanagement.model.response.CommunicationResponseBean( " + "c.commentedDate, c.communicationComment, c.communicationTitle, c.createdDate, c" +
".updatedDate, c.applicationAmendmentRequest.id) " + "FROM CommunicationEntity c " + "WHERE c.applicationAmendmentRequest.id = :amendmentId AND c.isDeleted = false")
List<CommunicationResponseBean> findCommentDetailsByAmendmentId(@Param("amendmentId") Long amendmentId);
".updatedDate, c.applicationAmendmentRequest.id,c.senderUserId, c.receiverUserId) " + "FROM CommunicationEntity c " + "WHERE c.applicationAmendmentRequest.id = :amendmentId AND c.isDeleted = false")
List<CommunicationResponseBean> findCommentListDetailsByAmendmentId(@Param("amendmentId") Long amendmentId);
}