diff --git a/src/main/java/com/bestoctopus/dearme/controller/MemoController.java b/src/main/java/com/bestoctopus/dearme/controller/MemoController.java index b07ffbd..254f527 100644 --- a/src/main/java/com/bestoctopus/dearme/controller/MemoController.java +++ b/src/main/java/com/bestoctopus/dearme/controller/MemoController.java @@ -56,7 +56,7 @@ public ResponseEntity getMemo(@PathVariable("memo_id") Long memo_id) { public ResponseEntity getMemoTagList(@RequestParam("tags") String tags, @RequestParam(required = false, defaultValue = "0", value = "page") Integer page) { - long[] tagList = Arrays.stream(tags.split(",")).mapToLong(Long::parseLong).toArray(); + int[] tagList = Arrays.stream(tags.split(",")).mapToInt(Integer::parseInt).toArray(); Slice memoList = memoService.getMemoTagList(tagList, page); diff --git a/src/main/java/com/bestoctopus/dearme/repository/MemoRepository.java b/src/main/java/com/bestoctopus/dearme/repository/MemoRepository.java index dd98d05..1b22a30 100644 --- a/src/main/java/com/bestoctopus/dearme/repository/MemoRepository.java +++ b/src/main/java/com/bestoctopus/dearme/repository/MemoRepository.java @@ -22,5 +22,5 @@ public interface MemoRepository extends JpaRepository { "left join fetch m.tags r " + "join m.tags t " + "where t.id in :tags") - Slice findSliceByTag(@Param("tags") long[] tags, Pageable pageable); + Slice findSliceByTag(@Param("tags") int[] tags, Pageable pageable); } \ No newline at end of file diff --git a/src/main/java/com/bestoctopus/dearme/service/MemoService.java b/src/main/java/com/bestoctopus/dearme/service/MemoService.java index 96a113e..819b221 100644 --- a/src/main/java/com/bestoctopus/dearme/service/MemoService.java +++ b/src/main/java/com/bestoctopus/dearme/service/MemoService.java @@ -38,7 +38,7 @@ public Optional getMemo(Long memo_id) { return memoRepository.findById(memo_id); } - public Slice getMemoTagList(long[] tags, Integer page) { + public Slice getMemoTagList(int[] tags, Integer page) { Pageable pageable = PageRequest.of(page, 10); Slice memo = memoRepository.findSliceByTag(tags, pageable);