260803_04_ENH: 문자, 이메일 발송시 타이틀 치환문자 포함하도록 수정

This commit is contained in:
2026-08-03 16:50:33 +09:00
parent 1fb0912010
commit d087ec79b3
2 changed files with 7 additions and 1 deletions

View File

@@ -16,6 +16,8 @@ public class NotiHubTemplateDto {
@Schema(description = "tmplatIdx") @Schema(description = "tmplatIdx")
private Long tmplatIdx; private Long tmplatIdx;
@Schema(description = "tmplatTitle")
private String tmplatTitle;
@Schema(description = "tmplatBody") @Schema(description = "tmplatBody")
private String tmplatBody; private String tmplatBody;
@Schema(description = "sendTel") @Schema(description = "sendTel")

View File

@@ -36,6 +36,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.SetUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -253,7 +254,10 @@ public class MessageService {
} }
NotiHubTemplateDto template = notiHubApiClient.getTemplate(tmplatIdx); NotiHubTemplateDto template = notiHubApiClient.getTemplate(tmplatIdx);
Set<String> templateParams = extractTemplateParams(template.getTmplatBody()); Set<String> titleParams = extractTemplateParams(template.getTmplatTitle());
Set<String> bodyParams = extractTemplateParams(template.getTmplatBody());
Set<String> templateParams = SetUtils.union(titleParams, bodyParams);
Map<Integer, ListHeaderDto> headerById = listHeaderService.getHeader(prjctIdx).stream() Map<Integer, ListHeaderDto> headerById = listHeaderService.getHeader(prjctIdx).stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(
ListHeaderDto::getListHderId, ListHeaderDto::getListHderId,