forked from kimhyungsik/ax_hub_mcp_tool
소스 수정 완료
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package io.shinhanlife.axhub.biz.mcp.tool.sms.mapper;
|
||||
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;
|
||||
@@ -7,9 +7,9 @@ import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface SmsMciMapper {
|
||||
public interface SmsMciConverter {
|
||||
|
||||
SmsMciMapper INSTANCE = Mappers.getMapper(SmsMciMapper.class);
|
||||
SmsMciConverter INSTANCE = Mappers.getMapper(SmsMciConverter.class);
|
||||
|
||||
@Mapping(source = "phoneNumber", target = "phone")
|
||||
@Mapping(source = "message", target = "content")
|
||||
@@ -5,7 +5,7 @@ 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.mapper.SmsMciMapper;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.sms.converter.SmsMciConverter;
|
||||
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 = SmsMciMapper.INSTANCE.toMciReq(req);
|
||||
SmsMciReqDto mciReq = SmsMciConverter.INSTANCE.toMciReq(req);
|
||||
|
||||
// 레거시 시스템 연동 (EAI) - DTO 객체를 그대로 넘김
|
||||
Map<String, Object> result = executeLegacy("EAI", "SMS_SEND_001", mciReq);
|
||||
|
||||
Reference in New Issue
Block a user