@@ -8,6 +8,7 @@ import java.net.URLDecoder;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -26,6 +27,10 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import com.eactive.apim.portal.apispec.entity.ApiSpecInfo;
|
||||||
|
import com.eactive.apim.portal.apispec.service.ApiSpecInfoService;
|
||||||
|
import com.eactive.eai.rms.onl.transaction.apim.mapping.ApiSpecUIMapper;
|
||||||
|
import com.eactive.eai.rms.onl.transaction.apim.ui.ApiSpecInfoUI;
|
||||||
import com.eactive.eai.agent.command.Command;
|
import com.eactive.eai.agent.command.Command;
|
||||||
import com.eactive.eai.agent.command.CommonCommand;
|
import com.eactive.eai.agent.command.CommonCommand;
|
||||||
import com.eactive.eai.common.util.DatetimeUtil;
|
import com.eactive.eai.common.util.DatetimeUtil;
|
||||||
@@ -105,6 +110,12 @@ public class LoaderController implements InterceptorSkipController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TransformDeployService transformDeployService;
|
private TransformDeployService transformDeployService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApiSpecInfoService apiSpecInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApiSpecUIMapper apiSpecUIMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 형상관리에서 layout을 로딩한다.
|
* 형상관리에서 layout을 로딩한다.
|
||||||
@@ -1481,6 +1492,17 @@ public class LoaderController implements InterceptorSkipController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4. API 스펙 정보(ptl_api_spec_info) 추가 (감사(audit) 컬럼은 제외)
|
||||||
|
Optional<ApiSpecInfo> optSpecInfo = apiSpecInfoService.findById(interfaceId);
|
||||||
|
if (optSpecInfo.isPresent()) {
|
||||||
|
ApiSpecInfoUI specInfo = apiSpecUIMapper.mapToUI(optSpecInfo.get());
|
||||||
|
specInfo.setCreatedBy(null);
|
||||||
|
specInfo.setCreatedDate(null);
|
||||||
|
specInfo.setLastModifiedBy(null);
|
||||||
|
specInfo.setLastModifiedDate(null);
|
||||||
|
interfaceDeployPack.setSpecInfo(specInfo);
|
||||||
|
}
|
||||||
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
objectMapper.registerModule(new JavaTimeModule());
|
objectMapper.registerModule(new JavaTimeModule());
|
||||||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
@@ -1545,7 +1567,17 @@ public class LoaderController implements InterceptorSkipController {
|
|||||||
transformDeployService.saveDeploy(transformDeploy);
|
transformDeployService.saveDeploy(transformDeploy);
|
||||||
agentUtilService.broadcast(new CommonCommand( "com.eactive.eai.agent.transformer.ReloadTransformCommand", transformDeploy.getCnvsnname()));
|
agentUtilService.broadcast(new CommonCommand( "com.eactive.eai.agent.transformer.ReloadTransformCommand", transformDeploy.getCnvsnname()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ApiSpecInfoUI specInfoUI = interfaceDeployPack.getSpecInfo();
|
||||||
|
if (specInfoUI != null && StringUtils.isNotBlank(specInfoUI.getApiId())) {
|
||||||
|
ApiSpecInfo specInfo = apiSpecUIMapper.mapToEntity(specInfoUI);
|
||||||
|
if (apiSpecInfoService.findById(specInfo.getApiId()).isPresent()) {
|
||||||
|
apiSpecInfoService.updateById(specInfo.getApiId(), specInfo);
|
||||||
|
} else {
|
||||||
|
apiSpecInfoService.create(specInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Map<String,String> result = new HashMap<String,String>();
|
Map<String,String> result = new HashMap<String,String>();
|
||||||
String status = "success";
|
String status = "success";
|
||||||
result.put("status", status);
|
result.put("status", status);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.eactive.eai.rms.onl.loader.vo;
|
|||||||
import com.eactive.eai.rms.onl.loader.intf.deploy.EAIMessageDeploy;
|
import com.eactive.eai.rms.onl.loader.intf.deploy.EAIMessageDeploy;
|
||||||
import com.eactive.eai.rms.onl.loader.layout.deploy.LayoutDeploy;
|
import com.eactive.eai.rms.onl.loader.layout.deploy.LayoutDeploy;
|
||||||
import com.eactive.eai.rms.onl.loader.transform.deploy.TransformDeploy;
|
import com.eactive.eai.rms.onl.loader.transform.deploy.TransformDeploy;
|
||||||
|
import com.eactive.eai.rms.onl.transaction.apim.ui.ApiSpecInfoUI;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -15,4 +16,6 @@ public class InterfaceDeployPack {
|
|||||||
private List<LayoutDeploy> layoutDeployList = new ArrayList<>();
|
private List<LayoutDeploy> layoutDeployList = new ArrayList<>();
|
||||||
|
|
||||||
private List<TransformDeploy> transformDeployList = new ArrayList<>();
|
private List<TransformDeploy> transformDeployList = new ArrayList<>();
|
||||||
|
|
||||||
|
private ApiSpecInfoUI specInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user