Skip to content

Commit

Permalink
Release Merge
Browse files Browse the repository at this point in the history
* [SPR-192] refactor: 팔로우/팔로잉 조회 로직 수정, 팔로우/팔로잉 count 로직 수정

* [SPR-192] feat: 암장 이번주 팔로우 count 추가 코드

* [SPR-192] docs: 팔로우 조회 swagger 설명 추가

* [SPR-195] docs: 팔로우 조회 주석 삭제

* [SPR-192] docs: 팔로우 조회 swagger 주석 추가

* [SPR-195] feat: 공지사항 좋아요 관련 api 구현

* [SPR-195] docs: SwaggerError 추가

* [SPR-201] API담당자 추가

* [SPR-201] docs : API 담당자 지정

* [SPR-201] fix : 내가 작성한 숏츠 댓글 수정

- 응답에 shortsId 추가

* [SPR-201] fix : 태그에 번호 삭제

* [SPR-204] feat: 암장 관리자도 특정 암장 리뷰 조회 가능하도록 변경 (#161)

* [SPR-202] feat: 관리자가 속한 암장의 id 값을 반환하는 API 구현 (#159)

* [SPR-202] feat: 관리자가 속한 암장의 id 값을 반환하는 API 구현

* [SPR-202] feat: swagger api error 추가

* [SPR-202] fix: swagger api error 수정

* [SPR-203] feat: 암장 배경, 프로필 이미지를 Multipart에서 Url로 변경 (#160)

* [SPR-205] feat: 유저 알림 허용 범위 조회 api 구현

---------

Co-authored-by: gourderased <[email protected]>
Co-authored-by: Ga Dong Sik <[email protected]>
  • Loading branch information
3 people authored Jun 24, 2024
1 parent b2af4d0 commit ecf72dc
Show file tree
Hide file tree
Showing 36 changed files with 216 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import com.climeet.climeet_backend.domain.banner.dto.BannerResponseDto.BannerSimpleInfo;
import com.climeet.climeet_backend.domain.user.User;
import com.climeet.climeet_backend.global.security.CurrentUser;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
Expand All @@ -12,10 +14,13 @@

@RequiredArgsConstructor
@RestController
@Tag(name = "Banner")

public class BannerController {
private final BannerService bannerService;

@GetMapping("api/banners")
@Operation(summary = "2701 [훈]")
public ResponseEntity<List<BannerDetailInfo>> getBannerListBetweenDates(
@CurrentUser User user
){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.climeet.climeet_backend.domain.bestclimber.clear.dto.BestClearClimberResponseDto.BestClearClimberDetailInfo;
import com.climeet.climeet_backend.domain.user.User;
import com.climeet.climeet_backend.global.security.CurrentUser;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand All @@ -19,6 +20,7 @@ public class BestClearClimberController {
private final BestClearClimberService bestClearClimberService;

@GetMapping("/clear")
@Operation(summary = "701 - [훈]")
public ResponseEntity<List<BestClearClimberDetailInfo>> getClimberRankingListOrderClearCount(
@CurrentUser User user
){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.climeet.climeet_backend.domain.bestclimber.level.dto.BestLevelClimberResponseDto.BestLevelClimberDetailInfo;
import com.climeet.climeet_backend.domain.user.User;
import com.climeet.climeet_backend.global.security.CurrentUser;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand All @@ -19,6 +20,7 @@ public class BestLevelClimberController {
private final BestLevelClimberService bestLevelClimberService;

@GetMapping("/level")
@Operation(summary = "901 [훈]")
public ResponseEntity<List<BestLevelClimberDetailInfo>> getClimberRankingListOrderLevel(
@CurrentUser User user
){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.climeet.climeet_backend.domain.bestclimber.time.dto.BestTimeClimberResponseDto.BestTimeClimberDetailInfo;
import com.climeet.climeet_backend.domain.user.User;
import com.climeet.climeet_backend.global.security.CurrentUser;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand All @@ -20,6 +21,7 @@ public class BestTimeClimberController {
private final BestTimeClimberService bestTimeClimberService;

@GetMapping("/time")
@Operation(summary = "401 [훈]")
public ResponseEntity<List<BestTimeClimberDetailInfo>> getClimberRankingListOrderTime(
@CurrentUser User user
){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class BestFollowGymController {
/**
* [GET] [팔로우 순] 이번주 짐 랭킹 조회
*/
@Operation(summary = "[팔로우 순] 이번주 짐 랭킹 조회")
@Operation(summary = "[팔로우 순] 이번주 짐 랭킹 조회 - 1801 [훈]")
@GetMapping("/follow")
public ResponseEntity<List<BestFollowGymDetailInfo>> getGymRankingListOrderFollowCount() {
return ResponseEntity.ok(bestFollowGymService.getGymRankingListOrderFollowCount());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public class BestRecordGymController {
private final BestRecordGymService bestRecordGymService;

@Operation(summary = "[기록된 순(selected된 순)] 이번주 짐 랭킹 조회")
@Operation(summary = "[기록된 순(selected된 순)] 이번주 짐 랭킹 조회 - 601 [훈]")
@GetMapping("/record")
public ResponseEntity<List<BestRecordGymDetailInfo>> getGymRankingListOrderSelectionCount(
@CurrentUser User user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.climeet.climeet_backend.domain.bestroute.dto.BestRouteResponseDto.BestRouteDetailInfo;
import com.climeet.climeet_backend.domain.user.User;
import com.climeet.climeet_backend.global.security.CurrentUser;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand All @@ -20,6 +21,7 @@ public class BestRouteController {
private final BestRouteService bestRouteService;

@GetMapping
@Operation(summary = "1901 [훈]")
public ResponseEntity<List<BestRouteDetailInfo>> getRouteRankingList(
@CurrentUser User user
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.climeet.climeet_backend.global.security.CurrentUser;
import com.climeet.climeet_backend.global.utils.SwaggerApiError;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
Expand All @@ -21,6 +22,8 @@

@RestController
@RequiredArgsConstructor
@Tag(name = "Board", description = "공지사항")

public class BoardController {

private final BoardService boardService;
Expand All @@ -38,14 +41,14 @@ public ResponseEntity<List<BoardRetoolSimpleInfo>> findBoards() {

@GetMapping("/boards")
@SwaggerApiError(ErrorStatus._EMPTY_USER)
@Operation(summary = "공지사항 전체 조회, 공지사항 글에 image없으면 null로 반환")
@Operation(summary = "공지사항 전체 조회, 공지사항 글에 image없으면 null로 반환 - 2001 [훈]")
public ResponseEntity<List<BoardSimpleInfo>> findBoardList(){
return ResponseEntity.ok(boardService.findBoardList());
}

@GetMapping("/boards/{boardId}")
@SwaggerApiError({ErrorStatus._EMPTY_USER, ErrorStatus._BOARD_NOT_FOUND})
@Operation(summary = "특정 공지사항 조회")
@Operation(summary = "특정 공지사항 조회 - 2002 [훈]")
public ResponseEntity<BoardDetailInfo> findBoardById(@CurrentUser User user, @PathVariable Long boardId){
return ResponseEntity.ok(boardService.findBoardById(boardId, user));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.climeet.climeet_backend.global.security.CurrentUser;
import com.climeet.climeet_backend.global.utils.SwaggerApiError;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PatchMapping;
Expand All @@ -13,18 +14,20 @@

@RestController
@RequiredArgsConstructor
@Tag(name = "BoardLike", description = "[기록된 순(selected된 순)] 금주 베스트 루트 API")

public class BoardLikeController {
private final BoardLikeService boardLikeService;

@PatchMapping("/boards/{boardId}/like")
@PatchMapping("/boards/{boardId}/like - 2801 [미리]")
@SwaggerApiError({ErrorStatus._BOARD_NOT_FOUND, ErrorStatus._EXIST_BOARD_LIKE})
@Operation(summary = "특정 공지사항 좋아요")
public ResponseEntity<String> likeNotice(@CurrentUser User user, @PathVariable Long boardId){
boardLikeService.boardLike(user, boardId);
return ResponseEntity.ok("좋아요 완료");
}

@PatchMapping("/boards/{boardId}/unlike")
@PatchMapping("/boards/{boardId}/unlike - 2802 [미리]")
@SwaggerApiError({ErrorStatus._BOARD_NOT_FOUND, ErrorStatus._UNEXIST_BOARD_LIKE})
@Operation(summary = "특정 공지사항 좋아요 취소")
public ResponseEntity<String> unLikeNotice(@CurrentUser User user, @PathVariable Long boardId){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ClimberController {
private final ClimberService climberService;

@PostMapping("/login")
@Operation(summary = "OAuth 2.0 소셜 로그인", description = "**Enum 설명** : SocialType(provider에 입력)**: KAKAO, NAVER, APPLE \n\n responseType : SIGN_IN - 로그인 성공, SIGN_UP : 회원가입 필요, accessToken 필드의 토큰을 추가정보 입력 api에 넣어서 회원가입을 진행합니다.")
@Operation(summary = "OAuth 2.0 소셜 로그인 - 1301 [미리]", description = "**Enum 설명** : SocialType(provider에 입력)**: KAKAO, NAVER, APPLE \n\n responseType : SIGN_IN - 로그인 성공, SIGN_UP : 회원가입 필요, accessToken 필드의 토큰을 추가정보 입력 api에 넣어서 회원가입을 진행합니다.")
@SwaggerApiError({ErrorStatus._BAD_REQUEST, ErrorStatus._EMPTY_CLIMBING_GYM, ErrorStatus._EMPTY_MANAGER_GYM, ErrorStatus._INVALID_JWT, ErrorStatus._EXPIRED_JWT})
public ResponseEntity<LoginSimpleInfo> login(@RequestParam String provider, @RequestBody
ClimberTokenRequest climberTokenRequest) {
Expand All @@ -46,55 +46,55 @@ public ResponseEntity<LoginSimpleInfo> login(@RequestParam String provider, @Req
}

@PostMapping("/signup/extra")
@Operation(summary = "회원가입 추가 정보 입력 api", description = "\n\n**ClimbingLevel** : BEGINNER, NOVICE, INTERMEDIATE, ADVANCED, EXPERT\n\n**DiscoveryChannel** : INSTAGRAM_FACEBOOK, YOUTUBE, FRIEND_RECOMMENDATION, BLOG_CAFE_COMMUNITY, OTHER**")
@Operation(summary = "회원가입 추가 정보 입력 api - 1302 [미리]", description = "\n\n**ClimbingLevel** : BEGINNER, NOVICE, INTERMEDIATE, ADVANCED, EXPERT\n\n**DiscoveryChannel** : INSTAGRAM_FACEBOOK, YOUTUBE, FRIEND_RECOMMENDATION, BLOG_CAFE_COMMUNITY, OTHER**")
public ResponseEntity<LoginSimpleInfo> signUp(@RequestBody CreateClimberRequest createClimberRequest) {
return ResponseEntity.ok(climberService.signUp(createClimberRequest));
}

@GetMapping("/check-nickname/{nickName}")
@Operation(summary = "클라이머 닉네임 중복 확인", description = "**이미 존재하는 닉네임** : false \n\n **사용 가능한 닉네임** : true")
@Operation(summary = "클라이머 닉네임 중복 확인 - 1303 [미리]", description = "**이미 존재하는 닉네임** : false \n\n **사용 가능한 닉네임** : true")
public ResponseEntity<Boolean> checkNickName(@PathVariable String nickName){
boolean isDuplicated = !climberService.checkNicknameDuplication(nickName);
return ResponseEntity.ok(isDuplicated);

}

@GetMapping("/search")
@Operation(summary = "클라이머 검색 기능")
@Operation(summary = "클라이머 검색 기능 - 1304 [미리]")
public ResponseEntity<PageResponseDto<List<ClimberDetailInfo>>> getClimberSearchingList(@CurrentUser User currentUser, @RequestParam int page, @RequestParam int size, @RequestParam String climberName){
return ResponseEntity.ok(climberService.searchClimber(currentUser, climberName, page, size));
}

@GetMapping("/privacy-setting")
@Operation(summary = "클라이머 정보 공개 여부 조회(쇼츠, 홈짐, 평균완등률, 평균레벨)")
@Operation(summary = "클라이머 정보 공개 여부 조회(쇼츠, 홈짐, 평균완등률, 평균레벨) - 1305 [미리]")
public ResponseEntity<ClimberPrivacySettingInfo> getClimberPrivacyStatus(@CurrentUser User currentUser, @RequestParam long climberId){
return ResponseEntity.ok(climberService.getClimberPrivacySetting(climberId));

}

@PatchMapping("/shorts-privacy-setting")
@Operation(summary = "클라이머 쇼츠 공개 여부 변경")
@Operation(summary = "클라이머 쇼츠 공개 여부 변경 - 1306 [미리]")
public ResponseEntity<String> updateShortsPrivacyStatus(@CurrentUser User user){
climberService.updateShortsPrivacySetting(user);
return ResponseEntity.ok("공개 여부 변경 완료");
}

@PatchMapping("/homegym-privacy-setting")
@Operation(summary = "클라이머 홈짐 공개 여부 변경")
@Operation(summary = "클라이머 홈짐 공개 여부 변경 - 1307 [미리]")
public ResponseEntity<String> updateHomeGymPrivacyStatus(@CurrentUser User user){
climberService.updateHomeGymPrivacySetting(user);
return ResponseEntity.ok("공개 여부 변경 완료");
}

@PatchMapping("/averageCompletionRate-privacy-setting")
@Operation(summary = "클라이머 평균완등률 공개 여부 변경")
@Operation(summary = "클라이머 평균완등률 공개 여부 변경 - 1308 [미리]")
public ResponseEntity<String> updateAverageCompletionRatePrivacyStatus(@CurrentUser User user){
climberService.updateAverageCompletionRatePrivacySetting(user);
return ResponseEntity.ok("공개 여부 변경 완료");
}

@PatchMapping("/averageCompletionLevel-privacy-setting")
@Operation(summary = "클라이머 평균완등레벨 공개 여부 변경")
@Operation(summary = "클라이머 평균완등레벨 공개 여부 변경 - 1309 [미리]")
public ResponseEntity<String> updateAverageCompletionLevelPrivacyStatus(@CurrentUser User user){
climberService.updateAverageCompletionLevelPrivacySetting(user);
return ResponseEntity.ok("공개 여부 변경 완료");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@Tag(name = "ClimbingGym", description = "암장 관련 API")
@RestController
Expand All @@ -38,23 +36,23 @@ public class ClimbingGymController {

private final ClimbingGymService climbingGymService;

@Operation(summary = "전국 암장 검색 기능(자체 목록화)")
@Operation(summary = "전국 암장 검색 기능(자체 목록화) - 1010 [무빗]")
@GetMapping("/search/all")
public ResponseEntity<PageResponseDto<List<ClimbingGymSimpleResponse>>> getClimbingGymSearchingList(
@RequestParam("gymname") String gymName, @RequestParam int page, @RequestParam int size
) {
return ResponseEntity.ok(climbingGymService.searchClimbingGym(gymName, page, size));
}

@Operation(summary = "Manager가 등록된 암장 검색 기능")
@Operation(summary = "Manager가 등록된 암장 검색 기능 - 1009 [무빗]")
@GetMapping("/search")
public ResponseEntity<PageResponseDto<List<AcceptedClimbingGymSimpleResponse>>> getAcceptedClimbingGymSearchingList(
@RequestParam("gymname") String gymName, @RequestParam int page, @RequestParam int size
) {
return ResponseEntity.ok(climbingGymService.searchAcceptedClimbingGym(gymName, page, size));
}

@Operation(summary = "암장 프로필 정보 (상단) 불러오기")
@Operation(summary = "암장 프로필 정보 (상단) 불러오기 - 1001 [무빗]")
@SwaggerApiError({ErrorStatus._EMPTY_CLIMBING_GYM, ErrorStatus._EMPTY_MANAGER,
ErrorStatus._EMPTY_BACKGROUND_IMAGE})
@GetMapping("/{gymId}")
Expand All @@ -64,15 +62,15 @@ public ResponseEntity<ClimbingGymDetailResponse> getClimbingGymInfo(
}


@Operation(summary = "암장 프로필 정보 (탭) 불러오기", description = "탭에 들어가는 데이터는 null이 존재할 가능성이 상당히 높습니다.\n 또한 영업시간에서 특정 요일만 값이 없다면 정기휴일입니다.")
@Operation(summary = "암장 프로필 정보 (탭) 불러오기 - 1005 [무빗]", description = "탭에 들어가는 데이터는 null이 존재할 가능성이 상당히 높습니다.\n 또한 영업시간에서 특정 요일만 값이 없다면 정기휴일입니다.")
@SwaggerApiError({ErrorStatus._EMPTY_CLIMBING_GYM, ErrorStatus._ERROR_JSON_PARSE})
@GetMapping("/{gymId}/tab")
public ResponseEntity<ClimbingGymTabInfoResponse> getClimbingGymTabInfo(
@PathVariable Long gymId, @CurrentUser User user) {
return ResponseEntity.ok(climbingGymService.getClimbingGymTabInfo(gymId));
}

@Operation(summary = "암장 크롤링 정보 입력")
@Operation(summary = "암장 크롤링 정보 입력 - 1002 [무빗]")
@PostMapping("/{gymId}/info")
public ResponseEntity<ClimbingGymInfoResponse> updateClimbingGymInfo(
@PathVariable Long gymId) {
Expand All @@ -89,23 +87,25 @@ public ResponseEntity<List<ClimbingGymAverageLevelDetailResponse>> getFollowingU
climbingGymService.getFollowingUserAverageLevelInClimbingGym(gymId, user));
}

@Operation(summary = "암장 배경사진 변경 (1개만 등록 가능)")
@Operation(summary = "암장 배경사진 변경 (1개만 등록 가능) - 1006 [무빗]")
@SwaggerApiError({ErrorStatus._EMPTY_MANAGER, ErrorStatus._EMPTY_BACKGROUND_IMAGE})
@PatchMapping("/background-image")
public ResponseEntity<String> changeClimbingGymBackgroundImage(@CurrentUser User user,
@RequestPart MultipartFile image) {
return ResponseEntity.ok(climbingGymService.changeClimbingGymBackgroundImage(user, image));
@RequestBody String imageUrl) {
climbingGymService.changeClimbingGymBackgroundImage(user, imageUrl);
return ResponseEntity.ok("암장 배경사진 변경을 완료했습니다.");
}

@Operation(summary = "암장 프로필 이미지 변경 (1개만 등록 가능)")
@Operation(summary = "암장 프로필 이미지 변경 (1개만 등록 가능) - 1008 [무빗]")
@SwaggerApiError({ErrorStatus._EMPTY_MANAGER})
@PatchMapping("/profile-image")
public ResponseEntity<String> changeClimbingGymProfileImage(@CurrentUser User user,
@RequestPart MultipartFile image) {
return ResponseEntity.ok(climbingGymService.changeClimbingGymProfileImage(user, image));
@RequestBody String imageUrl) {
climbingGymService.changeClimbingGymProfileImage(user, imageUrl);
return ResponseEntity.ok("관리자 프로필 이미지 변경을 완료했습니다.");
}

@Operation(summary = "암장 제공 서비스 수정", description = "**Enum 설명**\n\n**ServiceBitmask** : 샤워\\_시설, 샤워\\_용품, 수건\\_제공, 간이\\_세면대, 초크\\_대여, 암벽화\\_대여, 삼각대\\_대여, 운동복\\_대여")
@Operation(summary = "암장 제공 서비스 수정 - 1012 [무빗]", description = "**Enum 설명**\n\n**ServiceBitmask** : 샤워\\_시설, 샤워\\_용품, 수건\\_제공, 간이\\_세면대, 초크\\_대여, 암벽화\\_대여, 삼각대\\_대여, 운동복\\_대여")
@SwaggerApiError({ErrorStatus._EMPTY_MANAGER})
@PatchMapping("/service")
public ResponseEntity<String> updateClimbingGymService(@CurrentUser User user,
Expand All @@ -114,7 +114,7 @@ public ResponseEntity<String> updateClimbingGymService(@CurrentUser User user,
return ResponseEntity.ok("암장 제공 서비스를 정상적으로 변경했습니다.");
}

@Operation(summary = "기본 가격(제공) 추가 & 수정")
@Operation(summary = "기본 가격(제공) 추가 & 수정 - 1007 [무빗]")
@SwaggerApiError({ErrorStatus._EMPTY_MANAGER, ErrorStatus._ERROR_JSON_PARSE})
@PostMapping("/price")
public ResponseEntity<String> updateClimbingGymPrice(@CurrentUser User user,
Expand All @@ -123,7 +123,7 @@ public ResponseEntity<String> updateClimbingGymPrice(@CurrentUser User user,
return ResponseEntity.ok("암장 기본 제공을 정상적으로 변경했습니다.");
}

@Operation(summary = "Manager가 등록된 암장 검색 기능 + 팔로잉 여부")
@Operation(summary = "Manager가 등록된 암장 검색 기능 + 팔로잉 여부 - 1011 [무빗]")
@SwaggerApiError({})
@GetMapping("/search/follow")
public ResponseEntity<PageResponseDto<List<AcceptedClimbingGymSimpleResponseWithFollow>>> getAcceptedClimbingGymSearchingListWithFollow(
Expand All @@ -134,7 +134,7 @@ public ResponseEntity<PageResponseDto<List<AcceptedClimbingGymSimpleResponseWith
climbingGymService.searchAcceptedClimbingGymWithFollow(gymName, page, size, user));
}

@Operation(summary = "특정 암장에서의 현재 내 실력 조회")
@Operation(summary = "특정 암장에서의 현재 내 실력 조회 - 1003 [무빗]")
@SwaggerApiError({})
@GetMapping("/{gymId}/my-skill")
public ResponseEntity<String> getFollowingUserAverageLevelInClimbingGym(
Expand Down
Loading

0 comments on commit ecf72dc

Please sign in to comment.