IIM 전문공유시 최초 인터페이스.json 파일을 다운로드한다
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-09-30 16:55:18 +09:00
parent 2d8d3ddd9b
commit 6adbb6cdb6
@@ -10,6 +10,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletOutputStream;
@@ -35,6 +36,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.View;
import org.xml.sax.InputSource;
@@ -55,6 +57,7 @@ import com.eactive.eai.rms.common.util.CommonUtil;
import com.eactive.eai.rms.common.util.StringUtils;
import com.eactive.eai.rms.onl.common.exception.BizException;
import com.eactive.eai.rms.onl.common.util.DateUtil;
import com.eactive.eai.rms.onl.loader.controller.LoaderController;
import com.eactive.eai.transformer.layout.Item;
import com.eactive.eai.transformer.layout.Types;
@@ -81,6 +84,9 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
@Autowired
private MonitoringCodeService monitoringCodeService;
@Autowired
private LoaderController loaderController;
/**
@@ -1220,7 +1226,10 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
boolean isDevMake = this.isDevMake(interfaceId);
if (command.equals("insert")) {
String serviceType = DataSourceContextHolder.getDataSourceType().getName();
insertInterfaceDjb(interfaceId, body, param);
downloadFull(serviceType, interfaceId); //eCams 인터페이스 목록에 노출시키기 위해 빈 JSON파일을 생성한다
if (isDevMake) {
interfaceId = interfaceId.substring(0,8) + "D" + interfaceId.substring(8);
insertInterfaceDjb(interfaceId, body, param);
@@ -1308,4 +1317,17 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
interfaceService.insertInterface(info);
}
/**
* LoaderController 의 downloadfull 호출 (인터페이스 전체 JSON 배포파일 생성)
* 실패해도 싱크 처리는 계속 진행한다.
*/
@SuppressWarnings("unchecked")
private void downloadFull(String serviceType, String interfaceId) {
ModelAndView mav = loaderController.interfaceDownLoadFully(serviceType, interfaceId);
Map<String, String> result = (Map<String, String>) mav.getModel().get("result");
if (result == null || !"success".equals(result.get("status"))) {
logger.warn("interface downloadfull fail - interfaceId={}, message={}", interfaceId, result == null ? null : result.get("message"));
}
}
}