forked from kimhyungsik/ax_hub_mcp_tool
소스 수정 완료
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package io.shinhanlife.axhub.biz.mcp.tool.sms.converter;
|
||||
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.dto.SmsSendReq;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.sms.dto.SmsMciReqDto;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.sms.dto.SmsLegacyReqDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
@@ -13,5 +13,5 @@ public interface SmsMciConverter {
|
||||
|
||||
@Mapping(source = "phoneNumber", target = "phone")
|
||||
@Mapping(source = "message", target = "content")
|
||||
SmsMciReqDto toMciReq(SmsSendReq req);
|
||||
SmsLegacyReqDto toMciReq(SmsSendReq req);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public class SmsMciReqDto {
|
||||
public class SmsLegacyReqDto {
|
||||
/**
|
||||
* EAI 시스템이 요구하는 수신자 번호 파라미터명
|
||||
*/
|
||||
@@ -4,8 +4,8 @@ import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpFunction;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpTool;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.dto.SmsSendReq;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.service.AbstractMcpToolService;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.sms.dto.SmsMciReqDto;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.sms.converter.SmsMciConverter;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.sms.dto.SmsLegacyReqDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -33,7 +33,7 @@ public class SmsToolService extends AbstractMcpToolService {
|
||||
log.info("[SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber());
|
||||
|
||||
// MapStruct를 이용한 자동 매핑 (AI DTO -> MCI DTO)
|
||||
SmsMciReqDto mciReq = SmsMciConverter.INSTANCE.toMciReq(req);
|
||||
SmsLegacyReqDto mciReq = SmsMciConverter.INSTANCE.toMciReq(req);
|
||||
|
||||
// 레거시 시스템 연동 (EAI) - DTO 객체를 그대로 넘김
|
||||
Map<String, Object> result = executeLegacy("EAI", "SMS_SEND_001", mciReq);
|
||||
|
||||
Reference in New Issue
Block a user