updated code

This commit is contained in:
rajesh
2024-10-22 17:24:19 +05:30
parent 3eee4dda14
commit 4a1bd18478
2 changed files with 2 additions and 2 deletions

View File

@@ -259,7 +259,7 @@ public class CallDao {
private DocumentEntity convertToDocumentEntity(DocumentReq documentReq,Long sourceId) { private DocumentEntity convertToDocumentEntity(DocumentReq documentReq,Long sourceId) {
validateDocumentEntity(documentReq.getId()); validateDocumentEntity(documentReq.getId());
DocumentEntity documentEntity = documentRepository.findByIdAndSourceIdAndAndSourceAndIsDeletedFalse(documentReq.getId(),sourceId, DocumentSourceTypeEnum.CALL.getValue()) DocumentEntity documentEntity = documentRepository.findByIdAndSourceIdAndSourceAndIsDeletedFalse(documentReq.getId(),sourceId, DocumentSourceTypeEnum.CALL.getValue())
.orElseThrow(() -> new ResourceNotFoundException(Status.NOT_FOUND, .orElseThrow(() -> new ResourceNotFoundException(Status.NOT_FOUND,
Translator.toLocale(GepafinConstant.DOCUMENT_NOT_FOUND))); Translator.toLocale(GepafinConstant.DOCUMENT_NOT_FOUND)));
return documentEntity; return documentEntity;

View File

@@ -23,7 +23,7 @@ public interface DocumentRepository extends JpaRepository<DocumentEntity, Long>
List<DocumentEntity> findBySourceIdAndSourceAndTypeAndIsDeletedFalse(Long sourceId, String source, String type); List<DocumentEntity> findBySourceIdAndSourceAndTypeAndIsDeletedFalse(Long sourceId, String source, String type);
Optional<DocumentEntity> findByIdAndSourceIdAndAndSourceAndIsDeletedFalse(Long id, Long sourceId, String source); Optional<DocumentEntity> findByIdAndSourceIdAndSourceAndIsDeletedFalse(Long id, Long sourceId, String source);
} }