-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from kimgunwooo/main
멘토링 관련 알림 폼 및 전략 추가
- Loading branch information
Showing
8 changed files
with
139 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
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
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
54 changes: 54 additions & 0 deletions
54
...ava/com/example/demo/domain/newsletter/strategy/MentoringNoticeEmailDeliveryStrategy.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,54 @@ | ||
package com.example.demo.domain.newsletter.strategy; | ||
|
||
import com.example.demo.domain.recruitment_board.domain.dto.vo.RecruitmentBoardType; | ||
import com.example.demo.domain.recruitment_board.domain.entity.RecruitmentBoard; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class MentoringNoticeEmailDeliveryStrategy implements EmailDeliveryStrategy { | ||
private String type; | ||
private String topicTag; | ||
private String title; | ||
private String author; | ||
private String link; | ||
|
||
@Override | ||
public String getTemplateName() { | ||
return "mentoring_notice"; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getVariables() { | ||
Map<String, Object> variables = new HashMap<>(); | ||
variables.put("type", type); | ||
variables.put("topicTag", topicTag); | ||
variables.put("title", title); | ||
variables.put("author", author); | ||
variables.put("link", link); | ||
return variables; | ||
} | ||
|
||
@Override | ||
public String getSubject() { | ||
return "[야밤의금오톡] '멘토링 공고' 새 글 알림"; | ||
} | ||
|
||
public static MentoringNoticeEmailDeliveryStrategy create(RecruitmentBoard recruitmentBoard) { | ||
if (!recruitmentBoard.getType().equals(RecruitmentBoardType.MENTORING)) { | ||
throw new IllegalArgumentException("멘토링에 대한 이메일 알림만 허용합니다."); | ||
} | ||
return new MentoringNoticeEmailDeliveryStrategy( | ||
recruitmentBoard.getType().name(), | ||
recruitmentBoard.getTag().name(), | ||
recruitmentBoard.getTitle(), | ||
recruitmentBoard.getUser().getNickname(), | ||
"https://프론트도메인/~" // TODO. 수정 필요 | ||
); | ||
} | ||
} |
Submodule security
updated
from 3cd7f7 to 3d696e
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,46 @@ | ||
<!DOCTYPE html> | ||
<html lang="ko"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>[야밤의금오톡] '멘토링 공고' 새 글 알림</title> | ||
</head> | ||
<body> | ||
<p>안녕하세요, 야밤의금오톡 뉴스레터를 구독해주신 여러분!</p> | ||
|
||
<br> | ||
|
||
<p> | ||
새로운 <strong th:text="${type}">멘토링 타입</strong> 그룹을 모집하는 게시글이 게시되었습니다.<br /> | ||
<strong th:text="${topicTag}">멘토링 주제 태그</strong>에 관심이 있는 분들은 아래 게시글을 통해 자세한 내용을 확인해주시기 바랍니다. | ||
</p> | ||
|
||
<ul> | ||
<li> | ||
<h3>멘토링 제목 : <span th:text="${title}">게시글 제목</span></h3> | ||
</li> | ||
<li> | ||
<h3>작성자 : <span th:text="${author}">작성자</span></h3> | ||
</li> | ||
<li> | ||
<h3>게시글 바로가기 : <a th:href="${link}">게시글 링크</a></h3> | ||
</li> | ||
</ul> | ||
|
||
<p> | ||
멘토링에 참여하여 함께 학습하고 성장하고자 하는 여러분들의 많은 관심 | ||
부탁드립니다. | ||
</p> | ||
|
||
<p> | ||
추가 문의사항이 있으신 분들은 게시글 아래 댓글로 문의해주시면 | ||
감사하겠습니다. | ||
</p> | ||
|
||
<p>감사합니다.</p> | ||
|
||
<br> | ||
|
||
<p>[야밤의 금오톡 기술 블로그팀]</p> | ||
</body> | ||
</html> |