Skip to content

Commit

Permalink
Merge pull request #297 from Gamegoo-repo/fix/296
Browse files Browse the repository at this point in the history
[Fix/296] ์ธ์ฆ์ฝ”๋“œ ๋ฉ”์ผ ์ œ๋ชฉ ๋ฐ ๋งค์นญ SUCCESS internal API endpoint ์ˆ˜์ •
  • Loading branch information
Eunjin3395 authored Oct 14, 2024
2 parents 62be445 + 34883ea commit 8d4d26f
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public ApiResponse<MatchingResponse.matchingFoundResponseDTO> matchingFound(

}

@PatchMapping("/{memberId}/success/target/{targetMemberId}/{gameMode}")
@PatchMapping("/{memberId}/matching/success/target/{targetMemberId}/{gameMode}")
@Parameter(name = "targetMemberId", description = "๋งค์นญ ์ƒ๋Œ€ ํšŒ์›์˜ id ์ž…๋‹ˆ๋‹ค.")
@Operation(summary = "๋งค์นญ SUCCESS API", description = "๋‚˜์™€ ํŠน์ • ์ƒ๋Œ€ ํšŒ์›์˜ ๋งค์นญ ๊ธฐ๋ก ์ƒํƒœ๋ฅผ SUCCESS ์ƒํƒœ๋กœ ๋ณ€๊ฒฝํ•˜๊ณ , ์ฑ„ํŒ…๋ฐฉ์„ ์‹œ์ž‘ํ•ด uuid๋ฅผ ๋ฆฌํ„ดํ•˜๋Š” API ์ž…๋‹ˆ๋‹ค.")
public ApiResponse<String> matchingSuccess(
Expand Down
291 changes: 147 additions & 144 deletions src/main/java/com/gamegoo/service/member/AuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public Member joinMember(String email, String password, String gameName, String
.profileImage(randomProfileImage)
.blind(false)
.mike(false)
.mainPosition(0)
.subPosition(0)
.wantPosition(0)
.mainPosition(0)
.subPosition(0)
.wantPosition(0)
.mannerLevel(1)
.isAgree(isAgree)
.build();
Expand Down Expand Up @@ -128,17 +128,18 @@ public Member joinMember(String email, String password, String gameName, String

// ํšŒ์›๊ฐ€์ž… ์™„๋ฃŒ๋œ ์‚ฌ์šฉ์ž ์ •๋ณด ๋กœ๊ทธ๋กœ ์ถœ๋ ฅ
log.info("ํšŒ์›๊ฐ€์ž… ์™„๋ฃŒ - ์ด๋ฉ”์ผ: {}, ํ”„๋กœํ•„ ์ด๋ฏธ์ง€: {}, ์†Œํ™˜์‚ฌ๋ช…: {}, ํƒœ๊ทธ: {}, ํ‹ฐ์–ด: {}, ๋žญํฌ: {}",
member.getEmail(), member.getProfileImage(), member.getGameName(), member.getTag(), member.getTier(), member.getRank());

member.getEmail(), member.getProfileImage(), member.getGameName(), member.getTag(),
member.getTier(), member.getRank());

return member;
}

/**
* ํšŒ์›๊ฐ€์ž…์šฉ ์ด๋ฉ”์ผ ์ค‘๋ณต ํ™•์ธ ๊ฒ€์ฆ
*
* @param email
*/
public void verifyEmailforNewUser(String email){
public void verifyEmailforNewUser(String email) {
// ํ•ด๋‹น ์ด๋ฉ”์ผ์ด DB์— ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ
boolean isPresent = memberRepository.findByEmail(email).isPresent();

Expand All @@ -151,9 +152,10 @@ public void verifyEmailforNewUser(String email){

/**
* ๋น„๋ฐ€๋ฒˆํ˜ธ ์ฐพ๊ธฐ์šฉ ์ด๋ฉ”์ผ ์ค‘๋ณต ํ™•์ธ ๊ฒ€์ฆ
*
* @param email
*/
public void verifyEmailforExistUser(String email){
public void verifyEmailforExistUser(String email) {
// ํ•ด๋‹น ์ด๋ฉ”์ผ์ด DB์— ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ
boolean isPresent = memberRepository.findByEmail(email).isPresent();

Expand Down Expand Up @@ -210,7 +212,7 @@ public MemberResponse.RefreshTokenResponseDTO verifyRefreshToken(String refresh_
member.updateRefreshToken(new_refresh_token);
memberRepository.save(member);

return new MemberResponse.RefreshTokenResponseDTO(id,access_token, new_refresh_token);
return new MemberResponse.RefreshTokenResponseDTO(id, access_token, new_refresh_token);
}

/**
Expand Down Expand Up @@ -262,7 +264,7 @@ private void sendEmailInternal(String email, String certificationNumber) {
String htmlContent = getCertificationMessage(certificationNumber);

mimeMessageHelper.setTo(email);
mimeMessageHelper.setSubject("GamgGoo ์ด๋ฉ”์ผ ์ธ์ฆ ์ฝ”๋“œ");
mimeMessageHelper.setSubject("GameGoo ์ด๋ฉ”์ผ ์ธ์ฆ ์ฝ”๋“œ");
mimeMessageHelper.setText(htmlContent, true);
log.debug("Prepared email message for email: {}", email);

Expand All @@ -286,141 +288,142 @@ private void sendEmailInternal(String email, String certificationNumber) {
*/
private String getCertificationMessage(String certificationNumber) {
String certificationMessage = ""
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" +
" <head>\n" +
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
" <title>Gamegoo ์ด๋ฉ”์ผ ์ธ์ฆ</title>\n" +
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n" +
" </head>\n" +
" <body>\n" +
" <table\n" +
" style=\"\n" +
" width: 628px;\n" +
" box-sizing: border-box;\n" +
" border-collapse: collapse;\n" +
" background-color: #ffffff;\n" +
" border: 1px solid #c0c0c0;\n" +
" text-align: left;\n" +
" margin: 0 auto;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"width: 628px; height: 521px; padding: 53px 62px 42px 62px\"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td style=\"padding-bottom: 11.61px\">\n" +
" <img\n" +
" src=\"https://ifh.cc/g/BY3XG2.png\"\n" +
" style=\"display: block\"\n" +
" width=\"137\"\n" +
" height=\"24\"\n" +
" alt=\"Gamegoo\"\n" +
" />\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 20px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 25px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" ์ธ์ฆ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•ด์ฃผ์„ธ์š”\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 38px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #5a42ee;\n" +
" color: #2d2d2d;\n" +
" font-size: 32px;\n" +
" font-style: normal;\n" +
" font-weight: 700;\n" +
" line-height: 150%;\n" +
" margin-bottom: 30px;\n" +
" \"\n" +
" >\n" +
certificationNumber+
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 30px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 18px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" ์ด๋ฉ”์ผ ์ธ์ฆ ์ ˆ์ฐจ์— ๋”ฐ๋ผ ์ด๋ฉ”์ผ ์ธ์ฆ์ฝ”๋“œ๋ฅผ ๋ฐœ๊ธ‰ํ•ด๋“œ๋ฆฝ๋‹ˆ๋‹ค.\n" +
" ์ธ์ฆ์ฝ”๋“œ๋Š” ์ด๋ฉ”์ผ ๋ฐœ์†ก์‹œ์ ์œผ๋กœ๋ถ€ํ„ฐ 3๋ถ„ ๋™์•ˆ ์œ ํšจํ•ฉ๋‹ˆ๋‹ค.<br /><br />\n" +
" ๋งŒ์•ฝ ๋ณธ์ธ ์š”์ฒญ์— ์˜ํ•œ ์ด๋ฉ”์ผ ์ธ์ฆ์ด ์•„๋‹ˆ๋ผ๋ฉด,<br />\n" +
" [email protected]์œผ๋กœ ๊ด€๋ จ ๋‚ด์šฉ์„ ์ „๋‹ฌํ•ด ์ฃผ์„ธ์š”.<br /><br />\n" +
"\n" +
" ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"\n" +
" width: 628px;\n" +
" height: 292px;\n" +
" padding: 37px 0px 153px 62px;\n" +
" background: #f7f7f9;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <span\n" +
" style=\"\n" +
" color: #606060;\n" +
" font-family: Pretendard;\n" +
" font-size: 11px;\n" +
" font-style: normal;\n" +
" font-weight: 500;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" ๋ณธ ๋ฉ”์ผ์€ ๋ฐœ์‹  ์ „์šฉ์œผ๋กœ ํšŒ์‹ ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.<br />\n" +
" ๊ถ๊ธˆํ•˜์‹  ์ ์€ ๊ฒœ๊ตฌ ์ด๋ฉ”์ผ์ด๋‚˜ ์นด์นด์˜ค ์ฑ„๋„์„ ํ†ตํ•ด\n" +
" ๋ฌธ์˜ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.<br /><br />\n" +
" email: [email protected]<br />\n" +
" kakao: https://pf.kakao.com/_Rrxiqn<br />\n" +
" copyright 2024. GameGoo All Rights Reserved.<br />\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </body>\n" +
"</html>\n";
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" +
" <head>\n" +
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
" <title>Gamegoo ์ด๋ฉ”์ผ ์ธ์ฆ</title>\n" +
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n" +
" </head>\n" +
" <body>\n" +
" <table\n" +
" style=\"\n" +
" width: 628px;\n" +
" box-sizing: border-box;\n" +
" border-collapse: collapse;\n" +
" background-color: #ffffff;\n" +
" border: 1px solid #c0c0c0;\n" +
" text-align: left;\n" +
" margin: 0 auto;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"width: 628px; height: 521px; padding: 53px 62px 42px 62px\"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td style=\"padding-bottom: 11.61px\">\n" +
" <img\n" +
" src=\"https://ifh.cc/g/BY3XG2.png\"\n" +
" style=\"display: block\"\n" +
" width=\"137\"\n" +
" height=\"24\"\n" +
" alt=\"Gamegoo\"\n" +
" />\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 20px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 25px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" ์ธ์ฆ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•ด์ฃผ์„ธ์š”\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 38px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #5a42ee;\n" +
" color: #2d2d2d;\n" +
" font-size: 32px;\n" +
" font-style: normal;\n" +
" font-weight: 700;\n" +
" line-height: 150%;\n" +
" margin-bottom: 30px;\n" +
" \"\n" +
" >\n" +
certificationNumber +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 30px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 18px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" ์ด๋ฉ”์ผ ์ธ์ฆ ์ ˆ์ฐจ์— ๋”ฐ๋ผ ์ด๋ฉ”์ผ ์ธ์ฆ์ฝ”๋“œ๋ฅผ ๋ฐœ๊ธ‰ํ•ด๋“œ๋ฆฝ๋‹ˆ๋‹ค.\n" +
" ์ธ์ฆ์ฝ”๋“œ๋Š” ์ด๋ฉ”์ผ ๋ฐœ์†ก์‹œ์ ์œผ๋กœ๋ถ€ํ„ฐ 3๋ถ„ ๋™์•ˆ ์œ ํšจํ•ฉ๋‹ˆ๋‹ค.<br /><br />\n" +
" ๋งŒ์•ฝ ๋ณธ์ธ ์š”์ฒญ์— ์˜ํ•œ ์ด๋ฉ”์ผ ์ธ์ฆ์ด ์•„๋‹ˆ๋ผ๋ฉด,<br />\n" +
" [email protected]์œผ๋กœ ๊ด€๋ จ ๋‚ด์šฉ์„ ์ „๋‹ฌํ•ด ์ฃผ์„ธ์š”.<br /><br />\n" +
"\n" +
" ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"\n" +
" width: 628px;\n" +
" height: 292px;\n" +
" padding: 37px 0px 153px 62px;\n" +
" background: #f7f7f9;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <span\n" +
" style=\"\n" +
" color: #606060;\n" +
" font-family: Pretendard;\n" +
" font-size: 11px;\n" +
" font-style: normal;\n" +
" font-weight: 500;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" ๋ณธ ๋ฉ”์ผ์€ ๋ฐœ์‹  ์ „์šฉ์œผ๋กœ ํšŒ์‹ ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.<br />\n" +
" ๊ถ๊ธˆํ•˜์‹  ์ ์€ ๊ฒœ๊ตฌ ์ด๋ฉ”์ผ์ด๋‚˜ ์นด์นด์˜ค ์ฑ„๋„์„ ํ†ตํ•ด\n" +
" ๋ฌธ์˜ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.<br /><br />\n" +
" email: [email protected]<br />\n" +
" kakao: https://pf.kakao.com/_Rrxiqn<br />\n" +
" copyright 2024. GameGoo All Rights Reserved.<br />\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </body>\n" +
"</html>\n";

return certificationMessage;
}
Expand Down

0 comments on commit 8d4d26f

Please sign in to comment.