修复不执行SQL的BUG

This commit is contained in:
mxd 2019-08-21 18:35:48 +08:00
parent 15821e54e5
commit 564fc4fa1a

View File

@ -46,12 +46,12 @@ public class ExecuteSQLExecutor implements ShapeExecutor{
@Override @Override
public void execute(SpiderNode node, SpiderContext context, Map<String,Object> variables) { public void execute(SpiderNode node, SpiderContext context, Map<String,Object> variables) {
if(StringUtils.isNotBlank(node.getStringJsonValue(DATASOURCE_ID))){ if(!StringUtils.isNotBlank(node.getStringJsonValue(DATASOURCE_ID))){
context.log("数据源ID为空"); context.log("数据源ID为空");
if(logger.isDebugEnabled()){ if(logger.isDebugEnabled()){
logger.debug("数据库ID为空"); logger.debug("数据库ID为空");
} }
}else if(StringUtils.isNotBlank(node.getStringJsonValue(SQL))){ }else if(!StringUtils.isNotBlank(node.getStringJsonValue(SQL))){
context.log("sql为空"); context.log("sql为空");
if(logger.isDebugEnabled()){ if(logger.isDebugEnabled()){
logger.debug("sql为空"); logger.debug("sql为空");