From c24dd10bb3ed4ac56cfcadd1c1400c3e2f30aca1 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 11:09:17 +0900 Subject: [PATCH 01/15] =?UTF-8?q?Remove:=20#209=20genti-domain=20-=20commo?= =?UTF-8?q?n.PostStatusConverter=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/converter/PostStatusConverter.java | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 genti-domain/src/main/java/com/gt/genti/common/converter/PostStatusConverter.java diff --git a/genti-domain/src/main/java/com/gt/genti/common/converter/PostStatusConverter.java b/genti-domain/src/main/java/com/gt/genti/common/converter/PostStatusConverter.java deleted file mode 100644 index 7ad53233..00000000 --- a/genti-domain/src/main/java/com/gt/genti/common/converter/PostStatusConverter.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.gt.genti.common.converter; - -import com.gt.genti.post.model.PostStatus; - -import jakarta.persistence.Converter; - -@Converter - -public class PostStatusConverter extends DefaultEnumDBConverter { - - public PostStatusConverter() { - super(PostStatus.class); - } - -} From 56de50a8a46bd77afdc563251f4019d1840c4249 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 11:18:52 +0900 Subject: [PATCH 02/15] =?UTF-8?q?Fix:=20#209=20merge=20conflict=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0=EC=97=90=EC=84=9C=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EB=90=9C=20User=20=EB=B9=8C=EB=8D=94=EC=9D=98=20phoneNumbe=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- genti-domain/src/main/java/com/gt/genti/user/model/User.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/genti-domain/src/main/java/com/gt/genti/user/model/User.java b/genti-domain/src/main/java/com/gt/genti/user/model/User.java index 38a278a9..168c7ba2 100644 --- a/genti-domain/src/main/java/com/gt/genti/user/model/User.java +++ b/genti-domain/src/main/java/com/gt/genti/user/model/User.java @@ -230,7 +230,8 @@ public void login() { private User(Long id, String socialId, String oauthImageUrl, List pictureUserFaceList, String email, Sex sex, String introduction, String username, String nickname, UserStatus userStatus, Boolean emailVerified, String loginId, String password, Creator creator, - UserRole userRole, OauthPlatform lastLoginOauthPlatform, LocalDateTime deletedAt, LocalDateTime lastLoginDate, Integer requestTaskCount, String birthYear) { + UserRole userRole, OauthPlatform lastLoginOauthPlatform, LocalDateTime deletedAt, LocalDateTime lastLoginDate, + Integer requestTaskCount, String birthYear, String phoneNumber) { this.id = id; this.socialId = socialId; this.oauthImageUrl = oauthImageUrl; From 12cdb27fa6a927b11d88305d2c99157ec9b34940 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 11:24:22 +0900 Subject: [PATCH 03/15] =?UTF-8?q?Fix:=20#209=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95=20API=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/gt/genti/user/controller/UserController.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/genti-api/src/main/java/com/gt/genti/user/controller/UserController.java b/genti-api/src/main/java/com/gt/genti/user/controller/UserController.java index c7349a34..33be240b 100644 --- a/genti-api/src/main/java/com/gt/genti/user/controller/UserController.java +++ b/genti-api/src/main/java/com/gt/genti/user/controller/UserController.java @@ -51,13 +51,6 @@ public ResponseEntity> getUserInfo( return GentiResponse.success(userService.getUserInfo(userId)); } - @PutMapping("/api/v1/users") - public ResponseEntity> updateUserInfo( - @AuthUser Long userId, - @RequestBody @Valid UserInfoUpdateRequestDto userInfoUpdateRequestDto) { - return GentiResponse.success(userService.updateUserInfo(userId, userInfoUpdateRequestDto)); - } - @PostMapping("/api/v1/users/signup") @Logging(item = LogItem.USER, action = LogAction.SIGNUP, requester = LogRequester.ANONYMOUS) public ResponseEntity> signUp( From 986da68a8e39db1248e25eb5ac80ef19eb49b26b Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 11:29:09 +0900 Subject: [PATCH 04/15] =?UTF-8?q?Fix:=20#209=20=EC=93=B0=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20=EC=97=90=EB=9F=AC=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gt/genti/purchase/service/InAppPurchaseService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java index 69165fd0..594949ad 100644 --- a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java +++ b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java @@ -46,7 +46,7 @@ public Boolean validateReceipt(Long userId, PurchaseRequestDto purchaseRequestDt .createScoped(AndroidPublisherScopes.ANDROIDPUBLISHER); builder = new AndroidPublisher.Builder(httpTransport, JSON_FACTORY, new HttpCredentialsAdapter(credentials)); } catch (IOException | GeneralSecurityException e){ - throw ExpectedException.withLogging(ResponseCode.CashoutNotFound, + throw ExpectedException.withLogging(ResponseCode.FileTypeNotProvided, "---------------------------------------구매 에러 IOException, GeneralSecurityException 에러 1111111111: " + e + "-------------------------------------------------"); } From 7d61c3406d6aa90e9283056f07ddbb4206888fa3 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 15:34:40 +0900 Subject: [PATCH 05/15] =?UTF-8?q?Fix:=20#207=20=EC=98=81=EC=88=98=EC=A6=9D?= =?UTF-8?q?=20=EA=B2=80=EC=A6=9D=20=EB=A9=94=EC=84=9C=EB=93=9C=20=EB=82=B4?= =?UTF-8?q?=20=EA=B0=81=20=EC=8B=A4=ED=96=89=EB=A7=88=EB=8B=A4=20try-catch?= =?UTF-8?q?=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/InAppPurchaseService.java | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java index 594949ad..b8e7fdde 100644 --- a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java +++ b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java @@ -31,28 +31,36 @@ public class InAppPurchaseService { public Boolean validateReceipt(Long userId, PurchaseRequestDto purchaseRequestDto) { -// try { - // ================= Google Credential 생성 ================= - JsonFactory JSON_FACTORY = GsonFactory.getDefaultInstance(); AndroidPublisher.Builder builder; + HttpTransport httpTransport; + try { + httpTransport = GoogleNetHttpTransport.newTrustedTransport(); + } catch (IOException | GeneralSecurityException e1) { + throw ExpectedException.withLogging(ResponseCode.HttpMessageNotReadable, e1); + } + + InputStream inputStream; try { - HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); + inputStream = new ClassPathResource(googleAccountFilePath).getInputStream(); + } catch (IOException e2) { + throw ExpectedException.withLogging(ResponseCode.HandlerNotFound, e2); + } - InputStream inputStream = new ClassPathResource(googleAccountFilePath).getInputStream(); - GoogleCredentials credentials = GoogleCredentials + GoogleCredentials credentials; + try { + credentials = GoogleCredentials .fromStream(inputStream) .createScoped(AndroidPublisherScopes.ANDROIDPUBLISHER); - builder = new AndroidPublisher.Builder(httpTransport, JSON_FACTORY, new HttpCredentialsAdapter(credentials)); - } catch (IOException | GeneralSecurityException e){ - throw ExpectedException.withLogging(ResponseCode.FileTypeNotProvided, - "---------------------------------------구매 에러 IOException, GeneralSecurityException 에러 1111111111: " + e + "-------------------------------------------------"); + } catch (IOException e3) { + throw ExpectedException.withLogging(ResponseCode.AlreadyActivatedUser, e3); } - AndroidPublisher publisher; + builder = new AndroidPublisher.Builder(httpTransport, JSON_FACTORY, new HttpCredentialsAdapter(credentials)); + + AndroidPublisher publisher = null; try { - // ======================== API 호출 ======================== publisher = builder.setApplicationName(googleApplicationPackageName).build(); AndroidPublisher.Purchases.Products.Get gas = publisher.purchases() .products() @@ -61,37 +69,30 @@ public Boolean validateReceipt(Long userId, PurchaseRequestDto purchaseRequestDt "productId", "purchaseToken"); ProductPurchase purchase = gas.execute(); - } catch (IOException e){ - throw ExpectedException.withLogging(ResponseCode.HttpMessageNotReadable, - "---------------------------------------구매 에러 IOException 에러 2222222222: " + e + "-------------------------------------------------"); + } catch (IOException e4) { + throw ExpectedException.withLogging(ResponseCode.UserDeactivated, e4); } - - try{ + try { AndroidPublisher.Purchases.Products.Get get = publisher.purchases().products() - .get(purchaseRequestDto.getPackageName(), purchaseRequestDto.getProductId(), purchaseRequestDto.getPurchaseToken()); //inapp 아이템의 구매 및 소모 상태 확인 + .get(purchaseRequestDto.getPackageName(), purchaseRequestDto.getProductId(), purchaseRequestDto.getPurchaseToken()); ProductPurchase productPurchase = get.execute(); //검증 결과 System.out.println(productPurchase.toPrettyString()); // 인앱 상품의 소비 상태. 0 아직 소비 안됨(Yet to be consumed) / 1 소비됨(Consumed) Integer consumptionState = productPurchase.getConsumptionState(); - // 개발자가 지정한 임의 문자열 정보 - String developerPayload = productPurchase.getDeveloperPayload(); + // 상품이 구매된 시각. 타임스탬프 형태 + Long purchaseTimeMillis = productPurchase.getPurchaseTimeMillis(); // 구매 상태. 0 구매완료 / 1 취소됨 Integer purchaseState = productPurchase.getPurchaseState(); - if(purchaseState == 1){ + if (purchaseState == 1) { return false; } - - // 상품이 구매된 시각. 타임스탬프 형태 - Long purchaseTimeMillis = productPurchase.getPurchaseTimeMillis(); - return true; - } catch (IOException e) { - throw ExpectedException.withLogging(ResponseCode.FileTypeNotProvided, - "---------------------------------------구매 에러 IOException 에러 333333333333: " + e + "-------------------------------------------------"); + } catch (IOException e5) { + throw ExpectedException.withLogging(ResponseCode.FileTypeNotProvided, e5); } } -} +} \ No newline at end of file From 39fbfd7d5fc44b37911e27f5bf1e8b9f3ae7bc48 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 16:07:35 +0900 Subject: [PATCH 06/15] =?UTF-8?q?Fix:=20#207=20CI/CD=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20-=20google-account-key=20=EC=8B=9C?= =?UTF-8?q?=ED=81=AC=EB=A6=BF=ED=82=A4=EA=B0=80=20=EC=98=AC=EB=B0=94?= =?UTF-8?q?=EB=A5=B8=20=ED=98=95=EC=8B=9D(json)=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=9E=98=20=EC=A0=80=EC=9E=A5=EB=90=90=EB=8A=94=EC=A7=80=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=ED=95=98=EA=B8=B0=20=EC=9C=84=ED=95=B4=20s3?= =?UTF-8?q?=EC=97=90=20=EC=A0=80=EC=9E=A5(=EC=B6=94=ED=9B=84=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cicd-ec2.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cicd-ec2.yml b/.github/workflows/cicd-ec2.yml index f41d4fd2..a0050a46 100644 --- a/.github/workflows/cicd-ec2.yml +++ b/.github/workflows/cicd-ec2.yml @@ -187,6 +187,11 @@ jobs: # Clean up the temporary directory rm -rf temp_dir + - name: Upload key.json to S3 + if: contains(github.ref, 'staging') + run: | + aws s3 cp ./genti-api/src/main/resources/jsonkey/key.json s3://$S3_BUCKET_NAME/jsonkey/key.json + - name: Upload docker-compose, appspec, afterInstall file to S3 if: contains(github.ref, 'staging') run: | From 0639dab2530ac32d78d3b1fe4b7225d02c591a1a Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 16:29:50 +0900 Subject: [PATCH 07/15] =?UTF-8?q?Fix:=20#207=20CI/CD=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20-=20=EA=B8=B0=EC=A1=B4=20json=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=A0=80=EC=9E=A5=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=ED=81=B0=EB=94=B0=EC=98=B4=ED=91=9C?= =?UTF-8?q?=EA=B0=80=20=EC=97=86=EC=9D=B4=20=EC=A0=80=EC=9E=A5=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=EA=B0=80=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=ED=95=A8=EC=97=90=20=EB=94=B0=EB=9D=BC=20json=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EC=9D=B4=20=EC=98=AC=EB=B0=94=EB=A5=B4=EA=B2=8C=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=EB=90=A0=20=EC=88=98=20=EC=9E=88=EB=98=90?= =?UTF-8?q?=EB=A1=9D=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cicd-ec2.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cicd-ec2.yml b/.github/workflows/cicd-ec2.yml index a0050a46..7895a2e8 100644 --- a/.github/workflows/cicd-ec2.yml +++ b/.github/workflows/cicd-ec2.yml @@ -66,13 +66,22 @@ jobs: echo "${{ secrets.APPLICATION_STAGING }}" > ./application-staging.yml shell: bash +# 아래 코드는 json이 큰따옴표 없이 저장됨 +# - name: Create Google key.json file +# if: contains(github.ref, 'staging') || contains(github.ref, 'main-test') +# run: | +# cd ./genti-api/src/main/resources +# mkdir -p ./jsonkey +# echo "${{ secrets.GOOGLE_ACCOUNT_KEY }}" > ./jsonkey/key.json +# shell: bash + - name: Create Google key.json file if: contains(github.ref, 'staging') || contains(github.ref, 'main-test') - run: | - cd ./genti-api/src/main/resources - mkdir -p ./jsonkey - echo "${{ secrets.GOOGLE_ACCOUNT_KEY }}" > ./jsonkey/key.json - shell: bash + id: create-json + uses: jsdaniell/create-json@1.1.2 + with: + name: "./genti-api/src/main/resources/jsonkey/key.json" + json: ${{ secrets.GOOGLE_ACCOUNT_KEY }} - name: make apple private key run: | From 4dc03560ab9563717fd247056c830d9a43fe2390 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 16:32:39 +0900 Subject: [PATCH 08/15] =?UTF-8?q?Fix:=20#207=20CI/CD=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20-=20json=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=20=EC=A0=84=20=EB=94=94=EB=A0=89=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=20=EB=A7=8C=EB=93=9C=EB=8A=94=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cicd-ec2.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cicd-ec2.yml b/.github/workflows/cicd-ec2.yml index 7895a2e8..601db436 100644 --- a/.github/workflows/cicd-ec2.yml +++ b/.github/workflows/cicd-ec2.yml @@ -75,6 +75,10 @@ jobs: # echo "${{ secrets.GOOGLE_ACCOUNT_KEY }}" > ./jsonkey/key.json # shell: bash + - name: Create jsonkey directory + if: contains(github.ref, 'staging') || contains(github.ref, 'main-test') + run: mkdir -p ./genti-api/src/main/resources/jsonkey + - name: Create Google key.json file if: contains(github.ref, 'staging') || contains(github.ref, 'main-test') id: create-json From 54377b1f0c0b0ab820a150a62ce96cbc7243e070 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 19:50:49 +0900 Subject: [PATCH 09/15] =?UTF-8?q?Fix:=20#207=20=EC=9D=B8=EC=95=B1=20?= =?UTF-8?q?=EA=B2=B0=EC=A0=9C=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase/service/InAppPurchaseService.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java index b8e7fdde..ce0f1ed0 100644 --- a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java +++ b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java @@ -60,18 +60,7 @@ public Boolean validateReceipt(Long userId, PurchaseRequestDto purchaseRequestDt builder = new AndroidPublisher.Builder(httpTransport, JSON_FACTORY, new HttpCredentialsAdapter(credentials)); AndroidPublisher publisher = null; - try { - publisher = builder.setApplicationName(googleApplicationPackageName).build(); - AndroidPublisher.Purchases.Products.Get gas = publisher.purchases() - .products() - .get( - "packageName", - "productId", - "purchaseToken"); - ProductPurchase purchase = gas.execute(); - } catch (IOException e4) { - throw ExpectedException.withLogging(ResponseCode.UserDeactivated, e4); - } + publisher = builder.setApplicationName(googleApplicationPackageName).build(); try { AndroidPublisher.Purchases.Products.Get get = publisher.purchases().products() From ee220f4aecc4e5a9c9bbd91e7763abcecf90ef06 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 20:14:51 +0900 Subject: [PATCH 10/15] =?UTF-8?q?Fix:=20#207=20=EC=9D=B8=EC=95=B1=20?= =?UTF-8?q?=EA=B2=B0=EC=A0=9C=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gt/genti/purchase/service/InAppPurchaseService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java index ce0f1ed0..1e67de18 100644 --- a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java +++ b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java @@ -59,8 +59,7 @@ public Boolean validateReceipt(Long userId, PurchaseRequestDto purchaseRequestDt builder = new AndroidPublisher.Builder(httpTransport, JSON_FACTORY, new HttpCredentialsAdapter(credentials)); - AndroidPublisher publisher = null; - publisher = builder.setApplicationName(googleApplicationPackageName).build(); + AndroidPublisher publisher = builder.setApplicationName(purchaseRequestDto.getPackageName()).build(); try { AndroidPublisher.Purchases.Products.Get get = publisher.purchases().products() From 29d14573b15bac0317d97562611f7cdac49ce47a Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 20:31:14 +0900 Subject: [PATCH 11/15] =?UTF-8?q?Fix:=20#207=20=EC=9D=B8=EC=95=B1=20?= =?UTF-8?q?=EA=B2=B0=EC=A0=9C=20API=20=EC=9A=94=EC=B2=AD=20DTO=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gt/genti/purchase/dto/request/PurchaseRequestDto.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/genti-api/src/main/java/com/gt/genti/purchase/dto/request/PurchaseRequestDto.java b/genti-api/src/main/java/com/gt/genti/purchase/dto/request/PurchaseRequestDto.java index f0c2b2f1..4fccb978 100644 --- a/genti-api/src/main/java/com/gt/genti/purchase/dto/request/PurchaseRequestDto.java +++ b/genti-api/src/main/java/com/gt/genti/purchase/dto/request/PurchaseRequestDto.java @@ -1,8 +1,11 @@ package com.gt.genti.purchase.dto.request; +import lombok.AccessLevel; import lombok.Getter; +import lombok.NoArgsConstructor; @Getter +@NoArgsConstructor(access = AccessLevel.PROTECTED) // 있어야함 public class PurchaseRequestDto { private String packageName; //인앱 상품이 판매된 애플리케이션의 패키지 이름 private String productId; //인앱 상품 SKU From 48e482fcff0d6140722e20b9be7d4455f0003898 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 20:43:04 +0900 Subject: [PATCH 12/15] =?UTF-8?q?Fix:=20#207=20=EC=9D=B8=EC=95=B1=20?= =?UTF-8?q?=EA=B2=B0=EC=A0=9C=20API=20=EC=9A=94=EC=B2=AD=20=EC=BB=A8?= =?UTF-8?q?=ED=8A=B8=EB=A1=A4=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gt/genti/purchase/controller/UserPurchaseController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/genti-api/src/main/java/com/gt/genti/purchase/controller/UserPurchaseController.java b/genti-api/src/main/java/com/gt/genti/purchase/controller/UserPurchaseController.java index 9e5b4599..1584f0c7 100644 --- a/genti-api/src/main/java/com/gt/genti/purchase/controller/UserPurchaseController.java +++ b/genti-api/src/main/java/com/gt/genti/purchase/controller/UserPurchaseController.java @@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -20,7 +21,7 @@ public class UserPurchaseController { @PostMapping("/google/receipt-validation") public ResponseEntity> validateReceipt( @AuthUser Long userId, - PurchaseRequestDto purchaseRequestDto) { + @RequestBody PurchaseRequestDto purchaseRequestDto) { return GentiResponse.success(inAppPurchaseService.validateReceipt(userId, purchaseRequestDto)); } } From 23c22a4f29e2dad1f863a6c21384c108a405963e Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Wed, 4 Dec 2024 21:03:07 +0900 Subject: [PATCH 13/15] =?UTF-8?q?Fix:=20#207=20=EC=9D=B8=EC=95=B1=20?= =?UTF-8?q?=EA=B2=B0=EC=A0=9C=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/gt/genti/purchase/service/InAppPurchaseService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java index 1e67de18..24c206ea 100644 --- a/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java +++ b/genti-api/src/main/java/com/gt/genti/purchase/service/InAppPurchaseService.java @@ -65,7 +65,6 @@ public Boolean validateReceipt(Long userId, PurchaseRequestDto purchaseRequestDt AndroidPublisher.Purchases.Products.Get get = publisher.purchases().products() .get(purchaseRequestDto.getPackageName(), purchaseRequestDto.getProductId(), purchaseRequestDto.getPurchaseToken()); ProductPurchase productPurchase = get.execute(); //검증 결과 - System.out.println(productPurchase.toPrettyString()); // 인앱 상품의 소비 상태. 0 아직 소비 안됨(Yet to be consumed) / 1 소비됨(Consumed) Integer consumptionState = productPurchase.getConsumptionState(); From 586e868bdc5e4644709ecf205ee04121c8251699 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Thu, 5 Dec 2024 10:32:03 +0900 Subject: [PATCH 14/15] =?UTF-8?q?Fix:=20#196=20=EC=96=B4=EB=93=9C=EB=AF=BC?= =?UTF-8?q?=20=ED=8E=98=EC=9D=B4=EC=A7=80=20API=20=EC=88=98=EC=A0=95=20-?= =?UTF-8?q?=20Admin=20=ED=83=AD=EC=97=90=EC=84=9C=EB=8A=94=20=EC=9C=A0?= =?UTF-8?q?=EB=A3=8C=20=EC=9A=94=EC=B2=AD=EC=9D=B4=20=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tureGenerateRequestPersistenceAdapter.java | 10 +++---- .../api/AdminPGREQApi.java | 26 ----------------- .../controller/AdminPGREQController.java | 29 ------------------- .../port/PictureGenerateRequestPort.java | 4 +-- .../PictureGenerateRequestService.java | 18 ++---------- .../PictureGenerateRequestUseCase.java | 5 ---- .../PictureGenerateRequestRepository.java | 12 +++++--- 7 files changed, 17 insertions(+), 87 deletions(-) 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 5c0cbee4..5516e288 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 @@ -47,15 +47,15 @@ public Page findAll(Pageable pageable) { } @Override - public Page findByPGRESStatusInAndMatchToAdminIs( + public Page findByPGRESStatusInAndMatchToAdminIsAndPaidIsNull( List statusList, boolean matchToAdmin, Pageable pageable) { - return pictureGenerateRequestRepository.findByPictureGenerateResponseStatusInAndMatchToAdminIs(statusList, + return pictureGenerateRequestRepository.findByPictureGenerateResponseStatusInAndMatchToAdminIsAndPaidIsNull(statusList, matchToAdmin, pageable); } @Override - public Page findByMatchToAdminIs(boolean matchToAdmin, Pageable pageable) { - return pictureGenerateRequestRepository.findByMatchToAdminIs(matchToAdmin, pageable); + public Page findByMatchToAdminIsAndPaidIsNull(boolean matchToAdmin, Pageable pageable) { + return pictureGenerateRequestRepository.findByMatchToAdminIsAndPaidIsNull(matchToAdmin, pageable); } @@ -66,7 +66,7 @@ public Page findByMatchToAdminIsAndPaidIsNotNull(boolean @Override public Page findAllByRequester(User foundUser, Pageable pageable) { - return pictureGenerateRequestRepository.findAllByRequester(foundUser, pageable); + return pictureGenerateRequestRepository.findAllByRequesterAndPaidIsNull(foundUser, pageable); } @Override diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/AdminPGREQApi.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/AdminPGREQApi.java index 4676db50..9415bad8 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/AdminPGREQApi.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/api/AdminPGREQApi.java @@ -54,30 +54,4 @@ ResponseEntity>> g @RequestParam(name = "email", required = false) @Email(message = "올바른 email 형식이 아닙니다.") String email, @Parameter(description = "유료 사진생성요청 여부") @RequestParam(name = "paid", required = false) Boolean paid ); - - @Operation(summary = "공급자->어드민(얼굴붙여야하는 요청)", description = "사진생성요청 전체를 매칭대상(어드민,공급자), 응답의 상태를 조건으로 조회하고 페이지네이션 조회합니다.") - @EnumResponses(value = { - @EnumResponse(ResponseCode.OK) - }) - ResponseEntity>> getAllCreatorSubmittedPGREQ( - @Parameter(description = "페이지 번호 (0-based)", example = "0", required = true) - @RequestParam(name = "page", defaultValue = "0") @NotNull @Min(0) int page, - @Parameter(description = "페이지 당 요소 개수 >=1", example = "10", required = true) - @RequestParam(name = "size", defaultValue = "10") @NotNull @Min(1) int size, - @Parameter(description = "정렬 조건 - 기본값 생성일시", example = "createdAt", schema = @Schema(allowableValues = {"id", - "createdAt"})) - @RequestParam(name = "sortBy", defaultValue = "createdAt") String sortBy, - @Parameter(description = "정렬 방향 - 기본값 내림차순", example = "desc", schema = @Schema(allowableValues = {"acs", - "desc"})) - @RequestParam(name = "direction", defaultValue = "desc") String direction, - @Parameter(description = "현재 작업(사진생성응답)의 상태로 조회한다. ALL 조회 가능, EXPIRED는 MVP상 도메인로직엔 없지만 어드민페이지의 성격 상 필요하다고 생각하여 추가했습니다.", - examples = {@ExampleObject(name = "BEFORE_WORK", description = "작업 대기", value = "BEFORE_WORK"), - @ExampleObject(name = "IN_PROGRESS", description = "작업 중", value = "IN_PROGRESS"), - @ExampleObject(name = "COMPLETED", description = "작업 완료", value = "COMPLETED"), - @ExampleObject(name = "EXPIRED", description = "만료됨 (기존의 협의된 내용은 아니지만 어드민페이지에 필요하다고 생각했습니다. 추가 부탁드립니다.)", value = "EXPIRED"), - @ExampleObject(name = "ALL", description = "전체", value = "ALL")}) - @RequestParam(name = "status", defaultValue = "ALL") @ValidEnum(value = PictureGenerateResponseStatusForAdmin.class, hasAllOption = true) String status, - @Parameter(description = "유저의 email") - @RequestParam(name = "email", required = false) @Email(message = "올바른 email 형식이 아닙니다.") String email - ); } diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/AdminPGREQController.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/AdminPGREQController.java index 35ca60a6..68bb963a 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/AdminPGREQController.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/controller/AdminPGREQController.java @@ -79,35 +79,6 @@ public ResponseEntity>> getAllCreatorSubmittedPGREQ( - @Parameter(description = "페이지 번호 (0-based)", example = "0", required = true) @RequestParam(name = "page", defaultValue = "0") @NotNull @Min(0) int page, - @Parameter(description = "페이지 당 요소 개수 >=1", example = "10", required = true) @RequestParam(name = "size", defaultValue = "10") @NotNull @Min(1) int size, - @Parameter(description = "정렬 조건 - 기본값 생성일시", example = "createdAt", schema = @Schema(allowableValues = {"id", - "createdAt"})) @RequestParam(name = "sortBy", defaultValue = "createdAt") String sortBy, - @Parameter(description = "정렬 방향 - 기본값 내림차순", example = "desc", schema = @Schema(allowableValues = {"acs", - "desc"})) @RequestParam(name = "direction", defaultValue = "desc") String direction, - @Parameter(description = "현재 작업(사진생성응답)의 상태로 조회한다. ALL 조회 가능, EXPIRED는 MVP상 도메인로직엔 없지만 어드민페이지의 성격 상 필요하다고 생각하여 추가했습니다.", examples = { - @ExampleObject(name = "BEFORE_WORK", description = "작업 대기", value = "BEFORE_WORK"), - @ExampleObject(name = "IN_PROGRESS", description = "작업 중", value = "IN_PROGRESS"), - @ExampleObject(name = "COMPLETED", description = "작업 완료", value = "COMPLETED"), - @ExampleObject(name = "EXPIRED", description = "만료됨 (기존의 협의된 내용은 아니지만 어드민페이지에 필요하다고 생각했습니다. 추가 부탁드립니다.)", value = "EXPIRED"), - @ExampleObject(name = "ALL", description = "전체", value = "ALL")}) @RequestParam(name = "status", defaultValue = "ALL") @ValidEnum(value = PictureGenerateResponseStatusForAdmin.class, hasAllOption = true) String status, - @Parameter(description = "유저의 email") @RequestParam(name = "email", required = false) @Email(message = "올바른 email 형식이 아닙니다.") String email) { - Sort.Direction sortDirection = Sort.Direction.fromString(direction); - Pageable pageable = PageRequest.of(page, size, Sort.by(sortDirection, sortBy)); - if (email != null) { - return success(pictureGenerateRequestUseCase.getAllCreatorSubmittedByRequesterEmail(email, pageable)); - } - if ("ALL".equalsIgnoreCase(status)) { - return success(pictureGenerateRequestUseCase.getAllCreatorSubmitted(pageable)); - } else { - return success(pictureGenerateRequestUseCase.getAllCreatorSubmittedByPGRESStatus( - PictureGenerateResponseStatusForAdmin.valueOf(status), pageable)); - } - } - @Logging(item = LogItem.PGREQ, action = LogAction.VIEW, requester = LogRequester.ADMIN) @DeleteMapping("/{pictureGenerateRequestId}") public ResponseEntity> cancelRequest( 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 da068264..1b6efcdd 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 @@ -21,12 +21,12 @@ public interface PictureGenerateRequestPort { PictureGenerateRequest save(PictureGenerateRequest pictureGenerateRequest); - Page findByPGRESStatusInAndMatchToAdminIs(List statusList, + Page findByPGRESStatusInAndMatchToAdminIsAndPaidIsNull(List statusList, boolean matchToAdmin, Pageable pageable); Page findAll(Pageable pageable); - Page findByMatchToAdminIs(boolean matchToAdmin, 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 5986ad1e..e745d156 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 @@ -70,14 +70,14 @@ public class PictureGenerateRequestService implements PictureGenerateRequestUseC @Override public Page getAllAdminMatched(Pageable pageable) { - return pictureGenerateRequestPort.findByMatchToAdminIs(true, pageable) + return pictureGenerateRequestPort.findByMatchToAdminIsAndPaidIsNull(true, pageable) .map(convertPGREQToAdminMatchedResponseDto()); } @Override public Page getAllAdminMatchedByPGRESStatus( PictureGenerateResponseStatusForAdmin statusForAdmin, Pageable pageable) { - return pictureGenerateRequestPort.findByPGRESStatusInAndMatchToAdminIs( + return pictureGenerateRequestPort.findByPGRESStatusInAndMatchToAdminIsAndPaidIsNull( pgresStatusToPGRESStatusForAdminMapper.clientToDb(statusForAdmin), true, pageable) .map(convertPGRESToAdminMatchedResponseDto()); } @@ -106,20 +106,6 @@ public Page getAllPaidAdminMatche .map(convertPGREQToAdminMatchedResponseDto()); } - @Override - public Page getAllCreatorSubmitted(Pageable pageable) { - return pictureGenerateRequestPort.findByMatchToAdminIs(false, pageable) - .map(convertPGREQToCreatorSubmittedResponseDto()); - } - - @Override - public Page getAllCreatorSubmittedByPGRESStatus( - PictureGenerateResponseStatusForAdmin statusForAdmin, Pageable pageable) { - return pictureGenerateRequestPort.findByPGRESStatusInAndMatchToAdminIs( - pgresStatusToPGRESStatusForAdminMapper.clientToDb(statusForAdmin), false, pageable) - .map(convertPGRESToCreatorSubmittedResponseDto()); - } - @Override public Page getAllCreatorSubmittedByRequesterEmail(String email, Pageable pageable) { 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 350e5997..1e65128d 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 @@ -45,11 +45,6 @@ Page getAllAdminMatchedByRequeste Page getAllPaidAdminMatchedByRequesterEmail(String email, Pageable pageable); - Page getAllCreatorSubmitted(Pageable pageable); - - Page getAllCreatorSubmittedByPGRESStatus( - PictureGenerateResponseStatusForAdmin statusForAdmin, Pageable pageable); - Page getAllCreatorSubmittedByRequesterEmail(String email, Pageable pageable); diff --git a/genti-domain/src/main/java/com/gt/genti/picturegeneraterequest/repository/PictureGenerateRequestRepository.java b/genti-domain/src/main/java/com/gt/genti/picturegeneraterequest/repository/PictureGenerateRequestRepository.java index 41ae4f01..375c6faa 100644 --- a/genti-domain/src/main/java/com/gt/genti/picturegeneraterequest/repository/PictureGenerateRequestRepository.java +++ b/genti-domain/src/main/java/com/gt/genti/picturegeneraterequest/repository/PictureGenerateRequestRepository.java @@ -26,7 +26,7 @@ public interface PictureGenerateRequestRepository Optional findTop1ByRequesterOrderByIdDesc(User requester); - Page findAllByRequester(User requester, Pageable pageable); + Page findAllByRequesterAndPaidIsNull(User requester, Pageable pageable); @Query("SELECT p FROM PictureGenerateRequest p WHERE p.requester = :requester AND p.paid IS NOT NULL") Page findAllByRequesterAndPaidIsNotNull(User requester, Pageable pageable); @@ -83,19 +83,23 @@ List findByCreatorAndActiveStatus( @Param(value = "activeResponseStatusList") List activeResponseStatusList); + // 해당 조인은 pgreq의 paid를 사용하기 위함이다. pgres에서 paid를 참고하면 조인을 안해도 되는 방법이 있을까? @Query("select pgres " + "from PictureGenerateResponse pgres " - + "where pgres.request.matchToAdmin = :matchToAdmin " + + "join PictureGenerateRequest pgreq " + + "where pgres.request = pgreq " + + "and pgres.request.matchToAdmin = :matchToAdmin " + "and pgres.status in :statusList " + + "and pgreq.paid IS NULL " + "order by pgres.request.createdAt desc") - Page findByPictureGenerateResponseStatusInAndMatchToAdminIs( + Page findByPictureGenerateResponseStatusInAndMatchToAdminIsAndPaidIsNull( @Param(value = "statusList") List statusList, @Param(value = "matchToAdmin") boolean matchToAdmin, Pageable pageable); - Page findByMatchToAdminIs(boolean matchToAdmin, Pageable pageable); + Page findByMatchToAdminIsAndPaidIsNull(boolean matchToAdmin, Pageable pageable); @Query("SELECT p FROM PictureGenerateRequest p WHERE p.paid IS NOT NULL") Page findByMatchToAdminIsAndPaidIsNotNull(boolean matchToAdmin, Pageable pageable); From 9b4e32d70f3985641e41e7828363f6497d44e5c6 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Thu, 5 Dec 2024 11:08:45 +0900 Subject: [PATCH 15/15] =?UTF-8?q?Fix:=20#196=20JPQL=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20-=20=EC=9C=A0=EB=A3=8C=20=EC=9A=94=EC=B2=AD=EC=9D=80=20?= =?UTF-8?q?=EC=8B=A0=EA=B3=A0=EB=90=98=EC=96=B4=EB=8F=84=20=EB=A7=88?= =?UTF-8?q?=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=B3=BC=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/PictureCompletedRepository.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/genti-domain/src/main/java/com/gt/genti/picture/completed/repository/PictureCompletedRepository.java b/genti-domain/src/main/java/com/gt/genti/picture/completed/repository/PictureCompletedRepository.java index f5f58e63..2feee6b4 100644 --- a/genti-domain/src/main/java/com/gt/genti/picture/completed/repository/PictureCompletedRepository.java +++ b/genti-domain/src/main/java/com/gt/genti/picture/completed/repository/PictureCompletedRepository.java @@ -18,11 +18,15 @@ public interface PictureCompletedRepository extends JpaRepository findAllByPictureGenerateResponse(PictureGenerateResponse pictureGenerateResponse); @Query("select p " - + "from PictureCompleted p " - + "join PictureGenerateResponse pgres " - + "where pgres.request.requester = :user " - + "and pgres.status = com.gt.genti.picturegenerateresponse.model.PictureGenerateResponseStatus.COMPLETED " - + "and p.pictureGenerateResponse.id = pgres.id ") + + "from PictureCompleted p " + + "join PictureGenerateResponse pgres " + + "join PictureGenerateRequest pgreq " + + "where p.pictureGenerateResponse.id = pgres.id " + + "and pgres.request.id = pgreq.id " + + "and pgres.request.requester = :user " + + "and (pgres.status = com.gt.genti.picturegenerateresponse.model.PictureGenerateResponseStatus.COMPLETED " + + " or (pgres.status = com.gt.genti.picturegenerateresponse.model.PictureGenerateResponseStatus.REPORTED " + + " and pgreq.paid IS NOT NULL))") Page findAllByUserPagination(@Param(value = "user") User user, Pageable pageable); @Query("select p "