develop #42

Merged
gitadmin merged 4 commits from develop into master 2026-11-02 12:13:31 +09:00
6 changed files with 42 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ import com.kri.common.feature.web.RequestUserContext;
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendCreateRequestDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendCreateRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendInfoDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendInfoDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendResponseDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendResponseDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
@@ -132,6 +133,13 @@ public class NotiHubApiClient {
return sendBulk("/send-kko/bulk", request); return sendBulk("/send-kko/bulk", request);
} }
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
HttpServletRequest request,
RequestUserContext ctx
) {
return relay(request, null, new ParameterizedTypeReference<>() {}, ctx);
}
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList( public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
NotiHubKkoTemplateListRequestDto body, NotiHubKkoTemplateListRequestDto body,
HttpServletRequest request, HttpServletRequest request,

View File

@@ -0,0 +1,11 @@
package com.kri.contact.server.common.external.notihub.dto;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(description = "Kakao sender profile")
public record NotiHubKkoSenderProfileDto(
String senderKey,
String name,
String uuid
) {
}

View File

@@ -1,11 +1,14 @@
package com.kri.contact.server.common.external.notihub.dto; package com.kri.contact.server.common.external.notihub.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern; import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
public record NotiHubKkoTemplateDetailRequestDto( public record NotiHubKkoTemplateDetailRequestDto(
@Schema(description = "Selected sender profile key; validated by NotiHub", requiredMode = Schema.RequiredMode.REQUIRED)
String senderKey,
@NotBlank @NotBlank
@Size(max = 30) @Size(max = 30)
@Pattern(regexp = "[A-Za-z0-9_-]+") @Pattern(regexp = "[A-Za-z0-9_-]+")

View File

@@ -1,9 +1,12 @@
package com.kri.contact.server.common.external.notihub.dto; package com.kri.contact.server.common.external.notihub.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
public record NotiHubKkoTemplateListRequestDto( public record NotiHubKkoTemplateListRequestDto(
@Schema(description = "Selected sender profile key; validated by NotiHub", requiredMode = Schema.RequiredMode.REQUIRED)
String senderKey,
@Size(min = 2, max = 50) @Size(min = 2, max = 50)
String keyword String keyword
) { ) {

View File

@@ -1,6 +1,7 @@
package com.kri.contact.server.controller; package com.kri.contact.server.controller;
import com.kri.common.feature.web.RequestUserContext; import com.kri.common.feature.web.RequestUserContext;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
@@ -37,6 +38,14 @@ public class MessageTemplateController {
private final MessageTemplateService messageTemplateService; private final MessageTemplateService messageTemplateService;
@GetMapping("/kko/profiles")
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
HttpServletRequest request,
RequestUserContext ctx
) {
return messageTemplateService.getKkoSenderProfiles(request, ctx);
}
@PostMapping(value = "/kko/list", consumes = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/kko/list", consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList( public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
@Valid @RequestBody NotiHubKkoTemplateListRequestDto body, @Valid @RequestBody NotiHubKkoTemplateListRequestDto body,

View File

@@ -2,6 +2,7 @@ package com.kri.contact.server.service;
import com.kri.common.feature.web.BusinessException; import com.kri.common.feature.web.BusinessException;
import com.kri.common.feature.web.RequestUserContext; import com.kri.common.feature.web.RequestUserContext;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto; import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
@@ -25,6 +26,13 @@ public class MessageTemplateService {
private final NotiHubApiClient notiHubApiClient; private final NotiHubApiClient notiHubApiClient;
private final ProjectMainTemplateRepository projectMainTemplateRepository; private final ProjectMainTemplateRepository projectMainTemplateRepository;
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
HttpServletRequest request,
RequestUserContext ctx
) {
return notiHubApiClient.getKkoSenderProfiles(request, ctx);
}
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList( public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
NotiHubKkoTemplateListRequestDto body, NotiHubKkoTemplateListRequestDto body,
HttpServletRequest request, HttpServletRequest request,