Refactor: PK값 Integer -> Long 변경

This commit is contained in:
김용수 2024-09-02 17:23:37 +09:00
parent e1e3cad652
commit ae7fc6c337
2 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ public class ImageController {
@CurrentUser final Integer memberId, @CurrentUser final Integer memberId,
@PathVariable("folder_id") final Integer folderId, @PathVariable("folder_id") final Integer folderId,
@PathVariable("project_id") final Integer projectId, @PathVariable("project_id") final Integer projectId,
@PathVariable("image_id") final Integer imageId @PathVariable("image_id") final Long imageId
) { ) {
log.debug("project: {} , folder: {}, image: {}, 현재 로그인 중인 사용자 : {}", projectId, folderId, memberId, imageId); log.debug("project: {} , folder: {}, image: {}, 현재 로그인 중인 사용자 : {}", projectId, folderId, memberId, imageId);
ImageResponse imageResponse = imageService.getImageById(projectId, folderId, imageId, memberId); ImageResponse imageResponse = imageService.getImageById(projectId, folderId, imageId, memberId);
@ -72,7 +72,7 @@ public class ImageController {
@CurrentUser final Integer memberId, @CurrentUser final Integer memberId,
@PathVariable("folder_id") final Integer folderId, @PathVariable("folder_id") final Integer folderId,
@PathVariable("project_id") final Integer projectId, @PathVariable("project_id") final Integer projectId,
@PathVariable("image_id") final Integer imageId, @PathVariable("image_id") final Long imageId,
@RequestBody final ImageMoveRequest imageMoveRequest @RequestBody final ImageMoveRequest imageMoveRequest
) { ) {
log.debug("project: {} , folder: {}, image: {}, 현재 로그인 중인 사용자 : {}, 이동하는 폴더 {}", projectId, folderId, memberId, imageId, imageMoveRequest.getMoveFolderId()); log.debug("project: {} , folder: {}, image: {}, 현재 로그인 중인 사용자 : {}, 이동하는 폴더 {}", projectId, folderId, memberId, imageId, imageMoveRequest.getMoveFolderId());
@ -88,7 +88,7 @@ public class ImageController {
@CurrentUser final Integer memberId, @CurrentUser final Integer memberId,
@PathVariable("folder_id") final Integer folderId, @PathVariable("folder_id") final Integer folderId,
@PathVariable("project_id") final Integer projectId, @PathVariable("project_id") final Integer projectId,
@PathVariable("image_id") final Integer imageId @PathVariable("image_id") final Long imageId
) { ) {
log.debug("project: {} , folder: {}, 삭제하려는 이미지: {}, 현재 로그인 중인 사용자 : {}", projectId, folderId, imageId, memberId); log.debug("project: {} , folder: {}, 삭제하려는 이미지: {}, 현재 로그인 중인 사용자 : {}", projectId, folderId, imageId, memberId);
imageService.deleteImage(projectId, folderId, imageId, memberId); imageService.deleteImage(projectId, folderId, imageId, memberId);

View File

@ -5,7 +5,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional; import java.util.Optional;
public interface ImageRepository extends JpaRepository<Image, Integer> { public interface ImageRepository extends JpaRepository<Image, Long> {
Optional<Image> findByIdAndFolderId(Integer imageId, Integer folderId); Optional<Image> findByIdAndFolderId(Long imageId, Integer folderId);
} }