dev add method link
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-05 14:04:54 +07:00
parent 6d80498402
commit 352fe2c5cf
2 changed files with 3 additions and 2 deletions
@@ -25,7 +25,8 @@ public interface DockViewRepository extends JpaRepository<DockView, Long> {
Page<DockView> findAllByFileIdOrderByCreatedAtDesc(String fileId, Pageable pageable); 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); Page<DockView> findAllByViewerIdOrderByCreatedAtDesc(Long viewerId, Pageable pageable);
@@ -120,7 +120,7 @@ public class DockViewService {
Pageable pageable = PageRequest.of(page, size, Pageable pageable = PageRequest.of(page, size,
Sort.by(Sort.Direction.fromString(sortDirection), sortBy)); Sort.by(Sort.Direction.fromString(sortDirection), sortBy));
Page<DockView> dockViews = dockViewRepository.findAllByFileId(pageable, fileIds); Page<DockView> dockViews = dockViewRepository.findAllByFileIds(fileIds, pageable);
if (dockViews.isEmpty()) { if (dockViews.isEmpty()) {
return DockViewStatsResponse.builder() return DockViewStatsResponse.builder()