refactor: remove legacy eims tool path
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sms.converter;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.sms.converter
|
||||
* @className SmsLegacyConverter
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
import io.shinhanlife.dap.mcc.biz.sms.dto.SmsSendRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.legacy.SmsLegacyRequest;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface SmsLegacyConverter {
|
||||
|
||||
@Mapping(source = "phoneNumber", target = "phone")
|
||||
@Mapping(source = "message", target = "content")
|
||||
SmsLegacyRequest toLegacyRequest(SmsSendRequest req);
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sms.dto;
|
||||
|
||||
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springaicommunity.mcp.annotation.McpToolParam;
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className SmsSendRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SmsSendRequest {
|
||||
|
||||
@McpToolParam(description = "수신자 전화번호", required = true)
|
||||
@Schema(pattern = "^01[0-9]-?\\d{3,4}-?\\d{4}$", example = "01012345678")
|
||||
private String phoneNumber;
|
||||
|
||||
|
||||
@McpToolParam(description = "전송할 메시지 내용", required = true)
|
||||
@Schema(pattern = "\\S", example = "테스트 메시지입니다.")
|
||||
private String message;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sms.legacy;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.sms.dto
|
||||
* @className SmsLegacyRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public class SmsLegacyRequest {
|
||||
/**
|
||||
* EAI 시스템이 요구하는 수신자 번호 파라미터명
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* EAI 시스템이 요구하는 메시지 내용 파라미터명
|
||||
*/
|
||||
private String content;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sms.usecase;
|
||||
|
||||
import org.springaicommunity.mcp.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.ToolHint;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.dto.*;
|
||||
|
||||
public interface SmsToolUseCase {
|
||||
@McpTool(name = "sms_msg_send", title = "SMS 발송 툴", description = "SMS 발송 기능을 제공합니다.")
|
||||
@ToolHint(register = false, categoryKey = "sms", mappingId = "SMS_SEND")
|
||||
Object sendSms(SmsSendRequest req);
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sms.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sms.usecase.SmsToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.springframework.stereotype.Service;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.converter.SmsLegacyConverter;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.dto.SmsSendRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.legacy.SmsLegacyRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.sms
|
||||
* @className SmsToolService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class SmsToolUseCaseImpl extends AbstractMcpToolUseCase implements SmsToolUseCase {
|
||||
|
||||
private final SmsLegacyConverter converter;
|
||||
|
||||
|
||||
@Override
|
||||
public Object sendSms(SmsSendRequest req) {
|
||||
log.info("[SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber());
|
||||
|
||||
// MapStruct를 이용한 자동 매핑 (AI DTO -> MCI DTO)
|
||||
SmsLegacyRequest legacyRequest = converter.toLegacyRequest(req);
|
||||
|
||||
// 레거시 시스템 연동 (EAI) - DTO 객체를 그대로 넘김
|
||||
Map<String, Object> result = executeLegacy("EAI", "SMS_SEND_001", legacyRequest);
|
||||
|
||||
// 결과 가공
|
||||
if ("SUCCESS".equals(result.get("status"))) {
|
||||
result.put("message", "SMS가 성공적으로 발송되었습니다.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
@@ -9,7 +8,6 @@ import io.shinhanlife.dap.mcc.infra.itrf.http.sample.SampleClient;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.EmployeeSearchRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.EmployeeSearchResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.impl.EmployeeSearchUseCaseImpl;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class EmployeeSearchUseCaseTest {
|
||||
@@ -20,15 +18,10 @@ class EmployeeSearchUseCaseTest {
|
||||
assertNotNull(new EmployeeSearchResponse());
|
||||
}
|
||||
|
||||
@Test
|
||||
void doesNotDependOnAbstractMcpToolUseCase() {
|
||||
assertFalse(AbstractMcpToolUseCase.class.isAssignableFrom(EmployeeSearchUseCaseImpl.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void delegatesHttpCallThroughApiSpecificClient() {
|
||||
assertNotNull(EmployeeSearchUseCaseImpl.class.getDeclaredFields());
|
||||
assertTrue(java.util.Arrays.stream(EmployeeSearchUseCaseImpl.class.getDeclaredFields())
|
||||
.anyMatch(field -> field.getType().equals(SampleClient.class)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user