提交 134bef4d 编写于 作者: sq3536's avatar sq3536

Merge remote-tracking branch 'origin/master'

...@@ -34,6 +34,7 @@ import org.mybatis.spring.batch.MyBatisCursorItemReader; ...@@ -34,6 +34,7 @@ import org.mybatis.spring.batch.MyBatisCursorItemReader;
import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.item.ExecutionContext;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
...@@ -73,15 +74,15 @@ public class RuleEngineExService extends RuleEngineServiceImpl { ...@@ -73,15 +74,15 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
@Autowired @Autowired
private IMetaModelService metaModelService; private IMetaModelService metaModelService;
@Autowired
private SqlSessionFactory sqlSessionFactory;
@Autowired @Autowired
private DstDataSourceExService dstDataSourceService; private DstDataSourceExService dstDataSourceService;
@Autowired @Autowired
DefaultMQProducer defaultMQProducer; DefaultMQProducer defaultMQProducer;
@Autowired
@Lazy
private SqlSessionFactory sqlSessionFactory;
@Value("${rocketmq.producer.ruleEngineTopic: DSTMSG}") @Value("${rocketmq.producer.ruleEngineTopic: DSTMSG}")
private String ruleEngineTopic; private String ruleEngineTopic;
...@@ -115,11 +116,11 @@ public class RuleEngineExService extends RuleEngineServiceImpl { ...@@ -115,11 +116,11 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
String sql=entityModel.getSqlSegment("CORE"); String sql=entityModel.getSqlSegment("CORE");
MyBatisCursorItemReader myMyBatisCursorItemReader =new MyBatisCursorItemReader(); MyBatisCursorItemReader myMyBatisCursorItemReader =new MyBatisCursorItemReader();
try{ try{
List<EntityObj> kEntityObjs=dbEntityService.selectCore(entityModel, filter); // List<EntityObj> kEntityObjs=dbEntityService.selectCore(entityModel, filter);
if(kEntityObjs != null){ // if(kEntityObjs != null){
this.sendToMQ(et.getEngineId(), kEntityObjs); // this.sendToMQ(et.getEngineId(), kEntityObjs);
return et; // return et;
} // }
myMyBatisCursorItemReader.setSqlSessionFactory(sqlSessionFactory); myMyBatisCursorItemReader.setSqlSessionFactory(sqlSessionFactory);
myMyBatisCursorItemReader.setQueryId("cn.ibizlab.core.extensions.mapper.DbEntityMapper.search"); myMyBatisCursorItemReader.setQueryId("cn.ibizlab.core.extensions.mapper.DbEntityMapper.search");
...@@ -145,6 +146,7 @@ public class RuleEngineExService extends RuleEngineServiceImpl { ...@@ -145,6 +146,7 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
batch.add(rowdata); batch.add(rowdata);
if(batch.size() > 500){ if(batch.size() > 500){
this.sendToMQ(et.getEngineId(), batch); this.sendToMQ(et.getEngineId(), batch);
batch.clear();
} }
} }
if(batch.size() > 0){ if(batch.size() > 0){
...@@ -153,11 +155,11 @@ public class RuleEngineExService extends RuleEngineServiceImpl { ...@@ -153,11 +155,11 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
try { // try {
myMyBatisCursorItemReader.close();// 关闭游标 // myMyBatisCursorItemReader.close();// 关闭游标
} catch (Exception ex) { // } catch (Exception ex) {
log.error(ex.getMessage()); // log.error(ex.getMessage());
} // }
DynamicDataSourceContextHolder.poll(); DynamicDataSourceContextHolder.poll();
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[DA_BUILD]数据结构 --> <!--输出实体[DA_BUILD]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-da_build-49-1"> <changeSet author="root" id="tab-da_build-49-1">
<createTable tableName="IBZDABUILD"> <createTable tableName="IBZDABUILD">
<column name="BUILDID" remarks="" type="VARCHAR(100)"> <column name="BUILDID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DA_BUILD_BUILDID"/> <constraints primaryKey="true" primaryKeyName="PK_DA_BUILD_BUILDID"/>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!--输出实体[DA_CHART]数据结构 --> <!--输出实体[DA_CHART]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-da_chart-22-2"> <changeSet author="root" id="tab-da_chart-22-2">
<createTable tableName="IBZDACHART"> <createTable tableName="IBZDACHART">
<column name="CHARTID" remarks="" type="VARCHAR(100)"> <column name="CHARTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DA_CHART_CHARTID"/> <constraints primaryKey="true" primaryKeyName="PK_DA_CHART_CHARTID"/>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<!--输出实体[DA_METRIC]数据结构 --> <!--输出实体[DA_METRIC]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-da_metric-59-3"> <changeSet author="root" id="tab-da_metric-59-3">
<createTable tableName="IBZDAMETRIC"> <createTable tableName="IBZDAMETRIC">
<column name="DA_METRICID" remarks="" type="VARCHAR(100)"> <column name="DA_METRICID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DA_METRIC_DA_METRICID"/> <constraints primaryKey="true" primaryKeyName="PK_DA_METRIC_DA_METRICID"/>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<!--输出实体[DA_REPORT]数据结构 --> <!--输出实体[DA_REPORT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-da_report-24-4"> <changeSet author="root" id="tab-da_report-24-4">
<createTable tableName="IBZDAREPORT"> <createTable tableName="IBZDAREPORT">
<column name="REPORTID" remarks="" type="VARCHAR(100)"> <column name="REPORTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DA_REPORT_REPORTID"/> <constraints primaryKey="true" primaryKeyName="PK_DA_REPORT_REPORTID"/>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 --> <!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_datasource-6-5"> <changeSet author="root" id="tab-dst_datasource-6-5">
<createTable tableName="IBZDATASOURCE"> <createTable tableName="IBZDATASOURCE">
<column name="DSID" remarks="" type="VARCHAR(100)"> <column name="DSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<!--输出实体[DST_SYSTEM]数据结构 --> <!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_system-5-6"> <changeSet author="root" id="tab-dst_system-5-6">
<createTable tableName="IBZPSSYSTEM"> <createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)"> <column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/>
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<!--输出实体[RU_EXECLOG]数据结构 --> <!--输出实体[RU_EXECLOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ru_execlog-31-7"> <changeSet author="root" id="tab-ru_execlog-31-7">
<createTable tableName="IBZRULELOG"> <createTable tableName="IBZRULELOG">
<column name="RU_EXECLOGID" remarks="" type="VARCHAR(100)"> <column name="RU_EXECLOGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_RU_EXECLOG_RU_EXECLOGID"/> <constraints primaryKey="true" primaryKeyName="PK_RU_EXECLOG_RU_EXECLOGID"/>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
<!--输出实体[RU_EXECRESULT]数据结构 --> <!--输出实体[RU_EXECRESULT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ru_execresult-46-8"> <changeSet author="root" id="tab-ru_execresult-46-8">
<createTable tableName="IBZRULERESULT"> <createTable tableName="IBZRULERESULT">
<column name="RU_EXECRESULTID" remarks="" type="VARCHAR(100)"> <column name="RU_EXECRESULTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_RU_EXECRESULT_RU_EXECRESULT"/> <constraints primaryKey="true" primaryKeyName="PK_RU_EXECRESULT_RU_EXECRESULT"/>
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<!--输出实体[META_DATASET]数据结构 --> <!--输出实体[META_DATASET]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_dataset-2-9"> <changeSet author="root" id="tab-meta_dataset-2-9">
<createTable tableName="IBZDATASET"> <createTable tableName="IBZDATASET">
<column name="DATASETID" remarks="" type="VARCHAR(100)"> <column name="DATASETID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/> <constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/>
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
<!--输出实体[META_ENTITY]数据结构 --> <!--输出实体[META_ENTITY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_entity-13-10"> <changeSet author="root" id="tab-meta_entity-13-10">
<createTable tableName="IBZENTITY"> <createTable tableName="IBZENTITY">
<column name="ENTITYID" remarks="" type="VARCHAR(100)"> <column name="ENTITYID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/> <constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
<!--输出实体[META_FIELD]数据结构 --> <!--输出实体[META_FIELD]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_field-7-11"> <changeSet author="root" id="tab-meta_field-7-11">
<createTable tableName="IBZFIELD"> <createTable tableName="IBZFIELD">
<column name="FIELDID" remarks="" type="VARCHAR(100)"> <column name="FIELDID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/> <constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/>
...@@ -322,7 +322,7 @@ ...@@ -322,7 +322,7 @@
<!--输出实体[META_MODEL]数据结构 --> <!--输出实体[META_MODEL]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_model-18-12"> <changeSet author="root" id="tab-meta_model-18-12">
<createTable tableName="IBZMODEL"> <createTable tableName="IBZMODEL">
<column name="MODELID" remarks="" type="VARCHAR(100)"> <column name="MODELID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/> <constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/>
...@@ -348,7 +348,7 @@ ...@@ -348,7 +348,7 @@
<!--输出实体[META_MODULE]数据结构 --> <!--输出实体[META_MODULE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_module-7-13"> <changeSet author="root" id="tab-meta_module-7-13">
<createTable tableName="IBZMODULE"> <createTable tableName="IBZMODULE">
<column name="MODULEID" remarks="" type="VARCHAR(100)"> <column name="MODULEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODULE_MODULEID"/> <constraints primaryKey="true" primaryKeyName="PK_META_MODULE_MODULEID"/>
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
<!--输出实体[META_RELATION]数据结构 --> <!--输出实体[META_RELATION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_relation-6-14"> <changeSet author="root" id="tab-meta_relation-6-14">
<createTable tableName="IBZRELATION"> <createTable tableName="IBZRELATION">
<column name="RELATIONID" remarks="" type="VARCHAR(100)"> <column name="RELATIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/> <constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/>
...@@ -398,7 +398,7 @@ ...@@ -398,7 +398,7 @@
<!--输出实体[RU_ENGINE]数据结构 --> <!--输出实体[RU_ENGINE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ru_engine-38-15"> <changeSet author="root" id="tab-ru_engine-38-15">
<createTable tableName="IBZRULEENGINE"> <createTable tableName="IBZRULEENGINE">
<column name="ENGINEID" remarks="" type="VARCHAR(100)"> <column name="ENGINEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_RU_ENGINE_ENGINEID"/> <constraints primaryKey="true" primaryKeyName="PK_RU_ENGINE_ENGINEID"/>
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
<!--输出实体[RU_ITEM]数据结构 --> <!--输出实体[RU_ITEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ru_item-77-16"> <changeSet author="root" id="tab-ru_item-77-16">
<createTable tableName="IBZRULE"> <createTable tableName="IBZRULE">
<column name="RULEID" remarks="" type="VARCHAR(100)"> <column name="RULEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_RU_ITEM_RULEID"/> <constraints primaryKey="true" primaryKeyName="PK_RU_ITEM_RULEID"/>
...@@ -459,7 +459,7 @@ ...@@ -459,7 +459,7 @@
<!--输出实体[DA_BUILD]外键关系 --> <!--输出实体[DA_BUILD]外键关系 -->
<!--输出实体[DA_CHART]外键关系 --> <!--输出实体[DA_CHART]外键关系 -->
<!--输出实体[DA_METRIC]外键关系 --> <!--输出实体[DA_METRIC]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-da_metric-59-17"> <changeSet author="root" id="fk-da_metric-59-17">
<addForeignKeyConstraint baseColumnNames="BUILDID" baseTableName="IBZDAMETRIC" constraintName="DER1N_DA_METRIC_DA_BUILD_BUILD" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BUILDID" referencedTableName="IBZDABUILD" validate="true"/> <addForeignKeyConstraint baseColumnNames="BUILDID" baseTableName="IBZDAMETRIC" constraintName="DER1N_DA_METRIC_DA_BUILD_BUILD" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BUILDID" referencedTableName="IBZDABUILD" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[DA_REPORT]外键关系 --> <!--输出实体[DA_REPORT]外键关系 -->
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<spring-cloud-openfeign.version>2.2.1.RELEASE</spring-cloud-openfeign.version> <spring-cloud-openfeign.version>2.2.1.RELEASE</spring-cloud-openfeign.version>
<!-- Alibaba Druid --> <!-- Alibaba Druid -->
<alibaba-druid.version>1.1.16</alibaba-druid.version> <alibaba-druid.version>1.1.21</alibaba-druid.version>
<!-- Mybatis Plus --> <!-- Mybatis Plus -->
<mybatis-plus.version>3.3.1</mybatis-plus.version> <mybatis-plus.version>3.3.1</mybatis-plus.version>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<!-- 阿里seata分布式事务 --> <!-- 阿里seata分布式事务 -->
<alibaba-seata.version>1.3.0</alibaba-seata.version> <alibaba-seata.version>1.3.0</alibaba-seata.version>
<oracle.version>11.2.0.3</oracle.version> <oracle.version>19.8.0.0</oracle.version>
<postgresql.version>42.2.6</postgresql.version> <postgresql.version>42.2.6</postgresql.version>
</properties> </properties>
...@@ -327,8 +327,13 @@ ...@@ -327,8 +327,13 @@
<!-- Oracle驱动包 --> <!-- Oracle驱动包 -->
<dependency> <dependency>
<groupId>com.oracle</groupId> <groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc6</artifactId> <artifactId>ojdbc8</artifactId>
<version>${oracle.version}</version>
</dependency>
<dependency>
<groupId>com.oracle.database.nls</groupId>
<artifactId>orai18n</artifactId>
<version>${oracle.version}</version> <version>${oracle.version}</version>
</dependency> </dependency>
<!-- PostgreSQL驱动包 --> <!-- PostgreSQL驱动包 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册