feat: standardize tool names and http clients
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:
@@ -21,7 +21,7 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.ClaimSearchResponse;
|
||||
*/
|
||||
public interface ClaimSearchUseCase {
|
||||
|
||||
@McpTool(name = "sms_cmm_claim_search", title = "청구번호 또는 계약번호로 보험금 청구 상태를 조회한다.", description = "청구번호 또는 계약번호로 보험금 청구 상태를 조회한다.")
|
||||
@McpTool(name = "cmm_claim_search", title = "청구번호 또는 계약번호로 보험금 청구 상태를 조회한다.", description = "청구번호 또는 계약번호로 보험금 청구 상태를 조회한다.")
|
||||
@ToolHint(register = false, categoryKey = "cmm", mappingId = "CLCNNB00001",
|
||||
inputSchemaResource = "classpath:tool-schemas/cmm/claim-search-resource-input-schema.json",
|
||||
outputSchemaResource = "classpath:tool-schemas/cmm/claim-search-resource-output-schema.json")
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ClaimSearchUseCaseImpl implements ClaimSearchUseCase {
|
||||
|
||||
@Override
|
||||
public ClaimSearchResponse execute(ClaimSearchRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신.", "sms_cmm_claim_search");
|
||||
log.info("[MCI Tool] {} 요청 수신.", "cmm_claim_search");
|
||||
try {
|
||||
// MapStruct를 이용한 자동 매핑 (AI DTO -> MCI DTO)
|
||||
CLCNNB00001_I mciReq = converter.toLegacyRequest(req);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.converter;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.EmployeeSearchRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.EmployeeSearchResponse;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.http.sample.io.EmployeeSearchHttpRequest;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.http.sample.io.EmployeeSearchHttpResponse;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface EmployeeSearchConverter {
|
||||
EmployeeSearchHttpRequest toHttpRequest(EmployeeSearchRequest request);
|
||||
EmployeeSearchResponse toResponse(EmployeeSearchHttpResponse httpResponse);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class EmployeeSearchRequest {
|
||||
@Schema(description = "조회할 사번", example = "EMP10001", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String employeeId;
|
||||
|
||||
@Schema(description = "직원명. 사번 없이 이름으로 조회할 때 사용", example = "홍길동")
|
||||
private String employeeName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class EmployeeSearchResponse {
|
||||
private String resultCode;
|
||||
|
||||
private String resultMessage;
|
||||
@Schema(description = "직원명", example = "홍길동")
|
||||
private String employeeName;
|
||||
|
||||
@Schema(description = "소속 부서명", example = "AX추진팀")
|
||||
private String departmentName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||
|
||||
import org.springaicommunity.mcp.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.ToolHint;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.EmployeeSearchRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.EmployeeSearchResponse;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.smp.usecase
|
||||
* @className EmployeeSearchUseCase
|
||||
* @description AX HUB ?쒖뒪??泥섎━ ?대옒??
|
||||
* @author jade
|
||||
* @create 2026.08.11
|
||||
* <pre>
|
||||
* ---------- 媛쒖젙?대젰 ----------
|
||||
* ?섏젙?? ?섏젙?? ?섏젙?댁슜
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.08.11 jade 理쒖큹?앹꽦
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public interface EmployeeSearchUseCase {
|
||||
|
||||
@McpTool(name = "smp_employee_search", title = "직원 정보 조회", description = "사번 또는 직원명을 기준으로 직원 정보를 조회합니다.")
|
||||
@ToolHint(register = false, categoryKey = "smp", mappingId = "CLCNNB00001")
|
||||
EmployeeSearchResponse execute(EmployeeSearchRequest req);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.smp.converter.EmployeeSearchConverter;
|
||||
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.EmployeeSearchUseCase;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.http.sample.SampleClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.http.sample.io.EmployeeSearchHttpRequest;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.http.sample.io.EmployeeSearchHttpResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class EmployeeSearchUseCaseImpl implements EmployeeSearchUseCase {
|
||||
|
||||
private final EmployeeSearchConverter converter;
|
||||
private final SampleClient sampleClient;
|
||||
|
||||
@Override
|
||||
public EmployeeSearchResponse execute(EmployeeSearchRequest request) {
|
||||
EmployeeSearchHttpRequest httpRequest = converter.toHttpRequest(request);
|
||||
EmployeeSearchHttpResponse httpResponse = sampleClient.call(httpRequest, EmployeeSearchHttpResponse.class);
|
||||
|
||||
EmployeeSearchResponse response = converter.toResponse(httpResponse);
|
||||
response.setResultCode("SUCCESS");
|
||||
response.setResultMessage("HTTP API call completed.");
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import io.shinhanlife.dap.lib.annotation.ToolHint;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.dto.*;
|
||||
|
||||
public interface SmsToolUseCase {
|
||||
@McpTool(name = "sms_sms_msg_send", title = "SMS 발송 툴", description = "SMS 발송 기능을 제공합니다.")
|
||||
@McpTool(name = "sms_msg_send", title = "SMS 발송 툴", description = "SMS 발송 기능을 제공합니다.")
|
||||
@ToolHint(register = false, categoryKey = "sms", mappingId = "SMS_SEND")
|
||||
Object sendSms(SmsSendRequest req);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.http.sample;
|
||||
|
||||
import io.shinhanlife.dap.lib.integration.http.component.AxhubHttpComponent;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class SampleClient {
|
||||
private static final String API_NAME = "sample";
|
||||
|
||||
private final AxhubHttpComponent http;
|
||||
|
||||
public <I, O> O call(I request, Class<O> responseType) {
|
||||
return http.call(API_NAME, request, responseType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.http.sample.io;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class EmployeeSearchHttpRequest {
|
||||
private String employeeId;
|
||||
private String employeeName;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.http.sample.io;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class EmployeeSearchHttpResponse {
|
||||
private String resultCode;
|
||||
private String employeeName;
|
||||
private String departmentName;
|
||||
}
|
||||
Reference in New Issue
Block a user