Skip to content

Commit

Permalink
Merge pull request #257 from WE-ARE-RACCOONS/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ywj9811 authored May 5, 2024
2 parents 14fe980 + cde732e commit a26df1e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ public ResponseDto<Void> logout(@AuthenticationPrincipal User user) {
return ResponseDto.create(AUTH_DELETE.getCode(), LOGOUT_USER.getMessage());
}

/**
* ์šฐ์„  ๋ฌธ์˜๋ฅผ ํ†ตํ•ด ํƒˆํ‡ด๋ฅผ ์‹œ์ผœ์ค€๋‹ค ํ–ˆ์œผ๋‹ˆ ์œ ์ € ํ† ํฐ์„ ๋ฐ›์„ ์ˆ˜ ์—†๋‹ค
* ๋‹ค๋งŒ, userId๋ฅผ ํ†ตํ•ด ํƒˆํ‡ด๋ฅผ ์ฒ˜๋ฆฌ์‹œ์ผœ์ค„ ๋•Œ ๊ทธ ์–ด๋–ค ๋ณด์•ˆ ์žฅ์น˜๋„ ์—†๋‹ค๋ฉด ๋ฌธ์ œ์ธ ๊ฒƒ ๊ฐ™์œผ๋‹ˆ ๊ด€๋ฆฌ์ž์˜ ๊ถŒํ•œ์œผ๋กœ ์ฒ˜๋ฆฌํ•œ๋‹ค
*/
@PostMapping("/signout/{provider}/{userId}")
@Operation(summary = "ํšŒ์› ํƒˆํ‡ด | ๊ด€๋ฆฌ์ž ํ† ํฐ ํ•„์š”", description = "ํšŒ์› ํƒˆํ‡ด ์ง„ํ–‰")
public ResponseDto<Void> signOut(@PathVariable Provider provider, @PathVariable Long userId) {
Expand Down Expand Up @@ -129,36 +125,4 @@ public ResponseDto<JwtTokenResponse> refresh(@AuthenticationPrincipal User user,
JwtTokenResponse jwtToken = jwtUseCase.regenerateToken(user, request);
return ResponseDto.create(AUTH_UPDATE.getCode(), SUCCESS_REGENERATE_TOKEN.getMessage(), jwtToken);
}

/**
* ์—ฌ๊ธฐ๋ถ€ํ„ฐ ์ผ€์ด์Šค B ์œ„ํ•œ ์ž„์‹œ ๋งคํ•‘
*/

@PostMapping("/senior/signup/b")
@Operation(summary = "๋Œ€ํ•™์›์ƒ ๊ฐ€์ž…(Case B) - ํ•„์ˆ˜ ๊ณผ์ •๋งŒ", description = "๋Œ€ํ•™์›์ƒ ํšŒ์›๊ฐ€์ž… - ํ•„์ˆ˜ ๊ณผ์ •๋งŒ")
public ResponseDto<JwtTokenResponse> singUpSeniorB(@RequestBody @Valid SeniorSignUpRequest request) {
User user = signUpUseCase.seniorSignUp(request);
JwtTokenResponse jwtToken = jwtUseCase.signIn(user);
return ResponseDto.create(SENIOR_CREATE.getCode(), CREATE_SENIOR.getMessage(), jwtToken);
}

@PostMapping("/senior/change/b")
@Operation(summary = "์„ ๋ฐฐ๋กœ ์ถ”๊ฐ€ ๊ฐ€์ž…(Case B) | ํ† ํฐ ํ•„์š”", description = "๋Œ€ํ•™์ƒ ๋Œ€ํ•™์›์ƒ์œผ๋กœ ๋ณ€๊ฒฝ ์ถ”๊ฐ€ ๊ฐ€์ž…")
public ResponseDto<JwtTokenResponse> changeSeniorB(@AuthenticationPrincipal User user,
@RequestBody @Valid SeniorChangeRequest changeRequest) {
User changeUser = signUpUseCase.changeSenior(user, changeRequest);
JwtTokenResponse jwtToken = jwtUseCase.changeSenior(changeUser);
return ResponseDto.create(SENIOR_CREATE.getCode(), CREATE_SENIOR.getMessage(), jwtToken);
}

@PostMapping("/login/{provider}/b")
@Operation(summary = "์†Œ์…œ ๋กœ๊ทธ์ธ", description = "ํšŒ์›์ธ ๊ฒฝ์šฐ JWT๋ฅผ, ํšŒ์›์ด ์•„๋‹Œ ๊ฒฝ์šฐ socialId๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค(ํšŒ์›๊ฐ€์ž…์€ ์ง„ํ–‰ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค).")
public ResponseDto<AuthResponse> authLoginB(@RequestBody @Valid CodeRequest request, @PathVariable Provider provider) {
SignInUseCase signInUseCase = selectOauth.selectSignIn(provider);
AuthUserResponse authUser = signInUseCase.getUserB(request);
if (authUser.user() == null)
return ResponseDto.create(AUTH_NONE.getCode(), NOT_REGISTERED_USER.getMessage(), authUser);
JwtTokenResponse jwtToken = jwtUseCase.signIn(authUser.user());
return ResponseDto.create(AUTH_ALREADY.getCode(), SUCCESS_AUTH.getMessage(), jwtToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public class PaymentController {
private final PaymentManageUseCase paymentManageUseCase;
@Value("${payple.redirect-uri}")
private String redirectUri;
@Value("${payple.redirect-uri-b}")
private String redirectUriB;
@Value("${payple.redirect-uri-dev}")
private String redirectUriDev;

Expand All @@ -41,11 +39,4 @@ public void resultGetWithDev(HttpServletResponse response, @ModelAttribute Payme
public void webhook(@RequestBody PaymentResultRequest request) {
log.info("payple webhook");
}

@PostMapping("/payple/result/b")
public void resultGetB(HttpServletResponse response, @ModelAttribute PaymentResultRequest request) throws IOException {
paymentManageUseCase.savePay(request);
response.sendRedirect(redirectUriB + request.PCD_PAY_OID());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -142,54 +142,4 @@ public ResponseDto<SeniorPossibleResponse> checkRole(@AuthenticationPrincipal Us
SeniorPossibleResponse possibleResponse = seniorMyPageUseCase.checkUser(user);
return ResponseDto.create(SENIOR_FIND.getCode(), GET_USER_CHECK.getMessage(), possibleResponse);
}

/**
* ์—ฌ๊ธฐ์„œ ๋ถ€ํ„ฐ Case B๋ฅผ ์œ„ํ•œ ์ฝ”๋“œ
*/
@GetMapping("/{seniorId}/b")
@Operation(summary = "๋Œ€ํ•™์›์ƒ ์ƒ์„ธ ์กฐํšŒ(Case B) | ํ† ํฐ ํ•„์š”")
public ResponseDto<SeniorDetailResponse> getSeniorDetailsB(@AuthenticationPrincipal User user,
@PathVariable Long seniorId) {
SeniorDetailResponse seniorDetail = seniorInfoUseCase.getSeniorDetail(user, seniorId);
return ResponseDto.create(SENIOR_FIND.getCode(), GET_SENIOR_INFO.getMessage(), seniorDetail);
}

@GetMapping("/{seniorId}/profile/b")
@Operation(summary = "๋Œ€ํ•™์›์ƒ ๋‹‰๋„ค์ž„~์—ฐ๊ตฌ์‹ค ๋“ฑ ๊ธฐ๋ณธ ์ •๋ณด ํ™•์ธ(Case B) | ํ† ํฐ ํ•„์š”", description = "์‹ ์ฒญ์„œ ์™„๋ฃŒ ํ›„ ๊ฒฐ์ œ์‹œ ๋…ธ์ถœ ํ•„์š”")
public ResponseDto<SeniorProfileResponse> getSeniorProfileB(@AuthenticationPrincipal User user, @PathVariable Long seniorId) {
SeniorProfileResponse seniorProfile = seniorInfoUseCase.getSeniorProfile(user, seniorId);
return ResponseDto.create(SENIOR_FIND.getCode(), GET_SENIOR_INFO.getMessage(), seniorProfile);
}

@GetMapping("/{seniorId}/times/b")
@Operation(summary = "๋Œ€ํ•™์›์ƒ ๊ฐ€๋Šฅ ์‹œ๊ฐ„ ํ™•์ธ(Case B) | ํ† ํฐ ํ•„์š”", description = "์‹ ์ฒญ์„œ ์ž‘์„ฑ์—์„œ ๊ฐ€๋Šฅ ์‹œ๊ฐ„ ์ž‘์„ฑ์‹œ ๋…ธ์ถœ ํ•„์š”")
public ResponseDto<AvailableTimesResponse> getSeniorTimesB(@PathVariable Long seniorId) {
AvailableTimesResponse times = seniorInfoUseCase.getSeniorTimes(seniorId);
return ResponseDto.create(SENIOR_FIND.getCode(), GET_SENIOR_TIME.getMessage(), times);
}

@GetMapping("/search/b")
@Operation(summary = "๋Œ€ํ•™์›์ƒ ๊ฒ€์ƒ‰์–ด ๊ฒ€์ƒ‰(Case B)", description = "find ํ•„์ˆ˜, sort ์„ ํƒ - ์•ˆ๋ณด๋‚ผ ๊ฒฝ์šฐ ์•„์˜ˆ ํŒŒ๋ผ๋ฏธํ„ฐ ์ถ”๊ฐ€x (์กฐํšŒ์ˆ˜ ๋‚ฎ์€์ˆœ low, ๋†’์€์ˆœ high), page์„ ํƒ (์•ˆ๋ณด๋‚ด๋ฉด ๊ธฐ๋ณธ 1ํŽ˜์ด์ง€)")
public ResponseDto<AllSeniorSearchResponse> getSearchSeniorB(@RequestParam String find,
@RequestParam(required = false) String sort,
@RequestParam(required = false) Integer page) {
AllSeniorSearchResponse searchSenior = seniorInfoUseCase.getSearchSenior(find, page, sort);
return ResponseDto.create(SENIOR_FIND.getCode(), GET_SENIOR_LIST_INFO.getMessage(), searchSenior);
}

@GetMapping("/field/b")
@Operation(summary = "๋Œ€ํ•™์›์ƒ ํ•„๋“œ ๊ฒ€์ƒ‰(Case B)", description = "๋ถ„์•ผ (๋ถ„์•ผ1,๋ถ„์•ผ2 ์ด๋Ÿฐ์‹์œผ๋กœ, ๋‹ค๋ฅธ๋ถ„์•ผ : others), ๋Œ€ํ•™์› ํ•„์ˆ˜ (๋Œ€ํ•™์›1,๋Œ€ํ•™์›2 ์ด๋Ÿฐ์‹์œผ๋กœ, ๋‹ค๋ฅธํ•™๊ต : others, ์ „์ฒด : all), ํŽ˜์ด์ง€ ์„ ํƒ ")
public ResponseDto<AllSeniorSearchResponse> getFieldSeniorB(@RequestParam String field,
@RequestParam String postgradu,
@RequestParam(required = false) Integer page) {
AllSeniorSearchResponse searchSenior = seniorInfoUseCase.getFieldSenior(field, postgradu, page);
return ResponseDto.create(SENIOR_FIND.getCode(), GET_SENIOR_LIST_INFO.getMessage(), searchSenior);
}

@GetMapping("/me/b")
@Operation(summary = "๋Œ€ํ•™์›์ƒ ๋งˆ์ดํŽ˜์ด์ง€ ๊ธฐ๋ณธ ์ •๋ณด ์กฐํšŒ | ํ† ํฐ ํ•„์š”(Case B)", description = "๋‹‰๋„ค์ž„, ํ”„๋กœํ•„ ์‚ฌ์ง„, ํ”„๋กœํ•„ ์ž‘์„ฑ ์—ฌ๋ถ€")
public ResponseDto<SeniorMyPageResponse> getSeniorInfoB(@AuthenticationPrincipal User user) {
SeniorMyPageResponse seniorMyPageResponse = seniorMyPageUseCase.getSeniorMyPage(user);
return ResponseDto.create(SENIOR_FIND.getCode(), GET_SENIOR_INFO.getMessage(), seniorMyPageResponse);
}
}

0 comments on commit a26df1e

Please sign in to comment.