-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/sw 38 - DB 마이그레이션 (MySQL → PostgreSQL) #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e6739f5
4856d7f
64cf206
1cd3671
83f1789
fef5873
a1ea3ce
f17b23e
f316145
21f5792
14d5f74
4ba6e94
3916d15
f7c3a55
7fd31f3
7d66739
76d4b86
cd740a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,26 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version: '3.8' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial
Docker Compose V2부터 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| services: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| postgres: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image: postgres:16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| container_name: searchweb-db | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| POSTGRES_DB: ${POSTGRES_DB} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| POSTGRES_USER: ${POSTGRES_USER} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TZ: Asia/Seoul | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "5432:5432" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - postgres_data:/var/lib/postgresql/data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - ./src/main/resources/db/init.sql:/docker-entrypoint-initdb.d/init.sql | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| networks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - searchweb-network | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| restart: always | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial PostgreSQL 컨테이너에 애플리케이션이 이 컨테이너에 의존하는 경우, healthcheck 없이는 DB가 준비되기 전에 연결을 시도할 수 있습니다. ♻️ healthcheck 추가 제안 restart: always
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
+ interval: 10s
+ timeout: 5s
+ retries: 5📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| networks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| searchweb-network: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| driver: bridge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| postgres_data: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,11 @@ | |
| import java.util.Arrays; | ||
| import java.util.Objects; | ||
|
|
||
| /** | ||
| * OwnerCheckAspect | ||
| * | ||
| * 리소스 소유자 검증 AOP | ||
| */ | ||
| @Aspect | ||
| @Slf4j(topic = "[OwnerCheckAspect]") | ||
| @Component | ||
|
|
@@ -34,14 +39,14 @@ public class OwnerCheckAspect { | |
| @Before("@annotation(ownerCheck)") | ||
| public void validateOwner(JoinPoint joinPoint, OwnerCheck ownerCheck) { | ||
| // 접근 검증 대상 리소스의 ID 추출 | ||
| Integer targetId = extractTargetIdFromParams(joinPoint, ownerCheck.idParam()); | ||
| Long targetId = extractTargetIdFromParams(joinPoint, ownerCheck.idParam()); | ||
|
|
||
| // 현재 로그인한 사용자의 memberId 추출 | ||
| Authentication auth = validateAuthenticatedUser(); | ||
| Integer currentUserId = extractMemberId(auth); | ||
| Long currentUserId = extractMemberId(auth); | ||
|
|
||
| // 서비스 이름에 따라 리소스 작성자 memberId 조회 | ||
| Integer ownerId = findOwnerIdByServiceName(ownerCheck.service(), targetId); | ||
| Long ownerId = findOwnerIdByServiceName(ownerCheck.service(), targetId); | ||
|
|
||
| // 현재 사용자와 리소스 소유자 검증 | ||
| if (!Objects.equals(currentUserId, ownerId)) { | ||
|
|
@@ -54,29 +59,30 @@ public void validateOwner(JoinPoint joinPoint, OwnerCheck ownerCheck) { | |
|
|
||
|
|
||
| /** | ||
| * 접근 검증 대상이 되는 리소스의 ID를 파라미터 이름(idParam)을 통해 찾아 Integer로 반환 | ||
| * 접근 검증 대상이 되는 리소스의 ID를 파라미터 이름(idParam)을 통해 찾아 Long으로 반환 | ||
| * ex) @OwnerCheck(idParam = "boardId", ...) -> 메서드의 boardId 값을 찾아 사용 | ||
| * | ||
| * @param joinPoint 현재 실행된 메서드의 실행 정보 | ||
| * @param idParam 검증 대상 리소스 ID의 파라미터 이름 (예: "boardId" 문자열) | ||
| * @return 접근 검증 대상이 되는 리소스의 ID 값 | ||
| */ | ||
| private Integer extractTargetIdFromParams(JoinPoint joinPoint, String idParam) { | ||
| private Long extractTargetIdFromParams(JoinPoint joinPoint, String idParam) { | ||
| Object[] args = joinPoint.getArgs(); // 메서드 실제 인자 값 배열 | ||
| MethodSignature signature = (MethodSignature) joinPoint.getSignature(); | ||
| String[] paramNames = signature.getParameterNames(); // 메서드 파라미터 이름 배열 | ||
|
|
||
| for (int i = 0; i < paramNames.length; i++) { | ||
| if (paramNames[i].equals(idParam)) { | ||
| return Integer.parseInt(args[i].toString()); | ||
| // Integer나 Long 모두 지원하도록 String으로 변환 후 parse | ||
| return Long.parseLong(args[i].toString()); | ||
| } | ||
| } | ||
| log.error("{}' 파라미터를 찾을 수 없음. 실제 파라미터: {}", idParam, Arrays.toString(paramNames)); | ||
| throw new IllegalArgumentException("요청 파라미터에서 ID를 찾을 수 없습니다."); | ||
| } | ||
|
Comment on lines
+69
to
82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 77에서 🛡️ 수정 제안 for (int i = 0; i < paramNames.length; i++) {
if (paramNames[i].equals(idParam)) {
- // Integer나 Long 모두 지원하도록 String으로 변환 후 parse
- return Long.parseLong(args[i].toString());
+ if (args[i] == null) {
+ throw new IllegalArgumentException("ID 파라미터 '" + idParam + "'가 null입니다.");
+ }
+ return Long.parseLong(args[i].toString());
}
}🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| // SecurityContext 에서 인증된 사용자 반한 | ||
| // SecurityContext 에서 인증된 사용자 반환 | ||
| private Authentication validateAuthenticatedUser() { | ||
| Authentication auth = SecurityContextHolder.getContext().getAuthentication(); | ||
| if (auth == null || !auth.isAuthenticated() || "anonymousUser".equals(auth.getPrincipal())) { | ||
|
|
@@ -87,8 +93,8 @@ private Authentication validateAuthenticatedUser() { | |
| } | ||
|
|
||
|
|
||
| // 인증 객체에서 현재 로그인한 사용자 memberId 추출 | ||
| private Integer extractMemberId(Authentication auth) { | ||
| // 인증 객체에서 현재 로그인한 사용자 memberId 추출 (Long 반환) | ||
| private Long extractMemberId(Authentication auth) { | ||
| Object principal = auth.getPrincipal(); | ||
| if (principal instanceof CustomUserDetails u) return u.getMemberId(); | ||
| if (principal instanceof CustomOAuth2User u) return u.getMemberId(); | ||
|
|
@@ -98,11 +104,11 @@ private Integer extractMemberId(Authentication auth) { | |
|
|
||
|
|
||
| // 서비스 이름에 따라 해당 리소스의 작성자 조회 | ||
| private Integer findOwnerIdByServiceName(String service, Integer targetId) { | ||
| private Long findOwnerIdByServiceName(String service, Long targetId) { | ||
| return switch (service) { | ||
| case "boardService" -> boardService.findMemberIdByBoardId(targetId); | ||
| case "commentService" -> commentService.findMemberIdByCommentId(targetId); | ||
| case "memberService" -> targetId; | ||
| case "memberService" -> targetId; // memberService의 경우 targetId가 곧 memberId | ||
| default -> { | ||
| log.error("지원하지 않는 서비스명 '{}'", service); | ||
| throw new IllegalArgumentException("지원하지 않는 서비스명입니다."); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,18 +25,9 @@ | |||||
| import java.util.Map; | ||||||
|
|
||||||
| /** | ||||||
| * 코드 작성자: | ||||||
| * - 서진영(jin2304) | ||||||
| * | ||||||
| * 코드 설명: | ||||||
| * - BoardController는 게시판 및 게시글 관련 기능을 처리하는 컨트롤러 | ||||||
| * | ||||||
| * 코드 주요 기능: | ||||||
| * - 게시글 등록, 게시글 목록 조회(검색어, 최신순/인기순), 게시글 단일(상세) 조회, 게시글 수정, 게시글 삭제 | ||||||
| * - 게시글 좋아요/북마크 추가 및 취소 | ||||||
| * | ||||||
| * 코드 작성일: | ||||||
| * - 2024.08.24 ~ 2024.09.05 | ||||||
| * BoardController (Legacy - PostgreSQL) | ||||||
| * | ||||||
| * 게시판 및 게시글 관련 기능을 처리하는 컨트롤러 | ||||||
| */ | ||||||
| @Controller | ||||||
| public class BoardController { | ||||||
|
|
@@ -55,15 +46,6 @@ public BoardController(BoardService boardservice, MemberService memberservice, L | |||||
| } | ||||||
|
|
||||||
|
|
||||||
| /** | ||||||
| * 게시글 생성 | ||||||
| */ | ||||||
| @PostMapping("/board/{memberId}/post") | ||||||
| public String insertBoard(@PathVariable int memberId, BoardDto boardDto){ | ||||||
| int result = boardservice.insertBoard(memberId, boardDto); | ||||||
| return "redirect:/board"; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| /** | ||||||
|
|
@@ -76,27 +58,20 @@ public String boardPage() { | |||||
|
|
||||||
|
|
||||||
| /** | ||||||
| * 페이징된 게시글 목록 조회 | ||||||
| * - 검색어, 최신순/인기순, 게시글타입 | ||||||
| * - 스크롤 방식으로 페이징 지원 | ||||||
| * - 클라이언트(JS)에서 스크롤 이벤트 발생 시 요청 | ||||||
| * 게시글 생성 | ||||||
| */ | ||||||
| @ResponseBody | ||||||
| @GetMapping("api/boards") | ||||||
| public Map<String, Object> getBoards(@RequestParam(defaultValue = "0") int page, | ||||||
| @RequestParam(defaultValue = "10") int size, | ||||||
| @RequestParam(defaultValue = "newest") String sort, | ||||||
| @RequestParam(required = false) String query, | ||||||
| @RequestParam(defaultValue = "all") String postType) { | ||||||
| return boardservice.selectBoardPage(page, size, sort, query, postType); | ||||||
| @PostMapping("/board/{memberId}/post") | ||||||
| public String insertBoard(@PathVariable Long memberId, BoardDto boardDto){ | ||||||
| int result = boardservice.insertBoard(memberId, boardDto); | ||||||
| return "redirect:/board"; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
| /** | ||||||
| * 게시글 단일 조회 | ||||||
| */ | ||||||
| @GetMapping("/board/{boardId}") | ||||||
| public String boardDetail(@PathVariable int boardId,@AuthenticationPrincipal Object currentUser, Model model){ | ||||||
| public String boardDetail(@PathVariable Long boardId, @AuthenticationPrincipal Object currentUser, Model model){ | ||||||
| Map<String, Object> boardData = boardservice.selectBoard(boardId); | ||||||
| Board board = (Board) boardData.get("board"); | ||||||
| String[] hashtagsList = (String[]) boardData.get("hashtagsList"); | ||||||
|
|
@@ -106,7 +81,7 @@ public String boardDetail(@PathVariable int boardId,@AuthenticationPrincipal Obj | |||||
|
|
||||||
| // 사용자가 로그인된 상태라면, 좋아요 여부를 확인하여 모델에 추가 | ||||||
| if (currentUser != null && !"anonymousUser".equals(currentUser)) { | ||||||
| int memberId; | ||||||
| Long memberId; | ||||||
| if(currentUser instanceof UserDetails) { | ||||||
| // 일반 로그인 사용자 처리 | ||||||
| memberId = ((CustomUserDetails) currentUser).getMemberId(); | ||||||
|
|
@@ -129,12 +104,29 @@ else if(currentUser instanceof OAuth2User) { | |||||
| } | ||||||
|
|
||||||
|
|
||||||
| /** | ||||||
| * 페이징된 게시글 목록 조회 | ||||||
| * - 검색어, 최신순/인기순, 게시글타입 | ||||||
| * - 스크롤 방식으로 페이징 지원 | ||||||
| * - 클라이언트(JS)에서 스크롤 이벤트 발생 시 요청 | ||||||
| */ | ||||||
| @ResponseBody | ||||||
| @GetMapping("api/boards") | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
이 컨트롤러의 다른 모든 엔드포인트는 🔧 수정 제안- `@GetMapping`("api/boards")
+ `@GetMapping`("/api/boards")📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| public Map<String, Object> getBoards(@RequestParam(defaultValue = "0") int page, | ||||||
| @RequestParam(defaultValue = "10") int size, | ||||||
| @RequestParam(defaultValue = "newest") String sort, | ||||||
| @RequestParam(required = false) String query, | ||||||
| @RequestParam(defaultValue = "all") String postType) { | ||||||
| return boardservice.selectBoardPage(page, size, sort, query, postType); | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
| /** | ||||||
| * 게시글 수정 | ||||||
| */ | ||||||
| @PostMapping("/board/{boardId}/update") | ||||||
| @OwnerCheck(idParam = "boardId", service = "boardService") | ||||||
| public String updateBoard(@PathVariable int boardId, BoardDto boardDto){ | ||||||
| public String updateBoard(@PathVariable Long boardId, BoardDto boardDto){ | ||||||
| boardservice.updateBoard(boardId, boardDto); | ||||||
| return "redirect:/board/{boardId}"; | ||||||
| } | ||||||
|
|
@@ -145,7 +137,7 @@ public String updateBoard(@PathVariable int boardId, BoardDto boardDto){ | |||||
| */ | ||||||
| @PostMapping("/board/{boardId}/delete") | ||||||
| @OwnerCheck(idParam = "boardId", service = "boardService") | ||||||
| public String deleteBoard(@PathVariable int boardId) { | ||||||
| public String deleteBoard(@PathVariable Long boardId) { | ||||||
| boardservice.deleteBoard(boardId); | ||||||
| return "redirect:/board"; | ||||||
| } | ||||||
|
|
@@ -156,7 +148,7 @@ public String deleteBoard(@PathVariable int boardId) { | |||||
| */ | ||||||
| @PostMapping("/board/{boardId}/like") | ||||||
| @ResponseBody | ||||||
| public Map<String, Object> toggleLike(@PathVariable int boardId, @AuthenticationPrincipal Object currentUser) { | ||||||
| public Map<String, Object> toggleLike(@PathVariable Long boardId, @AuthenticationPrincipal Object currentUser) { | ||||||
|
|
||||||
| Map<String, Object> response = new HashMap<>(); | ||||||
|
|
||||||
|
|
@@ -168,7 +160,7 @@ public Map<String, Object> toggleLike(@PathVariable int boardId, @Authentication | |||||
| } | ||||||
|
|
||||||
| // 로그인 된 경우 | ||||||
| int memberId; | ||||||
| Long memberId; | ||||||
| if(currentUser instanceof UserDetails) { | ||||||
| // 일반 로그인 사용자 처리 | ||||||
| memberId = ((CustomUserDetails) currentUser).getMemberId(); | ||||||
|
|
@@ -192,8 +184,8 @@ else if(currentUser instanceof OAuth2User) { | |||||
| */ | ||||||
| @PostMapping(value ="/board/{boardId}/bookmark/{memberId}") | ||||||
| public ResponseEntity<Map<String, Object>> toggleBookmark( | ||||||
| @PathVariable final int boardId, | ||||||
| @PathVariable final int memberId, | ||||||
| @PathVariable final Long boardId, | ||||||
| @PathVariable final Long memberId, | ||||||
| @RequestBody BookmarkDto bookmarkDto, | ||||||
| @AuthenticationPrincipal Object currentUser){ | ||||||
| Map<String, Object> response = new HashMap<>(); | ||||||
|
|
@@ -211,7 +203,7 @@ public ResponseEntity<Map<String, Object>> toggleBookmark( | |||||
|
|
||||||
| if (bookmarkExists == 0) { | ||||||
| // 북마크가 안 되어 있으면 북마크 추가 | ||||||
| bookmarkService.insertBookmarkForBoard(bookmarkDto); | ||||||
| bookmarkService.insertBookmarkForBoard(boardId, bookmarkDto); | ||||||
| boardservice.incrementBookmarkCount(boardId); // 북마크 추가 시 게시글의 북마크 수 증가 | ||||||
| response.put("action", "bookmarked"); | ||||||
| } else { | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
|
|
||
| public interface BoardDao { | ||
| //게시글 생성 | ||
| public int insertBoard(int memberId, BoardDto boardDto); | ||
| public int insertBoard(Long memberId, BoardDto boardDto); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Find mapper XML files and implementation
find . -name "*board*mapper*.xml" -o -name "*BoardDao*.java" | head -20Repository: Searchweb-Dev/Searchweb-Back Length of output: 239 🏁 Script executed: #!/bin/bash
# Search for BoardDao.java to inspect the interface
fd "BoardDao.java" -x cat {}Repository: Searchweb-Dev/Searchweb-Back Length of output: 4453 🏁 Script executed: #!/bin/bash
# Search for board-mapper.xml to check parameter binding
fd "board.*mapper.*xml" -x cat {}Repository: Searchweb-Dev/Searchweb-Back Length of output: 5530 다중 파라미터 메서드에
수정 제안- public int insertBoard(Long memberId, BoardDto boardDto);
+ public int insertBoard(`@Param`("memberId") Long memberId, `@Param`("boardDto") BoardDto boardDto);- int updateBoard(Long boardId, BoardDto boardDto);
+ int updateBoard(`@Param`("boardId") Long boardId, `@Param`("boardDto") BoardDto boardDto);- int updateBoardProfile(Long boardId, String job, String major);
+ int updateBoardProfile(`@Param`("boardId") Long boardId, `@Param`("job") String job, `@Param`("major") String major);- int updateBookmarkCount(Long boardId, int bookmarkCount);
+ int updateBookmarkCount(`@Param`("boardId") Long boardId, `@Param`("bookmarkCount") int bookmarkCount);또한 - int countBoardList(String query, String postType);
+ int countBoardList(`@Param`("query") String query, `@Param`("postType") String postType);🤖 Prompt for AI Agents |
||
|
|
||
| // 페이징된 게시글 목록 조회 | ||
| List<Board> selectBoardPage(@Param("offset") int offset, | ||
|
|
@@ -22,35 +22,35 @@ List<Board> selectBoardPage(@Param("offset") int offset, | |
| int countBoardList(String query, String postType); | ||
|
|
||
| //게시글 목록 조회(회원번호로 조회) | ||
| List<Board> selectBoardListByMemberId(int memberId); | ||
| List<Board> selectBoardListByMemberId(Long memberId); | ||
|
|
||
| //게시글 단일 조회 | ||
| Board selectBoard(int boardId); | ||
| Board selectBoard(Long boardId); | ||
|
|
||
| //게시글 수정 | ||
| int updateBoard(int boardId, BoardDto boardDto); | ||
| int updateBoard(Long boardId, BoardDto boardDto); | ||
|
|
||
| //게시글 수정(회원정보 수정) | ||
| int updateBoardProfile(int boardId, String job, String major); | ||
| int updateBoardProfile(Long boardId, String job, String major); | ||
|
|
||
| //게시글 삭제 | ||
| int deleteBoard(int boardId); | ||
| int deleteBoard(Long boardId); | ||
|
|
||
| //게시글 북마크 수 수정 | ||
| int updateBookmarkCount(int boardId, int bookmarkCount); | ||
| int updateBookmarkCount(Long boardId, int bookmarkCount); | ||
|
|
||
| //게시글 조회수 증가 | ||
| int incrementViewCount(int boardId); | ||
| int incrementViewCount(Long boardId); | ||
|
|
||
| //게시글 좋아요 증가 | ||
| int incrementLikeCount(int boardId); | ||
| int incrementLikeCount(Long boardId); | ||
|
|
||
| //게시글 좋아요 감소 | ||
| int decrementLikeCount(int boardId); | ||
| int decrementLikeCount(Long boardId); | ||
|
|
||
| //게시글 댓글 수 증가 | ||
| int incrementCommentCount(int boardId); | ||
| int incrementCommentCount(Long boardId); | ||
|
|
||
| //게시글 댓글 수 감소 | ||
| int decrementCommentCount(int boardId); | ||
| int decrementCommentCount(Long boardId); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
들여쓰기 불일치: 탭 대신 공백이 사용되었습니다.
Line 31은 공백 4칸으로 들여쓰기되어 있지만, 나머지
dependencies블록은 탭을 사용합니다.🔧 수정 제안
📝 Committable suggestion
🤖 Prompt for AI Agents