diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml index 5f10c08..ed979f5 100644 --- a/.github/workflows/dev_deploy.yml +++ b/.github/workflows/dev_deploy.yml @@ -58,5 +58,4 @@ jobs: version_label: github-action-${{ steps.current-time.outputs.formattedTime }} region: ap-northeast-1 deployment_package: deploy/deploy.zip - wait_for_environment_recovery: 300 -# wait_for_deployment: false + wait_for_deployment: false diff --git a/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java b/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java index dd07342..ee00654 100644 --- a/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java +++ b/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java @@ -99,6 +99,8 @@ public void init(){ @Transactional public OAuthResult.OAuthResultDto SocialLogin(MemberRequestDto.OAuthRequestDto request,String type) { Member member = memberRepository.findByEmail(request.getEmail()).orElse(null); + + request.toString(); if(member != null) { String accessToken = null; Optional fcmToken = fcmTokenRepository.findByTokenAndSerialNumber(request.getFcmToken(), request.getSerialNumber()); diff --git a/src/main/java/zipdabang/server/service/serviceImpl/RecipeServiceImpl.java b/src/main/java/zipdabang/server/service/serviceImpl/RecipeServiceImpl.java index 1a4f73e..2bcb77e 100644 --- a/src/main/java/zipdabang/server/service/serviceImpl/RecipeServiceImpl.java +++ b/src/main/java/zipdabang/server/service/serviceImpl/RecipeServiceImpl.java @@ -567,46 +567,46 @@ public Page recipeListByCategory(Long categoryId, Integer pageIndex, Mem if(recipeCategory.isEmpty()) throw new RecipeException(CommonStatus.RECIPE_NOT_FOUND); - QRecipe qRecipe = recipe; - QRecipeCategoryMapping qRecipeCategoryMapping = recipeCategoryMapping; - QFollow qFollow = follow; - - //팔로잉 레시피 갯수 계산(일주일 전 것까지) - Long followingCount = queryFactory - .select(recipe.count()) - .from(recipe) - .join(recipe.categoryMappingList, recipeCategoryMapping).fetchJoin() - .where(blockedMemberNotInForRecipe(member), - recipeCategoryMapping.category.id.eq(categoryId), - getFollowerRecipeCondition(member), - recipe.createdAt.after(LocalDateTime.now().minusWeeks(1)) - ) - .fetchOne(); - +// QRecipe qRecipe = recipe; +// QRecipeCategoryMapping qRecipeCategoryMapping = recipeCategoryMapping; +// QFollow qFollow = follow; +// +// //팔로잉 레시피 갯수 계산(일주일 전 것까지) +// Long followingCount = queryFactory +// .select(recipe.count()) +// .from(recipe) +// .join(recipe.categoryMappingList, recipeCategoryMapping).fetchJoin() +// .where(blockedMemberNotInForRecipe(member), +// recipeCategoryMapping.category.id.eq(categoryId), +// getFollowerRecipeCondition(member), +// recipe.createdAt.after(LocalDateTime.now().minusWeeks(1)) +// ) +// .fetchOne(); +// List content = new ArrayList<>(); - - if(followingCount >= pageIndex*pageSize){ - //index를 넘지 않으면 팔로잉 레시피 먼저 - content = queryFactory - .selectFrom(recipe) - .join(recipe.categoryMappingList, recipeCategoryMapping).fetchJoin() - .where(blockedMemberNotInForRecipe(member), - recipeCategoryMapping.category.id.eq(categoryId), - getFollowerRecipeCondition(member), - recipe.createdAt.after(LocalDateTime.now().minusWeeks(1)) - ) - .orderBy(recipe.createdAt.desc()) - .offset(pageIndex*pageSize) - .limit(pageSize) - .fetch(); - - } else if(followingCount >(pageIndex-1)*pageSize) { - //index에 끼어있으면 팔로잉,일반 레시피 둘 다. offset과 pagesize 잘 계산해야함 - - } else{ - //일반 레시피만. offset 잘 계산해야함 - - } +// +// if(followingCount >= pageIndex*pageSize){ +// //index를 넘지 않으면 팔로잉 레시피 먼저 +// content = queryFactory +// .selectFrom(recipe) +// .join(recipe.categoryMappingList, recipeCategoryMapping).fetchJoin() +// .where(blockedMemberNotInForRecipe(member), +// recipeCategoryMapping.category.id.eq(categoryId), +// getFollowerRecipeCondition(member), +// recipe.createdAt.after(LocalDateTime.now().minusWeeks(1)) +// ) +// .orderBy(recipe.createdAt.desc()) +// .offset(pageIndex*pageSize) +// .limit(pageSize) +// .fetch(); +// +// } else if(followingCount >(pageIndex-1)*pageSize) { +// //index에 끼어있으면 팔로잉,일반 레시피 둘 다. offset과 pagesize 잘 계산해야함 +// +// } else{ +// //일반 레시피만. offset 잘 계산해야함 +// +// } content = queryFactory diff --git a/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java b/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java index f5dfd17..21c8a51 100644 --- a/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java +++ b/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java @@ -57,6 +57,14 @@ public String toString() { @Getter @Setter public static class OAuthRequestDto { + @Override + public String toString() { + return "OAuthRequestDto{" + + "email='" + email + '\'' + + ", fcmToken='" + fcmToken + '\'' + + ", serialNumber='" + serialNumber + '\'' + + '}'; + } private String email; private String fcmToken; private String serialNumber;