refactor: apply Legacy naming convention to Sms and Sample converters and DTOs

This commit is contained in:
jade
2026-07-13 17:45:25 +09:00
parent c8fef29fcd
commit d24c95a2df
5 changed files with 16 additions and 16 deletions

View File

@@ -7,11 +7,11 @@ import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring")
public interface SmsMciConverter {
public interface SmsLegacyConverter {
SmsMciConverter INSTANCE = Mappers.getMapper(SmsMciConverter.class);
SmsLegacyConverter INSTANCE = Mappers.getMapper(SmsLegacyConverter.class);
@Mapping(source = "phoneNumber", target = "phone")
@Mapping(source = "message", target = "content")
SmsLegacyReqDto toMciReq(SmsSendReq req);
SmsLegacyReqDto toLegacyReq(SmsSendReq req);
}

View File

@@ -4,7 +4,7 @@ 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.converter.SmsMciConverter;
import io.shinhanlife.axhub.biz.mcp.tool.sms.converter.SmsLegacyConverter;
import io.shinhanlife.axhub.biz.mcp.tool.sms.dto.SmsLegacyReqDto;
import lombok.extern.slf4j.Slf4j;
@@ -33,10 +33,10 @@ public class SmsToolService extends AbstractMcpToolService {
log.info("[SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber());
// MapStruct를 이용한 자동 매핑 (AI DTO -> MCI DTO)
SmsLegacyReqDto mciReq = SmsMciConverter.INSTANCE.toMciReq(req);
SmsLegacyReqDto legacyReq = SmsLegacyConverter.INSTANCE.toLegacyReq(req);
// 레거시 시스템 연동 (EAI) - DTO 객체를 그대로 넘김
Map<String, Object> result = executeLegacy("EAI", "SMS_SEND_001", mciReq);
Map<String, Object> result = executeLegacy("EAI", "SMS_SEND_001", legacyReq);
// 결과 가공
if ("SUCCESS".equals(result.get("status"))) {