diff --git a/src/main/java/com/kri/contact/server/common/external/notihub/NotiHubTemplateDto.java b/src/main/java/com/kri/contact/server/common/external/notihub/NotiHubTemplateDto.java index c42a32a..918fc2f 100644 --- a/src/main/java/com/kri/contact/server/common/external/notihub/NotiHubTemplateDto.java +++ b/src/main/java/com/kri/contact/server/common/external/notihub/NotiHubTemplateDto.java @@ -16,6 +16,8 @@ public class NotiHubTemplateDto { @Schema(description = "tmplatIdx") private Long tmplatIdx; + @Schema(description = "tmplatTitle") + private String tmplatTitle; @Schema(description = "tmplatBody") private String tmplatBody; @Schema(description = "sendTel") diff --git a/src/main/java/com/kri/contact/server/service/MessageService.java b/src/main/java/com/kri/contact/server/service/MessageService.java index 7e466e2..f16520d 100644 --- a/src/main/java/com/kri/contact/server/service/MessageService.java +++ b/src/main/java/com/kri/contact/server/service/MessageService.java @@ -36,6 +36,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; +import org.apache.commons.collections4.SetUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -253,7 +254,10 @@ public class MessageService { } NotiHubTemplateDto template = notiHubApiClient.getTemplate(tmplatIdx); - Set templateParams = extractTemplateParams(template.getTmplatBody()); + Set titleParams = extractTemplateParams(template.getTmplatTitle()); + Set bodyParams = extractTemplateParams(template.getTmplatBody()); + Set templateParams = SetUtils.union(titleParams, bodyParams); + Map headerById = listHeaderService.getHeader(prjctIdx).stream() .collect(Collectors.toMap( ListHeaderDto::getListHderId,