This commit is contained in:
@@ -29,6 +29,10 @@ public interface FileEntityRepository extends JpaRepository<FileEntity, String>
|
||||
@Query("SELECT SUM(f.fileSize) FROM FileEntity f WHERE f.userId = :userId AND f.status = 'ACTIVE'")
|
||||
Long getTotalSizeByUserId(@Param("userId") Long userId);
|
||||
|
||||
@Query("SELECT f FROM FileEntity f WHERE f.protectionStatus = null AND f.status = 'ACTIVE' OR " +
|
||||
"f.protectionStatus = 'NOT_PROTECTED' AND f.status = 'ACTIVE'")
|
||||
List<FileEntity> findAllActiveFilesAndNotProtected();
|
||||
|
||||
@Query("SELECT f FROM FileEntity f WHERE f.userId = :userId AND f.originalFileName LIKE %:keyword%")
|
||||
List<FileEntity> searchByFileName(@Param("userId") Long userId, @Param("keyword") String keyword);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user