diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/adapter/PictureGenerateRequestPersistenceAdapter.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/adapter/PictureGenerateRequestPersistenceAdapter.java index 5516e28..6332d24 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/adapter/PictureGenerateRequestPersistenceAdapter.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/adapter/PictureGenerateRequestPersistenceAdapter.java @@ -41,11 +41,6 @@ public PictureGenerateRequest save(PictureGenerateRequest pictureGenerateRequest return pictureGenerateRequestRepository.save(pictureGenerateRequest); } - @Override - public Page findAll(Pageable pageable) { - return pictureGenerateRequestRepository.findAll(pageable); - } - @Override public Page findByPGRESStatusInAndMatchToAdminIsAndPaidIsNull( List statusList, boolean matchToAdmin, Pageable pageable) { diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/UserPGREQApi.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/UserPGREQApi.java index 5dc693f..6f79077 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/UserPGREQApi.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/UserPGREQApi.java @@ -63,18 +63,4 @@ ResponseEntity> confirmCanceledPGREQ( ResponseEntity> createPictureGenerateRequest( @AuthUser Long userId, @RequestBody @Valid PGREQSaveRequestDto pgreqSaveRequestDto); - - @Deprecated - @Operation(summary = "사진생성요청 수정", description = "이전에 생성한 사진생성요청을 수정한다", deprecated = true) - @EnumResponses(value = { - @EnumResponse(ResponseCode.OK), - @EnumResponse(ResponseCode.PictureGenerateRequestNotFound), - @EnumResponse(ResponseCode.PictureGenerateRequestAlreadyInProgress) - }) - ResponseEntity> modifyPictureGenerateRequest( - @AuthUser Long userId, - @PathVariable(value = "pictureGenerateRequestId") - @Schema(description = "사진생성요청id", example = "1") - Long pictureGenerateRequestId, - @RequestBody @Valid PGREQSaveRequestDto pgreqSaveRequestDto); } diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/UserPGREQController.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/UserPGREQController.java index e603f81..0c688f4 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/UserPGREQController.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/UserPGREQController.java @@ -91,18 +91,4 @@ public ResponseEntity> createPaidPictureGenerateRequestForTwo pictureGenerateRequestUseCase.createPaidPGREQForTwo(userId, advancedPGREQSaveRequestDto.toCommand()); return GentiResponse.success(true); } - - @Deprecated - @Logging(item = LogItem.PGREQ, action = LogAction.UPDATE, requester = LogRequester.USER) - @PutMapping("/{pictureGenerateRequestId}") - public ResponseEntity> modifyPictureGenerateRequest( - @AuthUser Long userId, - @PathVariable(value = "pictureGenerateRequestId") - @Schema(description = "사진생성요청id", example = "1") - Long pictureGenerateRequestId, - @RequestBody @Valid PGREQSaveRequestDto pgreqSaveRequestDto) { - pictureGenerateRequestUseCase.modifyPGREQ(userId, pictureGenerateRequestId, - pgreqSaveRequestDto); - return GentiResponse.success(true); - } } diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/port/PictureGenerateRequestPort.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/port/PictureGenerateRequestPort.java index 1b6efcd..96d7065 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/port/PictureGenerateRequestPort.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/port/PictureGenerateRequestPort.java @@ -24,8 +24,6 @@ public interface PictureGenerateRequestPort { Page findByPGRESStatusInAndMatchToAdminIsAndPaidIsNull(List statusList, boolean matchToAdmin, Pageable pageable); - Page findAll(Pageable pageable); - Page findByMatchToAdminIsAndPaidIsNull(boolean matchToAdmin, Pageable pageable); Page findByMatchToAdminIsAndPaidIsNotNull(boolean matchToAdmin, Pageable pageable); diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/PictureGenerateRequestService.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/PictureGenerateRequestService.java index e745d15..425b82f 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/PictureGenerateRequestService.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/PictureGenerateRequestService.java @@ -343,37 +343,6 @@ private PGREQStatusResponseDto createPGREQStatusResponseDto(PictureGenerateReque .build(); } - @Override - public void modifyPGREQ(Long userId, Long pictureGenerateRequestId, PGREQSaveRequestDto pgreqSaveRequestDto) { - User foundUser = findUserById(userId); - PictureGenerateRequest findPictureGenerateRequest = pictureGenerateRequestPort.findByIdAndRequester( - pictureGenerateRequestId, foundUser) - .orElseThrow(() -> ExpectedException.withLogging(ResponseCode.PictureGenerateRequestNotFound, - String.format("생성요청한 유저 id : %d 사진생성요청 Id : %d", foundUser.getId(), pictureGenerateRequestId))); - - if (findPictureGenerateRequest.getCreator() != null) { - throw ExpectedException.withLogging(ResponseCode.PictureGenerateRequestAlreadyInProgress); - } - - PicturePose picturePose = findPictureGenerateRequest.getPicturePose(); - String givenPicturePoseKey = pgreqSaveRequestDto.getPosePicture().getKey(); - picturePose.modify(givenPicturePoseKey); - - List pictureUserFaceList = findPictureGenerateRequest.getUserFacePictureList(); - List givenPictureUserFaceKeyList = pgreqSaveRequestDto.getFacePictureList() - .stream() - .map(CommonPictureKeyUpdateRequestDto::getKey) - .toList(); - for (int i = 0; i < pictureUserFaceList.size(); i++) { - String newKey = givenPictureUserFaceKeyList.get(i); - pictureUserFaceList.get(i).modify(newKey); - } - - findPictureGenerateRequest.modify(pgreqSaveRequestDto.getPrompt(), pgreqSaveRequestDto.getCameraAngle(), - pgreqSaveRequestDto.getShotCoverage(), pgreqSaveRequestDto.getPictureRatio(), picturePose, - pictureUserFaceList); - } - private PGREQStatusResponseDto handleAwaitUserVerification(PictureGenerateRequest foundPGREQ) { PictureGenerateResponse needVerifyPGRES = foundPGREQ.getResponseList() .stream() diff --git a/genti-api/src/main/java/com/gt/genti/usecase/PictureGenerateRequestUseCase.java b/genti-api/src/main/java/com/gt/genti/usecase/PictureGenerateRequestUseCase.java index 1e65128..1e447b3 100644 --- a/genti-api/src/main/java/com/gt/genti/usecase/PictureGenerateRequestUseCase.java +++ b/genti-api/src/main/java/com/gt/genti/usecase/PictureGenerateRequestUseCase.java @@ -30,9 +30,6 @@ PictureGenerateRequest createPaidPGREQForOne(Long userId, PictureGenerateRequest createPaidPGREQForTwo(Long userId, AdvancedPGREQSaveCommand advancedPGREQSaveCommand); - void modifyPGREQ(Long userId, - Long pictureGenerateRequestId, PGREQSaveRequestDto pgreqSaveRequestDto); - Page getAllAdminMatched(Pageable pageable); Page getAllAdminMatchedByPGRESStatus(