diff --git a/src/main/java/com/yedu/backend/global/bizppurio/application/mapper/BizppurioMapper.java b/src/main/java/com/yedu/backend/global/bizppurio/application/mapper/BizppurioMapper.java index d3ba83e..7c99dc4 100644 --- a/src/main/java/com/yedu/backend/global/bizppurio/application/mapper/BizppurioMapper.java +++ b/src/main/java/com/yedu/backend/global/bizppurio/application/mapper/BizppurioMapper.java @@ -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; @@ -155,18 +156,34 @@ 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}); @@ -174,16 +191,30 @@ public CommonRequest mapToNotifyClass(ApplicationForm applicationForm, Teacher t } 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()); }