From f11ba7b1bce1ed35b39015cee517a906c0931730 Mon Sep 17 00:00:00 2001
From: andywang <1347387425@qq.com>
Date: Wed, 10 Aug 2022 11:41:40 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E6=A0=87=E6=B7=BB=E5=8A=A0=E6=9C=AC?=
=?UTF-8?q?=E5=9C=B0=E5=8F=98=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dao/datax/datamanage/FieldMapper.xml | 28 +++++++++++--------
.../ddp/common/model/common/BasePage.java | 6 ++++
.../common/model/datax/datamanage/Field.java | 5 ++++
.../datamanage/request/FieldSaveParam.java | 1 +
.../guiderule/impl/RuleServiceImpl.java | 6 ++--
.../impl/StrategyOutputServiceImpl.java | 10 ++++++-
6 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/ddp/ddp-common/ddp-dao/src/main/java/com/fibo/ddp/common/dao/datax/datamanage/FieldMapper.xml b/ddp/ddp-common/ddp-dao/src/main/java/com/fibo/ddp/common/dao/datax/datamanage/FieldMapper.xml
index 275ae28..0b0501e 100644
--- a/ddp/ddp-common/ddp-dao/src/main/java/com/fibo/ddp/common/dao/datax/datamanage/FieldMapper.xml
+++ b/ddp/ddp-common/ddp-dao/src/main/java/com/fibo/ddp/common/dao/datax/datamanage/FieldMapper.xml
@@ -36,7 +36,7 @@
-
+
@@ -64,6 +64,7 @@
,f.dict_variable
,f.mq_source_id
,f.source_type
+ ,f.is_local_variable
from t_field f, t_field_user_rel r, t_field_type p, t_user u
where f.id = r.field_id
and f.field_typeid = p.id
@@ -178,6 +179,7 @@
,f.dict_variable
,f.mq_source_id
,f.source_type
+ ,f.is_local_variable
from t_field f,t_field_user_rel r,t_field_type p
where f.id = r.field_id
and f.field_typeid = p.id
@@ -217,6 +219,7 @@
,f.dict_variable
,f.mq_source_id
,f.source_type
+ ,f.is_local_variable
from t_field f,t_field_user_rel r,t_field_type p
where f.id = r.field_id
and f.field_typeid = p.id
@@ -243,6 +246,7 @@
,f.dict_variable
,f.mq_source_id
,f.source_type
+ ,f.is_local_variable
from t_field f,t_field_type p
,t_field_user_rel r left join t_engine e on (r.engine_id = e.id)
where f.id = r.field_id
@@ -293,6 +297,7 @@
,f.dict_variable
,f.mq_source_id
,f.source_type
+ ,f.is_local_variable
from t_field f,t_field_user_rel r
where f.id = r.field_id
and (f.field_en = #{fieldEn} or f.field_cn = #{fieldCn})
@@ -312,19 +317,19 @@
, value_type, value_scope, is_derivative
, is_output, formula, formula_show, orig_fieldid, used_fieldid
, is_common, author, created, is_use_sql, data_source_id, sql_statement, sql_variable
- , is_interface, interface_id, interface_parse_field, json_value, organ_id,dict_variable,source_type,mq_source_id)
+ , is_interface, interface_id, interface_parse_field, json_value, organ_id,dict_variable,source_type,mq_source_id, is_local_variable)
values ( #{fieldEn}, #{fieldCn}, #{fieldTypeId}
, #{valueType}, #{valueScope}, #{isDerivative}
, #{isOutput}, #{formula}, #{formulaShow}, #{origFieldId}, #{usedFieldId}
, #{isCommon}, #{author}, now(), #{isUseSql}, #{dataSourceId}, #{sqlStatement}, #{sqlVariable}
- , #{isInterface}, #{interfaceId}, #{interfaceParseField}, #{jsonValue}, #{organId},#{dictVariable},#{sourceType},#{mqSourceId})
+ , #{isInterface}, #{interfaceId}, #{interfaceParseField}, #{jsonValue}, #{organId},#{dictVariable},#{sourceType},#{mqSourceId}, #{isLocalVariable})
insert into t_field ( field_en, field_cn, field_typeid
, value_type, value_scope, is_derivative
, is_output, formula, formula_show, is_common, author, created,
- , is_interface, interface_id, interface_parse_field, json_value,dict_variable,source_type,mq_source_id)
+ , is_interface, interface_id, interface_parse_field, json_value,dict_variable,source_type,mq_source_id,is_local_variable)
values
(
@@ -332,7 +337,7 @@
, #{field.valueType}, #{field.valueScope}, #{field.isDerivative}
, #{field.isOutput}, #{field.formula}, #{field.formulaShow}, #{field.isCommon}, #{field.author}, now()
, #{isInterface}, #{interfaceId}, #{interfaceParseField},
- #{jsonValue},#{dictVariable},#{sourceType},#{mqSourceId}
+ #{jsonValue},#{dictVariable},#{sourceType},#{mqSourceId},#{isLocalVariable}
)
@@ -347,7 +352,7 @@
#{sqlVariable}
,is_interface = #{isInterface}, interface_id = #{interfaceId}, interface_parse_field = #{interfaceParseField},
json_value = #{jsonValue},dict_variable = #{dictVariable}
- ,source_type = #{sourceType},mq_source_id = #{mqSourceId}
+ ,source_type = #{sourceType},mq_source_id = #{mqSourceId}, is_local_variable = #{isLocalVariable}
where id = #{id}
@@ -379,6 +384,7 @@
,t.dict_variable
,t.source_type
,t.mq_source_id
+ ,t.is_local_variable
from t_field t LEFT JOIN t_field_user_rel r on t.id = r.field_id LEFT JOIN t_field_type p on t.field_typeid =
p.id where r.organ_id = #{organId} and status = 1
@@ -405,7 +411,7 @@
select f.id, f.field_en, f.field_cn, f.field_typeid
, f.value_type, f.value_scope, f.is_derivative
, f.is_output, f.is_common, f.formula, f.formula_show
- , f.orig_fieldid,f.dict_variable ,f.source_type ,f.mq_source_id
+ , f.orig_fieldid,f.dict_variable ,f.source_type ,f.mq_source_id,f.is_local_variable
from t_field f,t_field_user_rel r
where f.id = r.field_id
and f.field_cn = #{fieldCn}
@@ -504,7 +510,7 @@
, p.type
, f.is_use_sql, f.data_source_id, f.sql_statement, f.sql_variable, f.is_interface
, f.interface_id, f.interface_parse_field, f.json_value, f.dict_variable
- ,f.source_type,f.mq_source_id
+ ,f.source_type,f.mq_source_id,f.is_local_variable
from t_field f,t_field_user_rel r,t_field_type p
where f.id = r.field_id
and f.field_typeid = p.id
@@ -522,7 +528,7 @@
select f.id, f.field_en , f.field_cn , f.field_typeid
, f.value_type , f.value_scope , f.is_derivative
, f.is_output , f.is_common , f.formula, f.formula_show, f.dict_variable
- ,f.source_type,f.mq_source_id
+ ,f.source_type,f.mq_source_id,f.is_local_variable
from t_field f,t_field_user_rel r
where f.id = r.field_id
and f.field_en = #{fieldEn}
@@ -535,7 +541,7 @@
, f.value_type , f.value_scope , f.is_derivative
, f.is_output , f.is_common , f.formula, f.formula_show
, f.orig_fieldid, f.dict_variable
- ,f.source_type,f.mq_source_id
+ ,f.source_type,f.mq_source_id,f.is_local_variable
from t_field f,t_field_user_rel r
where f.id = r.field_id
and f.field_cn = #{fieldCn}
@@ -552,7 +558,7 @@
, p.type
, f.is_use_sql, f.data_source_id, f.sql_statement, f.sql_variable, f.is_interface
, f.interface_id, f.interface_parse_field, f.json_value, f.dict_variable
- ,f.source_type,f.mq_source_id
+ ,f.source_type,f.mq_source_id,f.is_local_variable
from t_field f,t_field_type p
where f.field_typeid=p.id
and f.field_en in
diff --git a/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/common/BasePage.java b/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/common/BasePage.java
index d8c6dda..7bb0f5c 100644
--- a/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/common/BasePage.java
+++ b/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/common/BasePage.java
@@ -1,5 +1,6 @@
package com.fibo.ddp.common.model.common;
+import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
/**
@@ -13,25 +14,30 @@ public class BasePage {
/**
* 当前页数
*/
+ @TableField(exist = false)
private int page;
/**
* 每页显示的行数
*/
+ @TableField(exist = false)
private int rows;
/**
* 开始行数
*/
+ @TableField(exist = false)
private Integer curRow;
/**
* 结束行数
*/
+ @TableField(exist = false)
private Integer endRow;
/**
* 总行数
*/
+ @TableField(exist = false)
private Integer total;
}
diff --git a/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/Field.java b/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/Field.java
index 1e1516f..d9ad585 100644
--- a/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/Field.java
+++ b/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/Field.java
@@ -219,4 +219,9 @@ public class Field extends BasePage implements Serializable {
* 消息队列源id
*/
private Long mqSourceId;
+
+ /**
+ * 是否局部变量
+ */
+ private Boolean isLocalVariable;
}
diff --git a/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/request/FieldSaveParam.java b/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/request/FieldSaveParam.java
index e3e225f..e1acdf2 100644
--- a/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/request/FieldSaveParam.java
+++ b/ddp/ddp-common/ddp-model/src/main/java/com/fibo/ddp/common/model/datax/datamanage/request/FieldSaveParam.java
@@ -40,6 +40,7 @@ public class FieldSaveParam implements Serializable {
private String dictVariable;
private Integer sourceType;
private Long mqSourceId;
+ private Boolean isLocalVariable;
//
// public Field toField() {
diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/guiderule/impl/RuleServiceImpl.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/guiderule/impl/RuleServiceImpl.java
index f4c3958..e88a8c0 100644
--- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/guiderule/impl/RuleServiceImpl.java
+++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/guiderule/impl/RuleServiceImpl.java
@@ -273,9 +273,9 @@ public class RuleServiceImpl extends ServiceImpl imple
@Override
public List setComplexRuleOutput(Long versionId, Map temp, Map input, String outType) {
List jsonObjectList = outputService.setOutput(new StrategyOutput(versionId, StrategyType.COMPLEX_RULE,outType), temp);
- for (JSONObject jsonObject : jsonObjectList) {
- input.putAll(jsonObject);
- }
+// for (JSONObject jsonObject : jsonObjectList) {
+// input.putAll(jsonObject);
+// }
return jsonObjectList;
}
diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/strategyout/impl/StrategyOutputServiceImpl.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/strategyout/impl/StrategyOutputServiceImpl.java
index 0ecd02a..9bc00d8 100644
--- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/strategyout/impl/StrategyOutputServiceImpl.java
+++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/strategyout/impl/StrategyOutputServiceImpl.java
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fibo.ddp.common.dao.canal.TableEnum;
import com.fibo.ddp.common.dao.strategyx.strategyout.StrategyOutputMapper;
+import com.fibo.ddp.common.model.datax.datamanage.Field;
import com.fibo.ddp.common.model.enginex.runner.ExpressionParam;
import com.fibo.ddp.common.model.strategyx.strategyout.OutCondition;
import com.fibo.ddp.common.model.strategyx.strategyout.StrategyOutput;
+import com.fibo.ddp.common.service.datax.datamanage.FieldService;
import com.fibo.ddp.common.service.datax.runner.ExecuteUtils;
import com.fibo.ddp.common.service.redis.RedisManager;
import com.fibo.ddp.common.service.redis.RedisUtils;
@@ -35,6 +37,9 @@ public class StrategyOutputServiceImpl extends ServiceImpl list) {
@@ -152,7 +157,10 @@ public class StrategyOutputServiceImpl extends ServiceImpl