Skip to content
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

release: 0.5.0 #302

Merged
merged 33 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
13abe54
feat: 소셜 연동 해제
zzo3ozz Jun 25, 2024
d969dbb
feat: 소셜 연동 추가 API 시그니처
zzo3ozz Jun 25, 2024
4e81318
feat: 소셜 연동 추가 기능
zzo3ozz Jun 25, 2024
b6fa642
refactor: 유저 정보 체크 method명 변경
zzo3ozz Jun 25, 2024
31a662f
feat: 연결된 소셜 서버 목록 반환 API
zzo3ozz Jun 25, 2024
76256f8
refactor: 소셜 연동 관련 API 엔드포인트 변경
zzo3ozz Jun 25, 2024
1a3d489
feat: 회원탈퇴 API
zzo3ozz Jun 25, 2024
c94c7ce
refactor: logging용 sout 삭제, log.info 처리
zzo3ozz Jul 3, 2024
c189fbf
refactor: 소셜 에러 케이스 별 에러 메세지 분리
zzo3ozz Jul 8, 2024
cbee7c4
refactor: 리뷰 공개, 비공개에 따른 함수들 변경
yujiyea Jul 20, 2024
509e536
refactor: 리뷰 조회시 리뷰 공개, 비공개 반환
yujiyea Jul 20, 2024
f7c7e35
fix: 리뷰 모아보기 페이징 문제 해결 & 리뷰 공개 체크해서 페이징하도록 수정
yujiyea Jul 21, 2024
11aaa4e
[refactor] 내 루트 조회할 때나 루트 상세 조회 시 공개/비공개 여부 포함하도록 수정
Hwater00 Jul 22, 2024
12c1516
fix: publishingInfo Request body에서 publishCategory 매핑을 못하는 문제 수정
zzo3ozz Jul 22, 2024
ced1e4d
refactor : 타인 카테고리 조회 시 토큰 처리 삭제
kchaeeun Jul 22, 2024
5305b56
Merge branch 'gusto-umc:main' into refactor/privateCategory
kchaeeun Jul 22, 2024
f5162f9
refactor : 가게 조회 시 리뷰의 경우 토큰 받지 않게 수정
kchaeeun Jul 22, 2024
f9b06ba
Merge branch 'refactor/privateCategory' of https://github.com/kchaeeu…
kchaeeun Jul 22, 2024
70ad7f5
Revert "fix: publishingInfo Request body에서 publishCategory 매핑을 못하는 문제…
zzo3ozz Jul 22, 2024
2ccced5
Merge branch 'develop' into feat/withdrawal
zzo3ozz Jul 22, 2024
995bec4
refactor : 가게 조회 시 토큰이 있는 경우 찜 여부 반환, 없는 경우 찜 여부 반환 x
kchaeeun Jul 22, 2024
1c9696f
fix: publishingInfo Request body에서 매핑하지 못는 문제 수정
zzo3ozz Jul 22, 2024
0372609
Merge remote-tracking branch 'origin/feat/withdrawal' into feat/withd…
zzo3ozz Jul 22, 2024
28d0bef
refactor : 가게 상세 조회 시 토큰 여부에 따라 찜 여부 반환
kchaeeun Jul 23, 2024
0491bd8
fix : hard delete와의 충돌 방지를 위해 수정하지 않음
kchaeeun Jul 23, 2024
1730441
refactor : 카테고리 조회 시 PublishCategory 값이 bool 값으로 출력되게 수정
kchaeeun Jul 23, 2024
da101ba
refactor : 필요 없는 reponse 값 삭제
kchaeeun Jul 23, 2024
92ecddc
refactor: 리뷰 모아보기 - 인스타뷰 API가 타인, 나를 구분할 필요없음, 타인 API가 따로 있기 때문에 타인 모…
yujiyea Jul 24, 2024
042f92c
Merge pull request #296 from yujiyea/refactor/crud_review(publicOrNot)
zzo3ozz Jul 25, 2024
d624cf0
Merge pull request #298 from Hwater00/feat/Public_Route
zzo3ozz Jul 25, 2024
cf87b76
Merge pull request #299 from zzo3ozz/feat/withdrawal
zzo3ozz Jul 25, 2024
5da5a34
Merge pull request #301 from kchaeeun/refactor/privateCategory
zzo3ozz Jul 25, 2024
c4f2ec2
fix: 중복된 어노테이션 삭제
zzo3ozz Jul 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions gusto/.idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public PagingResponse getAllGroupList(Long groupId, Long groupListId,User user)

