fix : js 执行函数报错
This commit is contained in:
@@ -36,6 +36,8 @@ public class PortalVo extends SimplePortalVo {
|
||||
*/
|
||||
private Boolean page;
|
||||
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 条件映射
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,9 @@ public class JavaEngineExecuteHandler implements EngineExecuteHandler {
|
||||
|
||||
@Override
|
||||
public EngineResult mockExecute(DataAdapter dataAdapter, Object data) {
|
||||
if (!DataAdapterType.JAVA.equals(dataAdapter.getType())) {
|
||||
return null;
|
||||
}
|
||||
return javaCodeEngine.mockExecute(dataAdapter.getExecuteCode(), getClassName(dataAdapter),
|
||||
"execute", new Object[]{data});
|
||||
}
|
||||
|
||||
@@ -129,7 +129,14 @@ public class PortalServiceImpl implements PortalService {
|
||||
}
|
||||
if (PortalEnum.LOCAL.equals(portal.getType())) {
|
||||
UniQuery uniQuery = queryMapper.selectById(portal.getQueryId());
|
||||
portalVo.setQueryType(uniQuery.getType());
|
||||
if (!ObjectUtils.isEmpty(uniQuery)) {
|
||||
portalVo.setQueryType(uniQuery.getType());
|
||||
}
|
||||
} else {
|
||||
PortalInterface portalInterface = portalInterfaceMapper.selectById(portal.getInterfaceId());
|
||||
if (!ObjectUtils.isEmpty(portalInterface)) {
|
||||
portalVo.setUrl(portalInterface.getUrl());
|
||||
}
|
||||
}
|
||||
if (portal.getCreateDataAdapter()) {
|
||||
DataAdapter dataAdapter = adapterMapper.selectById(portal.getAdapterId());
|
||||
@@ -249,7 +256,7 @@ public class PortalServiceImpl implements PortalService {
|
||||
}
|
||||
if (PortalEnum.EXTERNAL.equals(portal.getType())) {
|
||||
createPortalInterface(portalDto, portal);
|
||||
}else {
|
||||
} else {
|
||||
UniQuery uniQuery = queryMapper.selectById(portal.getQueryId());
|
||||
if (ObjectUtils.isEmpty(uniQuery)) {
|
||||
throw new CustomException("未找到对应的查询接口!");
|
||||
|
||||
Reference in New Issue
Block a user