updated code
This commit is contained in:
@@ -267,7 +267,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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user