-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [REFACTOR] 모든 사업계획서 목록 조회 게시글 작성 여부 추가 * [REFACTOR] 메일 발송 내용 객체 분리 * [REFACTOR] 메일 내용 html 형식으로 변경
- Loading branch information
Showing
4 changed files
with
126 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
src/main/java/com/oya/kr/popup/support/PlanMailTemplate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package com.oya.kr.popup.support; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import com.oya.kr.popup.support.dto.response.MailResponse; | ||
|
||
/** | ||
* @author 김유빈 | ||
* @since 2024.03.10 | ||
*/ | ||
@Component | ||
public class PlanMailTemplate { | ||
|
||
/** | ||
* 사업계획서 대기 메일 메시지 작성 | ||
* | ||
* @parameter String | ||
* @return MailResponse | ||
* @author 김유빈 | ||
* @since 2024.03.10 | ||
*/ | ||
public MailResponse messageForWait(String nickname) { | ||
return new MailResponse( | ||
"[THEPOP] 제안해주신 사업계획서가 대기 상태로 전환되었습니다.", | ||
String.format("<!DOCTYPE html>\n" | ||
+ "<html lang=\"ko\">\n" | ||
+ "<head>\n" | ||
+ " <meta charset=\"UTF-8\">\n" | ||
+ " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" | ||
+ "</head>\n" | ||
+ "<body>\n" | ||
+ " <h2>제안해주신 사업계획서가 대기 상태로 전환되었습니다.</h2>" | ||
+ " <p>%s 고객님, 안녕하세요.</p>\n" | ||
+ " <p>제안해주신 사업계획서가 대기 상태로 전환되었습니다.</p>\n" | ||
+ " <p>대기 상태에는 커뮤니티 게시글을 자유롭게 작성하실 수 있습니다.</p>\n" | ||
+ " <p>이후 제안이 승인되면 팝업스토어 게시글을 올려 팝업스토어를 홍보하실 수 있습니다.</p>\n" | ||
+ " <p>팝업스토어 제안에 감사드립니다.</p>\n" | ||
+ " <p>THEPOP 드림</p>\n" | ||
+ "</body>\n" | ||
+ "</html>\n", nickname)); | ||
} | ||
|
||
/** | ||
* 사업계획서 승인 메일 메시지 작성 | ||
* | ||
* @parameter String | ||
* @return MailResponse | ||
* @author 김유빈 | ||
* @since 2024.03.10 | ||
*/ | ||
public MailResponse messageForApprove(String nickname) { | ||
return new MailResponse( | ||
"[THEPOP] 제안해주신 사업계획서가 승인되었습니다.", | ||
String.format("<!DOCTYPE html>\n" | ||
+ "<html lang=\"ko\">\n" | ||
+ "<head>\n" | ||
+ " <meta charset=\"UTF-8\">\n" | ||
+ " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" | ||
+ "</head>\n" | ||
+ "<body>\n" | ||
+ " <h2>제안해주신 사업계획서가 승인되었습니다.</h2>" | ||
+ " <p>%s 고객님, 안녕하세요.</p>\n" | ||
+ " <p>팝업스토어 입점을 축하드립니다!</p>\n" | ||
+ " <p>사업계획서가 승인되어 팝업스토어 게시글을 올려 팝업스토어를 홍보하실 수 있습니다.</p>\n" | ||
+ " <p>팝업스토어 제안에 감사드립니다.</p>\n" | ||
+ " <p>THEPOP 드림</p>\n" | ||
+ "</body>\n" | ||
+ "</html>\n" , nickname)); | ||
} | ||
|
||
/** | ||
* 사업계획서 철회 메일 메시지 작성 | ||
* | ||
* @parameter String | ||
* @return MailResponse | ||
* @author 김유빈 | ||
* @since 2024.03.10 | ||
*/ | ||
public MailResponse messageForDeny(String nickname) { | ||
return new MailResponse( | ||
"[THEPOP] 제안해주신 사업계획서가 거절되었습니다.", | ||
String.format( | ||
"<!DOCTYPE html>\n" | ||
+ "<html lang=\"ko\">\n" | ||
+ "<head>\n" | ||
+ " <meta charset=\"UTF-8\">\n" | ||
+ " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" | ||
+ "</head>\n" | ||
+ "<body>\n" | ||
+ " <h2>제안해주신 사업계획서가 거절되었습니다.</h2>" | ||
+ " <p>%s 고객님, 안녕하세요.</p>\n" | ||
+ " <p>안타깝지만 제안해주신 사업계획서는 현대백화점과 함께하지 못하게 되었습니다.</p>\n" | ||
+ " <p>이후에 더 좋은 사업계획서가 있다면 언제든 연락 바랍니다.</p>\n" | ||
+ " <p>팝업스토어 제안에 감사드립니다.</p>\n" | ||
+ " <p>THEPOP 드림</p>\n" | ||
+ "</body>\n" | ||
+ "</html>\n" , nickname) | ||
); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/oya/kr/popup/support/dto/response/MailResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.oya.kr.popup.support.dto.response; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public class MailResponse { | ||
|
||
private final String title; | ||
private final String content; | ||
} |