Skip to content

Commit

Permalink
HotFix : 알림톡 템플릿 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Feb 25, 2025
1 parent 7874bca commit ebc23f9
Showing 1 changed file with 53 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.yedu.backend.domain.parents.domain.entity.ApplicationForm;
import com.yedu.backend.domain.parents.domain.entity.Parents;
import com.yedu.backend.domain.parents.domain.entity.constant.Online;
import com.yedu.backend.domain.teacher.domain.entity.Teacher;
import com.yedu.backend.domain.teacher.domain.entity.TeacherInfo;
import com.yedu.backend.global.bizppurio.application.dto.req.CommonRequest;
Expand Down Expand Up @@ -155,35 +156,65 @@ public CommonRequest mapToCounselStart(Teacher teacher) {
}

public CommonRequest mapToNotifyClass(ApplicationForm applicationForm, Teacher teacher) {
String message = ("["+applicationForm.getDistrict().getDescription()+" "+applicationForm.getDong()+" 과외건 공지]" +
"\n" +
"\n" +
"안녕하세요 " + teacher.getTeacherInfo().getNickName() + "선생님!\n" +
"현재 "+applicationForm.getWantedSubject()+" "+applicationForm.getDistrict().getDescription()+" "+applicationForm.getDong()+"에 과외건이 들어와 공지드립니다. \uD83D\uDD14\n" +
"\n" +
"아래 버튼을 통해 과외건 정보를 확인하고, '신청하기' / '넘기기' 중 하나를 3시간 안에 응답해주세요.\n" +
"\n" +
"* 무응답이 반복되면, 과외공지에 전송이 줄어들 수 있습니다.\n" +
"* '넘기기'를 연속으로 한다고 하여 받는 불이익은 없습니다.\n" +
"\n" +
"\uD83E\uDD1E\uD83C\uDFFB신청 시, 철회는 불가합니다! 반드시 수업 시간과 장소를 확인 후 가능한 수업을 신청해주세요");
String message;
if (applicationForm.getOnline().equals(Online.비대면)) {
message = ("[" + applicationForm.getDistrict().getDescription() + " 과외건 공지]" +
"\n" +
"\n" +
"안녕하세요 " + teacher.getTeacherInfo().getNickName() + "선생님!\n" +
"현재 " + applicationForm.getWantedSubject() + " " + applicationForm.getDistrict().getDescription() + "에 과외건이 들어와 공지드립니다. \uD83D\uDD14\n" +
"\n" +
"아래 버튼을 통해 과외건 정보를 확인하고, '신청하기' / '넘기기' 중 하나를 3시간 안에 응답해주세요.\n" +
"\n" +
"* 무응답이 반복되면, 과외공지에 전송이 줄어들 수 있습니다.\n" +
"* '넘기기'를 연속으로 한다고 하여 받는 불이익은 없습니다.\n" +
"\n" +
"\uD83E\uDD1E\uD83C\uDFFB신청 시, 철회는 불가합니다! 반드시 수업 시간과 장소를 확인 후 가능한 수업을 신청해주세요");
} else {
message = ("[" + applicationForm.getDistrict().getDescription() + " " + applicationForm.getDong() + " 과외건 공지]" +
"\n" +
"\n" +
"안녕하세요 " + teacher.getTeacherInfo().getNickName() + "선생님!\n" +
"현재 " + applicationForm.getWantedSubject() + " " + applicationForm.getDistrict().getDescription() + " " + applicationForm.getDong() + "에 과외건이 들어와 공지드립니다. \uD83D\uDD14\n" +
"\n" +
"아래 버튼을 통해 과외건 정보를 확인하고, '신청하기' / '넘기기' 중 하나를 3시간 안에 응답해주세요.\n" +
"\n" +
"* 무응답이 반복되면, 과외공지에 전송이 줄어들 수 있습니다.\n" +
"* '넘기기'를 연속으로 한다고 하여 받는 불이익은 없습니다.\n" +
"\n" +
"\uD83E\uDD1E\uD83C\uDFFB신청 시, 철회는 불가합니다! 반드시 수업 시간과 장소를 확인 후 가능한 수업을 신청해주세요");
}
String classUrl = "https://www.yedu-tutor.com/teacher/"+teacher.getTeacherId()+"/"+applicationForm.getApplicationFormId()+"/"+teacher.getTeacherInfo().getPhoneNumber();
CommonButton webButton = new WebButton("과외 정보 확인하기", WEB_LINK, classUrl, classUrl);
Message messageBody = new ButtonMessage(message, yeduMatchingKey, notifyClass, new CommonButton[]{webButton});
return createCommonRequest(messageBody, teacher.getTeacherInfo().getPhoneNumber());
}

public CommonRequest mapToMatchingAcceptCase(ApplicationForm applicationForm, Teacher teacher) {
String message = ("[과외 신청완료]" +
"\n" +
"\n" +
applicationForm.getDistrict().getDescription() + " " + applicationForm.getDong() + " " + applicationForm.getWantedSubject().name() + " " + applicationForm.getAge() + " 과외건 신청이 완료되었습니다! \uD83D\uDE42\n" +
"\n" +
"학부모님이 신청해주신 선생님 프로필들을 전달 받으신 후, 답변 주실 예정입니다.\n" +
"\n" +
"학부모님께 답변이 오면 매칭 성사 여부를 3일 이내에 공유드릴게요.\n" +
"\n" +
"3일 이내 매칭이 진행되지 않는다면, 여러 사유에 의한 미진행으로 생각해주시면 좋을 것 같습니다! \uD83D\uDE4F");
String message;
if (applicationForm.getOnline().equals(Online.비대면)) {
message = ("[과외 신청완료]" +
"\n" +
"\n" +
applicationForm.getDistrict().getDescription() + " " + applicationForm.getWantedSubject().name() + " " + applicationForm.getAge() + " 과외건 신청이 완료되었습니다! \uD83D\uDE42\n" +
"\n" +
"학부모님이 신청해주신 선생님 프로필들을 전달 받으신 후, 답변 주실 예정입니다.\n" +
"\n" +
"학부모님께 답변이 오면 매칭 성사 여부를 3일 이내에 공유드릴게요.\n" +
"\n" +
"3일 이내 매칭이 진행되지 않는다면, 여러 사유에 의한 미진행으로 생각해주시면 좋을 것 같습니다! \uD83D\uDE4F");
} else {
message = ("[과외 신청완료]" +
"\n" +
"\n" +
applicationForm.getDistrict().getDescription() + " " + applicationForm.getDong() + " " + applicationForm.getWantedSubject().name() + " " + applicationForm.getAge() + " 과외건 신청이 완료되었습니다! \uD83D\uDE42\n" +
"\n" +
"학부모님이 신청해주신 선생님 프로필들을 전달 받으신 후, 답변 주실 예정입니다.\n" +
"\n" +
"학부모님께 답변이 오면 매칭 성사 여부를 3일 이내에 공유드릴게요.\n" +
"\n" +
"3일 이내 매칭이 진행되지 않는다면, 여러 사유에 의한 미진행으로 생각해주시면 좋을 것 같습니다! \uD83D\uDE4F");
}
Message messageBody = new TextMessage(message, yeduMatchingKey, matchingAcceptCase);
return createCommonRequest(messageBody, teacher.getTeacherInfo().getPhoneNumber());
}
Expand Down

0 comments on commit ebc23f9

Please sign in to comment.