Merge pull request #107 from Kitzanos/feature/GEPAFINBE-31

GEPAFINBE-31(All action made by User must be logged)
This commit is contained in:
rbonazzo-KZ
2024-11-27 09:32:04 +01:00
committed by GitHub
74 changed files with 3324 additions and 675 deletions

View File

@@ -7,16 +7,14 @@ import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.Optional;
public interface CommunicationRepository extends JpaRepository<CommunicationEntity, Long> {
@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 = :applicationAmendmentRequestId")
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,c.senderUserId, c.receiverUserId) " + "FROM CommunicationEntity c " + "WHERE c.applicationAmendmentRequest.id = :amendmentId AND c.isDeleted = false")
".updatedDate, " + "c.applicationAmendmentRequest.id, c.senderUserId, c.receiverUserId, c.id " + ") " + "FROM CommunicationEntity c " + "WHERE c" +
".applicationAmendmentRequest.id = :amendmentId AND c.isDeleted = false")
List<CommunicationResponseBean> findCommentListDetailsByAmendmentId(@Param("amendmentId") Long amendmentId);
Optional<CommunicationEntity> findByIdAndIsDeletedFalse(Long commentId);
}

View File

@@ -0,0 +1,10 @@
package net.gepafin.tendermanagement.repositories;
import net.gepafin.tendermanagement.entities.UserActionEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface UserActionsRepository extends JpaRepository<UserActionEntity, Long> {
UserActionEntity findUserActionById(Long id);
}

View File

@@ -0,0 +1,16 @@
package net.gepafin.tendermanagement.repositories;
import net.gepafin.tendermanagement.entities.VersionHistoryEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface VersionHistoryRepository extends JpaRepository<VersionHistoryEntity, Long> {
List<VersionHistoryEntity> findVersionHistoryById(Long id);
List<VersionHistoryEntity> findVersionHistoryByUserActionIdAndUserIdNull(Long id);
List<VersionHistoryEntity> findVersionHistoryByUserActionId(Long id);
}