Skip to content

Commit

Permalink
refactor(Email): 미사용 API 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee committed Aug 3, 2024
1 parent 6edaee2 commit ea07ae4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 74 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.springframework.web.multipart.MultipartFile;
import org.thymeleaf.context.Context;
import org.thymeleaf.spring6.SpringTemplateEngine;
import page.clab.api.domain.memberManagement.member.application.dto.shared.MemberEmailInfoDto;
import page.clab.api.domain.memberManagement.member.domain.Member;
import page.clab.api.external.memberManagement.member.application.port.ExternalRetrieveMemberUseCase;
import page.clab.api.global.common.email.domain.EmailTemplateType;
Expand Down Expand Up @@ -55,26 +54,6 @@ public List<String> broadcastEmail(EmailDto emailDto, List<MultipartFile> multip
return successfulAddresses;
}

public List<String> broadcastEmailToAllMember(EmailDto emailDto, List<MultipartFile> multipartFiles) {
List<File> convertedFiles = multipartFiles != null && !multipartFiles.isEmpty() ?
convertMultipartFiles(multipartFiles) : null;

List<MemberEmailInfoDto> memberInfos = externalRetrieveMemberUseCase.getMembers();

List<String> successfulEmails = Collections.synchronizedList(new ArrayList<>());

memberInfos.parallelStream().forEach(member -> {
try {
String emailContent = generateEmailContent(emailDto, member.getMemberName());
emailAsyncService.sendEmailAsync(member.getEmail(), emailDto.getSubject(), emailContent, convertedFiles, emailDto.getEmailTemplateType());
successfulEmails.add(member.getEmail());
} catch (MessagingException e) {
throw new MessageSendingFailedException(member.getEmail() + "에게 이메일을 보내는데 실패했습니다.");
}
});
return successfulEmails;
}

public void broadcastEmailToApprovedMember(Member member, String password) {
String subject = "C-Lab 계정 발급 안내";
String content = """
Expand Down

0 comments on commit ea07ae4

Please sign in to comment.