Updated Code

This commit is contained in:
piyuskag
2024-10-27 16:07:56 +05:30
parent 452a661389
commit 90cdc9ba50
19 changed files with 574 additions and 302 deletions

View File

@@ -1,14 +0,0 @@
package net.gepafin.tendermanagement.repositories;
import net.gepafin.tendermanagement.entities.CommunicationAmendmentEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.Optional;
public interface CommunicationAmendmentRepository extends JpaRepository<CommunicationAmendmentEntity, Long> {
@Query("Select c from CommunicationAmendmentEntity c Where c.id = :id")
CommunicationAmendmentEntity findCommentsById(@Param("id") Long id);
}

View File

@@ -0,0 +1,20 @@
package net.gepafin.tendermanagement.repositories;
import net.gepafin.tendermanagement.entities.CommunicationEntity;
import net.gepafin.tendermanagement.model.response.CommunicationResponseBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
public interface CommunicationRepository extends JpaRepository<CommunicationEntity, Long> {
@Query("Select c from CommunicationEntity c Where c.id = :id")
CommunicationEntity findCommentsById(@Param("id") Long id);
@Query("SELECT new net.gepafin.tendermanagement.model.response.CommunicationResponseBean( " + "c.addedDate, c.communicationComment, c.communicationTitle, c.createdDate, c" +
".updatedDate, c.amendmentRequest.id) " + "FROM CommunicationEntity c " + "WHERE c.amendmentRequest.id = :amendmentId AND c.isDeleted = false")
List<CommunicationResponseBean> findCommentDetailsByAmendmentId(@Param("amendmentId") Long amendmentId);
}