@@ -25,7 +25,8 @@ public interface DockViewRepository extends JpaRepository<DockView, Long> {
|
||||
|
||||
Page<DockView> findAllByFileIdOrderByCreatedAtDesc(String fileId, Pageable pageable);
|
||||
|
||||
Page<DockView> findAllByFileId(Pageable pageable, List<String> fileId);
|
||||
@Query("SELECT dv FROM DockView dv WHERE dv.fileId IN :fileIds")
|
||||
Page<DockView> findAllByFileIds(@Param("fileIds") List<String> fileIds, Pageable pageable);
|
||||
|
||||
Page<DockView> findAllByViewerIdOrderByCreatedAtDesc(Long viewerId, Pageable pageable);
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ public class DockViewService {
|
||||
Pageable pageable = PageRequest.of(page, size,
|
||||
Sort.by(Sort.Direction.fromString(sortDirection), sortBy));
|
||||
|
||||
Page<DockView> dockViews = dockViewRepository.findAllByFileId(pageable, fileIds);
|
||||
Page<DockView> dockViews = dockViewRepository.findAllByFileIds(fileIds, pageable);
|
||||
|
||||
if (dockViews.isEmpty()) {
|
||||
return DockViewStatsResponse.builder()
|
||||
|
||||
Reference in New Issue
Block a user