Skip to content

Commit

Permalink
✨ [Merge] Agenda(행사)기능 추가 (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
AreSain authored Sep 21, 2024
2 parents 4dd0925 + bd55d2a commit 10357fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public void slackConfirmAgendaTeam(Agenda agenda, AgendaTeam newTeam) {
agendaTeamProfiles.stream().map(atp -> atp.getProfile().getIntraId())
.forEach(intraId -> messageSender.send(intraId, message));
if (agenda.getMaxTeam() == agenda.getCurrentTeam()) {
String toHostMessage = snsMessageUtil.agendaHostMinTeamSatisfiedMessage(agenda);
String toHostMessage = snsMessageUtil.agendaHostMaxTeamSatisfiedMessage(agenda);
messageSender.send(agenda.getHostIntraId(), toHostMessage);
} else if (agenda.getMinTeam() == agenda.getCurrentTeam()) {
String toHostMessage = snsMessageUtil.agendaHostMaxTeamSatisfiedMessage(agenda);
String toHostMessage = snsMessageUtil.agendaHostMinTeamSatisfiedMessage(agenda);
messageSender.send(agenda.getHostIntraId(), toHostMessage);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@ public class SnsMessageUtil {
private static final String SUBJECT = "행사요정🧚으로부터 도착한 편지";

public String addAgendaAnnouncementMessage(Agenda agenda, AgendaAnnouncement newAnnounce) {
String link = URL + "agenda_key=" + agenda.getAgendaKey() + "/announcement/" + newAnnounce.getId();
return SUBJECT
+ "\n" + agenda.getTitle() + "의 새로운 공지사항이 도착했습니다."
+ "\n" + newAnnounce.getTitle()
+ "\n" + "$$" + link + "$$";
+ "\n" + URL + "detail?" + "agenda_key=" + agenda.getAgendaKey();
}

public String confirmAgendaMessage(Agenda agenda) {
String link = URL + "agenda_key=" + agenda.getAgendaKey();
return SUBJECT
+ "\n" + agenda.getTitle() + "이 확정되었습니다."
+ "\n" + "행사가 확정되었습니다. 시작일자와 장소를 확인해주세요!"
+ "\n" + "$$" + link + "$$";
+ "\n" + URL + "detail?" + "agenda_key=" + agenda.getAgendaKey();
}

public String cancelAgendaMessage(Agenda agenda) {
Expand All @@ -34,12 +33,12 @@ public String cancelAgendaMessage(Agenda agenda) {
}

public String finishAgendaMessage(Agenda agenda) {
String link = URL + "agenda_key=" + agenda.getAgendaKey();
String link = URL + "detail?" + "agenda_key=" + agenda.getAgendaKey();
if (agenda.getIsRanking()) {
return SUBJECT
+ "\n" + agenda.getTitle() + "이 종료되었습니다."
+ "\n" + "행사가 성공적으로 종료되었습니다. 수고하셨습니다!"
+ "\n" + "결과 확인 $$" + link + "$$";
+ "\n" + "결과 확인 :" + link;
} else {
return SUBJECT
+ "\n" + agenda.getTitle() + "이 종료되었습니다."
Expand Down Expand Up @@ -79,13 +78,13 @@ public String agendaHostMinTeamSatisfiedMessage(Agenda agenda) {
+ "\n" + agenda.getTitle() + "행사가 최소 팀 개수를 충족했습니다."
+ "\n" + "행사를 확정할 수 있습니다."
+ "\n" + "확정시엔 다른 팀들이 참가 할 수 없으니, 주의하세요!"
+ "\n" + "$$" + URL + "agenda_key=" + agenda.getAgendaKey() + "$$";
+ "\n" + URL + "detail?" + "agenda_key=" + agenda.getAgendaKey();
}

public String agendaHostMaxTeamSatisfiedMessage(Agenda agenda) {
return SUBJECT
+ "\n" + agenda.getTitle() + "행사가 최대 팀 개수를 충족했습니다."
+ "\n" + "행사를 확정하고 진행 시간과 장소를 공지사항으로 전달해주세요."
+ "\n" + "$$" + URL + "agenda_key=" + agenda.getAgendaKey() + "$$";
+ "\n" + URL + "detail?" + "agenda_key=" + agenda.getAgendaKey();
}
}

0 comments on commit 10357fb

Please sign in to comment.