// 그룹 리스트에 해당하는 각 상점 정보 조회
List<GroupListResponse> list = groupLists.stream().map(gl -> {
Optional<Review> topReviewOptional = reviewRepository.findFirstByStoreOrderByLikedDesc(user,gl.getStore()); // 가장 좋아요가 많은 review
Optional<Review> topReviewOptional = reviewRepository.findFirstByStoreOrderByLikedDesc(gl.getStore()); // 가장 좋아요가 많은 review
String reviewImg = topReviewOptional.map(Review::getImg1).orElse("");
return GroupListResponse.builder()
.groupListId(gl.getGroupListId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public ResponseEntity<PagingResponse> allMyCategory(
@RequestParam(name = "nickname", required = false) String nickname,
@RequestParam(name = "townName", required = false) String townName,
@RequestParam(name = "myCategoryId", required = false) Long myCategoryId) { // paging 처리를 위해 마지막 리턴 myCategoryId 사용
User user = authUser.getUser();

User user = (nickname == null) ? authUser.getUser() : null;
PagingResponse pagingResponse = myCategoryService.getAllMyCategory(user, nickname, townName, myCategoryId);

return ResponseEntity.status(HttpStatus.OK).body(pagingResponse);
Expand All @@ -51,19 +52,15 @@ public ResponseEntity<PagingResponse> allPinByMyCategory(
@RequestParam(name = "townName", required = false) String townName,
@RequestParam(name = "pinId", required = false) Long pinId,
@RequestParam(name = "storeName", required = false) String storeName,
@RequestParam(name = "sort", required = false) String sort// paging 처리를 위해 마지막 리턴 pinId 사용
@RequestParam(name = "sort", required = false) String sort // paging 처리를 위해 마지막 리턴 pinId 사용
) {
User user = authUser.getUser();

User user = (nickname == null) ? authUser.getUser() : null;
PagingResponse pagingResponse = myCategoryService.getAllPinByMyCategory(user, nickname, myCategoryId, townName, pinId, storeName, sort);

return ResponseEntity.status(HttpStatus.OK).body(pagingResponse);
}

/**
* 내 카테고리 공개 상태 업데이트
* [
*/

/**
* 내 카테고리 생성
* [POST] /myCategories
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.umc.gusto.domain.myCategory.model.response;

import com.umc.gusto.global.common.PublishStatus;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

@Builder
Expand All @@ -12,8 +12,9 @@ public class MyCategoryResponse{
String myCategoryName;
String myCategoryScript;
Integer myCategoryIcon;
PublishStatus publishCategory;
PublishStatus userPublishCategory;
@JsonInclude(JsonInclude.Include.NON_NULL)
Boolean publishCategory;
Boolean userPublishCategory;
Integer pinCnt;
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@
@Builder
public class PagingResponse {
private boolean hasNext;
private PublishStatus userPublishCategory;
private PublishStatus publishCategory;
private List<?> result;
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ public class MyCategoryServiceImpl implements MyCategoryService {
public PagingResponse getAllMyCategory(User user, String nickname, String townName, Long myCategoryId) {
Page<MyCategory> myCategoryList;
if (nickname != null) {
if (nickname.equals(user.getNickname())) {
throw new GeneralException(Code.USER_NOT_FOUND_SELF);
}

user = userRepository.findByNickname(nickname) // 타 닉네임 조회
.orElseThrow(() -> new GeneralException(Code.USER_NOT_FOUND));
if (myCategoryId != null) {
Expand Down Expand Up @@ -78,8 +74,8 @@ public PagingResponse getAllMyCategory(User user, String nickname, String townNa
.myCategoryName(myCategory.getMyCategoryName())
.myCategoryScript(myCategory.getMyCategoryScript())
.myCategoryIcon(myCategory.getMyCategoryIcon())
.publishCategory(myCategory.getPublishCategory())
.userPublishCategory(finalUser.getPublishCategory())
.publishCategory(myCategory.getPublishCategory() == PublishStatus.PUBLIC) // PublishCategory가 PUBLIC이면 true 반환
.userPublishCategory(finalUser.getPublishCategory() == PublishStatus.PUBLIC)
.pinCnt(pinList.size())
.build();
})
Expand Down Expand Up @@ -165,7 +161,7 @@ public PagingResponse getAllPinByMyCategory(User user, String nickname, Long myC
List<PinByMyCategoryResponse> result = pinList.stream() // townName을 기준으로 보일 수 있는 store가 포함된 pin만 보이기
.map(pin -> {
Store store = pin.getStore();
List<Review> topReviews = reviewRepository.findFirst4ByStoreOrderByLikedDesc(store, finalUser); // 가장 좋아요가 많은 review // 가장 좋아요가 많은 review 이미지(TO DO: 3개 출력으로 변경)
List<Review> topReviews = reviewRepository.findFirst4ByStoreOrderByLikedDesc(store); // 가장 좋아요가 많은 review // 가장 좋아요가 많은 review 이미지(TO DO: 3개 출력으로 변경)
Integer reviewCnt = reviewRepository.countByStoreAndUserNickname(store, finalUser.getNickname()); // 내가 작성한 리뷰의 개수 == 방문 횟수

String img1 = !topReviews.isEmpty() ? topReviews.get(0).getImg1() : "";
Expand All @@ -188,8 +184,6 @@ public PagingResponse getAllPinByMyCategory(User user, String nickname, Long myC

return PagingResponse.builder()
.hasNext(pinList.hasNext())
.userPublishCategory(user.getPublishCategory())
.publishCategory(myCategory.get().getPublishCategory())
.result(result)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ public ResponseEntity<?> getRandomFeed(@AuthenticationPrincipal AuthUser authUse
}

@GetMapping("/search")
public ResponseEntity<?> searchFeed(@RequestParam(name = "keyword", required = false) String keyword, @RequestParam(name = "hashTags", required = false) List<Long> hashTags){
return ResponseEntity.status(HttpStatus.OK).body(feedService.searchFeed(keyword, hashTags));
public ResponseEntity<?> searchFeed(@RequestParam(name = "keyword", required = false) String keyword, @RequestParam(name = "hashTags", required = false) List<Long> hashTags,
@RequestParam(name = "cursorId", required = false) Long cursorId){
return ResponseEntity.status(HttpStatus.OK).body(feedService.searchFeed(keyword, hashTags, cursorId));
}

@GetMapping("{reviewId}")
Expand Down
20 changes: 4 additions & 16 deletions gusto/src/main/java/com/umc/gusto/domain/review/entity/Review.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,6 @@ public void updateTaste(Integer taste) {
this.taste = taste;
}

public void updateSpiciness(Integer spiciness) {
this.spiciness = spiciness;
}

public void updateMood(Integer mood){
this.mood = mood;
}

public void updateToilet(Integer toilet){
this.toilet = toilet;
}

public void updateParking(Integer parking){
this.parking = parking;
}

public void updateComment(String comment){
this.comment = comment;
}
Expand Down Expand Up @@ -144,4 +128,8 @@ public void updateLiked(String type){
if(type.equals("like")) this.liked += 1;
else if(type.equals("unlike")) this.liked -= 1;
}

public void updatePublishReview(boolean check){
this.publishReview = PublishStatus.of(check);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,8 @@ public class CreateReviewRequest {
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer taste;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer spiciness;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer mood;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer toilet;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer parking;
@Size(max=200, message = "내용은 200자를 초과할 수 없습니다.")
String comment;
@NotNull(message = "전체공개, 나만보기 둘 중 하나는 선택해야 합니다.")
boolean publicCheck;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,7 @@ public class UpdateReviewRequest {
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer taste;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer spiciness;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer mood;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer toilet;
@DecimalMin(value = "0", message = "점수가 0보다 작을 수 없습니다.")
@DecimalMax(value = "5", message = "점수가 5보다 클 수 없습니다.")
Integer parking;
@Size(max=200, message = "내용은 200자를 초과할 수 없습니다.")
String comment;
Boolean publicCheck; //Boolean box화한 기본 자료형을 사용하여 null이 들어올 수 있도록 한다.
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,9 @@ public class ReviewDetailResponse {
List<Long> hashTags;
Integer taste;
@JsonInclude(JsonInclude.Include.NON_NULL)
Integer spiciness;
@JsonInclude(JsonInclude.Include.NON_NULL)
Integer mood;
@JsonInclude(JsonInclude.Include.NON_NULL)
Integer toilet;
@JsonInclude(JsonInclude.Include.NON_NULL)
Integer parking;
@JsonInclude(JsonInclude.Include.NON_NULL)
String comment;
Integer likeCnt;
boolean publicCheck;

public static ReviewDetailResponse of(Review review, List<Long> hashTags){
return ReviewDetailResponse.builder()
Expand All @@ -41,12 +34,9 @@ public static ReviewDetailResponse of(Review review, List<Long> hashTags){
.menuName(review.getMenuName())
.hashTags(hashTags)
.taste(review.getTaste())
.spiciness(review.getSpiciness())
.mood(review.getMood())
.toilet(review.getToilet())
.parking(review.getParking())
.comment(review.getComment())
.likeCnt(review.getLiked())
.publicCheck(review.getPublishReview().isCheck())
.build();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@

import java.util.List;



@Builder
@Getter
public class SearchFeedResponse {
List<BasicViewResponse> reviews;
boolean hasNext;
Long cursorId;


public static SearchFeedResponse of(List<BasicViewResponse> reviews){
public static SearchFeedResponse of(List<BasicViewResponse> reviews, boolean hasNext, Long cursorId){
return SearchFeedResponse.builder()
.reviews(reviews)
.hasNext(hasNext)
.cursorId(cursorId)
.build();
}
}
Loading