Compare commits

..

29 Commits

Author SHA1 Message Date
liuy f01f5cd00a test(jolt): 添加 Jolt框架相关测试用例- 新增多个测试类,覆盖 Jolt 框架的各种操作:
- TestJoltCardinality: 测试 cardinality 操作  - TestJoltDefault:测试 default 操作
  - TestJoltModify: 测试 modify操作
  - TestJoltRemove: 测试 remove 操作 - TestJoltShift: 测试 shift 操作
  - TestJoltSort: 测试 sort 操作
- 在 pom.xml 中添加 Jolt 相关依赖
2025-07-01 08:50:56 +08:00
liuy 9ace3f6737 test(jolt-demo): 添加新功能测试用例和规格说明
- 新增 cardinality、default、modify、remove、shift、sort等操作的测试用例
- 添加相应的规格说明文件,详细描述每种操作的使用方法和示例
- 为 shift 操作提供了多种不同场景的测试用例和说明
2025-07-01 08:50:08 +08:00
liuy f9eb0bdea3 feat(base-buildpackage): 优化数据同步参数化功能
- 新增自动建表功能,增加相关连接和参数配置
- 更新 Oracle 和 MySQL 参数配置,适应新的数据同步需求
- 优化参数环境名称生成逻辑,使用当前时间作为后缀
- 调整字段映射关系配置,提高数据同步准确性
- 注释掉不必要的参数配置,简化配置结构
2025-05-28 16:07:44 +08:00
liuy 460722dde6 refactor(nifi): 移除 Connections 类中未使用的 bends 字段
- 删除了 Connections 类中的 bends 字段
- 该字段类型为 List<String>,但未在代码中使用
- 移除未使用的字段可以提高代码的可读性和维护性
2025-05-28 16:06:55 +08:00
liuy fa9def8ded test(nifi): 更新测试用例以支持新的处理器创建和参数更新功能
- 新增测试用例以验证处理器复制功能
- 新增测试用例以验证创建处理器并更新参数的功能
- 更新现有测试用例以使用新的处理器创建方法
- 优化测试用例中的参数设置和处理器配置
2025-05-27 15:12:33 +08:00
liuy 56841ca743 feat(nifi): 优化流程组状态清理和控制器服务激活功能- 修改了 findNeedModifyControllerAndChangesOccur 方法的调用参数,从 true, true 改为 true, false
- 新增了激活流程组内所有控制器服务的逻辑
- 优化了清理流程组状态的逻辑,使用新的状态清理标记
- 修复了批量启用控制器服务时的版本控制问题
2025-05-27 11:10:18 +08:00
liuy b9bca5795d feat(nifi): 新增处理器复制和状态清理功能
- 新增 CreateProcessorAndUpdateParamJoin 类用于创建处理器和更新参数
- 在 NifiAppOperationImpl 中实现 createProcessorAndUpdateParam 方法
- 在 NifiBaseOperationImpl 中实现 copyProcessor 和 clearProcessGroupState 方法
- 更新 INifiAppOperation 和 INifiBaseOperation 接口
- 新增 Relationships15、Processors16 等相关模型类
2025-05-26 19:15:03 +08:00
liuy d504b44601 test(nifi): 添加 Nifi 数据同步相关测试用例
- 新增 TestINifiBaseOperation 类,包含控制器服务和连接关系测试- 新增 TestNifiDbSync 类,涵盖参数上下文、控制器服务、流程组创建等测试- 移除 TestNifiLog 中的未使用引用
2025-05-23 17:46:20 +08:00
liuy 346dcdf75d refactor(nifi): 重构 Oracle 应用创建逻辑
-重命名 CreateAppInstance 类为 CreateAppInstanceJoin,以更准确地反映其功能
- 新增 CreateAppInstanceResult 类用于封装创建结果
- 修改 INifiAppOperation接口,使用 CreateAppInstanceJoin 作为入参,返回 CreateAppInstanceResult 对象
- 优化 NifiAppOperationImpl 中的 createAppContext 方法,返回新创建的流程组 ID
- 调整 INifiBaseOperation 接口文档,明确 mark 参数为可选
- 优化 NifiFilterUtil 中的 filterPortsByComments 方法,支持空 mark 参数
2025-05-23 17:45:15 +08:00
liuy a5ee210a22 feat(nifi): 增加接口关系标记功能
- 在 NifiServiceConfig 中添加 relationshipMark配置项
- 在 Component 类中增加 comments、state、type等字段
- 新增 PortFilterResult 类用于存储过滤后的端口结果
- 在 NifiBaseOperationImpl 中实现 getNeedModifyControllerRelationshipByProcessGroup 方法
- 在 INifiBaseOperation 接口中添加相应的方法声明
- 新增 NifiFilterUtil 工具类用于过滤端口
2025-05-23 15:12:12 +08:00
liuy 095e58d812 feat(nifi): 完善应用创建并实例化的功能
-重构了应用创建流程,支持 Oracle 和 MySQL 应用的创建和实例化
- 新增了控制器服务的修改和启用功能
- 添加了批量创建连接关系的方法- 优化了代码结构,提高了可维护性和可扩展性
2025-05-23 10:18:07 +08:00
liuy 83f99be452 feat(nifi): 新增参数上下文创建和控制器更新功能
- 新增创建参数上下文并绑定到指定流程组的功能
- 新增查询需要修改的控制器详情功能
- 新增更新控制器服务的功能
- 重构了基础操作接口,增加了新的操作方法
-优化了代码结构,提高了可维护性和可扩展性
2025-05-22 11:51:11 +08:00
liuy 58ff225c47 feat(nifi): 新增应用实例化功能
- 新增 Oracle 和 MySQL 应用实例化功能- 实现创建流程组、处理器和连接的功能
- 添加计算新组件坐标的逻辑
- 封装基础操作和 NiFi 操作接口
2025-05-21 18:20:50 +08:00
liuy 675b4a7925 test(frame): 添加 Nifi 日志测试类
- 新增 TestNifiLog 类,用于测试 Nifi 日志查询功能
- 实现了查询指定处理器 ID 和日期的日志信息
- 使用 Spring Boot测试框架,集成 ILoggingEvent20250430Dao
2025-05-20 16:49:10 +08:00
liuy a0900b1cee feat(nifilog): 添加 2025 年 4月 30 日的日志事件和属性表
- 新增 LoggingEvent20250430 和 LoggingEventProperty20250430 两个实体类
- 实现了对应的 DAO 和 Service 接口及其实现类
- 添加了分页查询、批量插入等方法
2025-05-20 16:34:42 +08:00
liuy d7413fb99f build(base-buildpackage): 添加 dev环境配置文件
- 新增 application-liuy.yml 文件,包含 dev 环境的配置信息
- 配置内容包括日志设置、数据源配置、文件保存路径等
- 添加了与 CBS8、OA 等系统的集成配置
- 包含了 NiFi API 的访问信息
2025-05-20 08:59:07 +08:00
liuy 7d60bdeef4 build: 更新项目构建配置
- 移除 NiFi 客户端相关代码
- 删除了多个 NiFi 模型类
- 移除了 NiFi 服务配置类
- 删除了自定义的 OkHttpClient 和 Jackson 配置
2025-05-19 15:50:33 +08:00
liuy c0ef153a17 feat(nifi): 添加创建连接关系功能
- 新增 CreateConnection18、Component18、Revision18 等相关模型类- 在 NifiApiService 中添加 createProcessorConnections 方法用于建立连接关系
- 新增对应的请求和响应模型类,以支持创建连接关系的 API 调用
2025-05-19 15:47:32 +08:00
liuy 7abd8bbed9 feat(nifi-client): 增加处理器详情查询、更新和删除功能
- 新增处理器详情查询、更新和删除相关的 API 接口
- 添加处理器信息和版本相关的新模型类
- 优化错误处理,使用 StrUtil 格式化错误信息
2025-05-19 11:49:10 +08:00
liuy b228ab67a5 feat(nifi): 增加创建模板、实例化代码片段和创建处理器的功能
- 新增创建 NiFi 模板的功能
- 实现将代码片段实例化到指定位置的方法
- 添加创建处理器的功能,支持 nifi 1.28.1 版本的 364 个处理器- 优化日志输出,使用 slf4j 替代 System.out.println
- 新增多个结果模型类,用于处理不同类型的响应数据
2025-05-17 16:53:07 +08:00
liuy 7a5e8bf6f2 feat(nifi): 添加模板和代码片段相关功能
- 新增获取所有 XML 模板的接口- 新增根据模板 ID 获取 XML 模板内容的接口
- 新增生成模板的功能
- 新增复制流程组为代码片段的功能
- 优化 NiFi 客户端,支持 GET 请求返回文件流
2025-05-17 11:27:27 +08:00
liuy 6afd2264e3 feat(nifi): 添加控制器服务启用、禁用和删除功能
- 新增 EnOrDiControllerServices12 和 Revision13 类用于启用或禁用控制器服务
- 在 NifiApiService 中添加 enabledOrDisabledControllerServices 方法实现控制器服务启用或禁用
- 在 NifiApiService 中添加 deleteControllerServices 方法实现控制器服务删除
2025-05-16 17:49:06 +08:00
liuy a37f6ab340 feat(nifi): 添加控制器服务相关功能
- 新增 ControllerService12、Component12、Revision12 类用于处理控制器服务相关数据
- 在 NifiApiService 中添加获取控制器服务详情和创建流程组级别的控制器服务的方法
2025-05-16 16:45:17 +08:00
liuy 72710dc255 feat(nifi): 增加流程组相关API接口并优化参数处理
- 新增流程组查询、创建、删除和启动/停止的API接口
- 添加流程组绑定参数上下文的接口
- 优化参数处理,支持直接传入对象作为请求体
-重构部分代码以提高可维护性
2025-05-16 11:21:28 +08:00
liuy 9acde1cb1e feat(nifi-client): 添加删除参数上下文功能并优化模型命名- 在 NifiClient 中添加 delete 方法支持 DELETE 请求
- 在 NifiApiService 中实现删除参数上下文的接口
- 优化模型类命名,提高代码可读性
- 更新参数上下文相关 API 调用路径
2025-05-15 10:23:05 +08:00
liuy e535d45df3 feat(nifi): 添加参数上下文功能并优化错误处理
- 新增参数上下文相关模型类- 实现参数上下文创建、更新、删除和查询的API接口
- 优化错误处理,提高异常信息的可读性
- 移除未使用的ProcessorConfig类
2025-05-14 19:09:55 +08:00
liuy 5d9fb90fb1 refactor(fw-nifi):重构 Nifi 相关代码- 更新 Jackson 配置,增加忽略未知属性的功能
- 新增多个 Nifi 模型类,包括 Breadcrumb2、Breadcrumb3、ParentBreadcrumb2 和 Permissions2
- 修改现有模型类,增加新字段以适应 Nifi API 变更
- 调整 NifiApiService 中的 queryFlowProcessGroupsRoot 方法,支持返回不同类型的响应
2025-05-14 18:27:58 +08:00
liuy 10aeddff70 (nfeatifi): 添加 NiFi API 客户端和相关模型类
- 新增 NiFi API客户端类 NifiClient,实现与 NiFi 服务器的通信
- 添加多个 NiFi 模型类,用于解析和处理 NiFi API 响应数据
- 新增 Jackson 配置类和 JSON 工具类,用于 JSON 数据处理
- 移除无用的 Main 类
2025-05-14 17:49:37 +08:00
xiang2lin 7262d4f9a3 fw-nifi模块初始化 2025-05-12 14:17:58 +08:00
299 changed files with 8548 additions and 847 deletions

View File

@ -18,6 +18,22 @@
<artifactId>base-webapp</artifactId> <artifactId>base-webapp</artifactId>
<version>${revision}</version> <version>${revision}</version>
</dependency> </dependency>
<dependency>
<groupId>com.hzya.frame</groupId>
<artifactId>fw-nifi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.bazaarvoice.jolt</groupId>
<artifactId>jolt-core</artifactId>
<version>${latest.jolt.version}</version>
</dependency>
<dependency>
<groupId>com.bazaarvoice.jolt</groupId>
<artifactId>json-utils</artifactId>
<version>${latest.jolt.version}</version>
</dependency>
</dependencies> </dependencies>
<profiles> <profiles>
@ -32,6 +48,12 @@
</profile> </profile>
<profile>
<id>liuy</id> <!--刘洋-->
<properties>
<profile.active>liuy</profile.active>
</properties>
</profile>
<profile> <profile>
<id>llg</id> <!--吕磊钢--> <id>llg</id> <!--吕磊钢-->
<properties> <properties>

View File

@ -0,0 +1,48 @@
#######################dev环境#######################
logging:
#日志级别 指定目录级别
level:
root: warn
encodings: UTF-8
file:
# 日志保存路径
path: /Users/liuyang/workspaces/hzya/fw-nifi/zt-log
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/liuyang/workspaces/hzya/fw-nifi/zt-file
# path: D:\webservice\file
# pluginpath: D:\webservice\plugin
pluginpath: /home/webservice/zt/plugin
# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826
#电子回单下载临时存放位置
elec_path: /Users/xiangerlin/Downloads/
OA:
data_source_code: yc_oa
zt:
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
nifi:
api:
url: https://192.168.2.233:8443/nifi-api
username: hzya
password: hzya1314*nifi

View File

@ -0,0 +1,136 @@
package com.hzya.frame;
import com.hzya.frame.nifiapi.model.joincreateprocessorandupdateparam.CreateProcessorAndUpdateParamJoin;
import com.hzya.frame.nifiapi.model.joingetallcontrollerservice.Component19;
import com.hzya.frame.nifiapi.model.joingetallcontrollerservice.ControllerServices19;
import com.hzya.frame.nifiapi.model.resultNeedModifyController.PortFilterResult;
import com.hzya.frame.nifiapi.model.resultprocessorsinfo.Component16;
import com.hzya.frame.nifiapi.model.resultprocessorsinfo.Config16;
import com.hzya.frame.nifiapi.operation.INifiAppOperation;
import com.hzya.frame.nifiapi.operation.INifiBaseOperation;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestINifiBaseOperation
* @Date2025/5/22 17:02
* @FilenameTestINifiBaseOperation
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {WebappApplication.class})
public class TestINifiBaseOperation {
@Autowired
private INifiBaseOperation iNifiBaseOperation;
@Autowired
private INifiAppOperation iNifiAppOperation;
@Test
public void testGetNeedModifyControllerServicesByProcessGroup() throws Exception {
try {
List<ControllerServices19> needModifyControllerServicesByProcessGroup = iNifiBaseOperation.getNeedModifyControllerServicesByProcessGroup("4143d803-0196-1000-968f-b06f55b43a3f");
System.out.println(needModifyControllerServicesByProcessGroup.size());
ControllerServices19 controllerServices19 = needModifyControllerServicesByProcessGroup.get(0);
Component19 component = controllerServices19.getComponent();
System.out.println(component.getName());
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testGetNeedModifyControllerServicesByProcessGroup2() throws Exception {
try {
ControllerServices19 czfJwnb9sb = iNifiBaseOperation.getNeedModifyControllerServicesByProcessGroup("4143d803-0196-1000-968f-b06f55b43a3f", "CZFJwnb9sb");
if (czfJwnb9sb != null && czfJwnb9sb.getComponent() != null) {
Component19 component = czfJwnb9sb.getComponent();
String name = component.getName();
System.out.println(name);
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testGetNeedModifyControllerRelationshipByProcessGroup() throws Exception {
try {
PortFilterResult needModifyControllerRelationshipByProcessGroup = iNifiBaseOperation.getNeedModifyControllerRelationshipByProcessGroup("41437b87-0196-1000-6951-50e41e75c0da", "f5228bc8-0360-41eb-a640-9f4df953937c");
System.out.println(needModifyControllerRelationshipByProcessGroup);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testCopyProcessor() throws Exception {
try {
String targetProcessorId = "7f70897a-0196-1000-241a-3a7cdf5bf521";
String parentProcessGroupId = "76e23100-ad84-1aab-4447-b9ee936ee7d5";
String copyTargetProcessGroupId = "76e23115-ad84-1aab-7630-21c76aa3973d";
String s = iNifiBaseOperation.copyProcessor(targetProcessorId, parentProcessGroupId, copyTargetProcessGroupId);
System.out.println("新处理器id" + s);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testCreateProcessorAndUpdateParam() {
try {
Map<String, String> properties = new HashMap<>();
properties.put("File Size", "1B");
properties.put("Batch Size", "2");
properties.put("Data Format", "Binary");
properties.put("Unique FlowFiles", "true");
properties.put("character-set", "GBK");
Config16 config16 = new Config16();
config16.setProperties(properties);
Component16 component16 = new Component16();
component16.setName("修改处理器名称2");
component16.setConfig(config16);
CreateProcessorAndUpdateParamJoin createProcessorAndUpdateParamJoin = new CreateProcessorAndUpdateParamJoin();
createProcessorAndUpdateParamJoin.setComponent(component16);
createProcessorAndUpdateParamJoin.setTargetProcessorId("7f70897a-0196-1000-241a-3a7cdf5bf521");
createProcessorAndUpdateParamJoin.setCopyTargetProcessGroupId("76e23115-ad84-1aab-7630-21c76aa3973d");
createProcessorAndUpdateParamJoin.setParentProcessGroupId("76e23100-ad84-1aab-4447-b9ee936ee7d5");
String processorAndUpdateParam = iNifiAppOperation.createProcessorAndUpdateParam(createProcessorAndUpdateParamJoin);
System.out.println("新处理器id" + processorAndUpdateParam);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testgGetFindStateClearMarkProcessor() throws Exception {
try {
iNifiBaseOperation.getFindStateClearMarkProcessor("41437b87-0196-1000-6951-50e41e75c0da", "接口状态清理标记");
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testBatchEnabledControllerServices() throws Exception {
try {
iNifiBaseOperation.batchEnabledControllerServices("4143d803-0196-1000-968f-b06f55b43a3f", "xxxx");
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,761 @@
package com.hzya.frame;
import com.hzya.frame.nifiapi.model.joincreateconnections.Component18;
import com.hzya.frame.nifiapi.model.joincreateconnections.CreateConnections18;
import com.hzya.frame.nifiapi.model.joincreateconnections.Revision18;
import com.hzya.frame.nifiapi.model.joincreateconnections.SourceOrDestination18;
import com.hzya.frame.nifiapi.model.joincreateoracleapp.CreateAppInstanceJoin;
import com.hzya.frame.nifiapi.model.joincreateprocessconnection.CreateProcessorConnections;
import com.hzya.frame.nifiapi.model.joincreateprocessorandupdateparam.CreateProcessorAndUpdateParamJoin;
import com.hzya.frame.nifiapi.model.joincreparamcontext.CreateParamContextJoin;
import com.hzya.frame.nifiapi.model.joinfindneedmodifycontroller.FindNeedModifyController;
import com.hzya.frame.nifiapi.model.joingetcontroller.Component12;
import com.hzya.frame.nifiapi.model.joingetcontroller.ControllerService12;
import com.hzya.frame.nifiapi.model.joinparametercontexts.*;
import com.hzya.frame.nifiapi.model.joinprocessgroups.Component7;
import com.hzya.frame.nifiapi.model.joinprocessgroups.ProcessGroupsJoin;
import com.hzya.frame.nifiapi.model.joinprocessgroups.Revision5;
import com.hzya.frame.nifiapi.model.joinsnippetinstance.SnippetInstanceJoin;
import com.hzya.frame.nifiapi.model.joinsnippets.Snippet;
import com.hzya.frame.nifiapi.model.joinsnippets.SnippetsJoin;
import com.hzya.frame.nifiapi.model.joinstartorstopprocessgroup.Revision10;
import com.hzya.frame.nifiapi.model.joinstartorstopprocessgroup.StartOrStopProcessGroupsInfoJoin10;
import com.hzya.frame.nifiapi.model.resultNeedModifyController.PortFilterResult;
import com.hzya.frame.nifiapi.model.resultcreateoracleapp.CreateAppInstanceResult;
import com.hzya.frame.nifiapi.model.resultcreateprocessor.*;
import com.hzya.frame.nifiapi.model.resultcreateprocessors.CreateProcess16;
import com.hzya.frame.nifiapi.model.resultcreatesnippet.Flow15;
import com.hzya.frame.nifiapi.model.resultcreatesnippet.ProcessGroups15;
import com.hzya.frame.nifiapi.model.resultcreatesnippet.SnippetInstance15;
import com.hzya.frame.nifiapi.model.resultprocessgroups.ProcessgroupsResult;
import com.hzya.frame.nifiapi.model.resultprocessgroupsinfo.ProcessGroupsInfoResult9;
import com.hzya.frame.nifiapi.model.resultprocessgroupsinfo.Revision9;
import com.hzya.frame.nifiapi.model.resultsnippets.Snippet13;
import com.hzya.frame.nifiapi.model.resultsnippets.SnippetResult13;
import com.hzya.frame.nifiapi.operation.INifiAppOperation;
import com.hzya.frame.nifiapi.operation.INifiBaseOperation;
import com.hzya.frame.nifiapi.service.NifiApiService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
/**
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestNifiDbSync
* @Date2025/5/20 17:49
* @FilenameTestNifiDbSync
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {WebappApplication.class})
public class TestNifiDbSync {
@Autowired
private NifiApiService nifiApiService;
@Autowired
private INifiAppOperation nifiOperation;
@Autowired
private INifiBaseOperation iNifiBaseOperation;
/**
* 测试nifi数据同步场景调用
*/
@Test
public void testDbSync2() throws Exception {
//创建业务数据流对应的流程组
String parentProcessGroupId = "76e23115-ad84-1aab-7630-21c76aa3973d";
String processGroupsName = "Oracle19c->Mysql跨数据源同步";
String newProcessGroupsId = testCreateProcessGroups(parentProcessGroupId, processGroupsName);
//新建GenerateFlowFile处理器(开始的处理器)
// String generateFlowFileId = testCreateProcessor(newProcessGroupsId);
CreateProcessorAndUpdateParamJoin createProcessorAndUpdateParamJoin = new CreateProcessorAndUpdateParamJoin();
createProcessorAndUpdateParamJoin.setTargetProcessorId("02d23f3c-7003-1a1b-1cdc-e9f37874bd78");
createProcessorAndUpdateParamJoin.setParentProcessGroupId("76e23100-ad84-1aab-4447-b9ee936ee7d5");
createProcessorAndUpdateParamJoin.setCopyTargetProcessGroupId(newProcessGroupsId);
String generateFlowFileId = nifiOperation.createProcessorAndUpdateParam(createProcessorAndUpdateParamJoin);
//创建Oracle应用
//初始化实例
CreateAppInstanceJoin createOracleApp = new CreateAppInstanceJoin();
createOracleApp.setAppProcessGroupId("41437b87-0196-1000-6951-50e41e75c0da");
createOracleApp.setParentProcessGroupId("76e23100-ad84-1aab-4447-b9ee936ee7d5");
createOracleApp.setCopyTargetProcessGroupId(newProcessGroupsId);
//上下文
CreateParamContextJoin createParamContextJoin = setOracleParamContextJoin();
createOracleApp.setCreateParamContextJoin(createParamContextJoin);
//控制器
// FindNeedModifyController findNeedModifyController = setOracleFindNeedModifyController(newProcessGroupsId);
// createOracleApp.setFindNeedModifyController(findNeedModifyController);
CreateAppInstanceResult oracleAppContext = nifiOperation.createAppContext(createOracleApp);
//创建Mysql应用
//初始化实例
CreateAppInstanceJoin createOracleApp2 = new CreateAppInstanceJoin();
createOracleApp2.setAppProcessGroupId("4143d803-0196-1000-968f-b06f55b43a3f");
createOracleApp2.setParentProcessGroupId("76e23100-ad84-1aab-4447-b9ee936ee7d5");
createOracleApp2.setCopyTargetProcessGroupId(newProcessGroupsId);
//上下文
CreateParamContextJoin createParamContextJoin2 = setMysqlParamContextJoin(newProcessGroupsId);
createOracleApp2.setCreateParamContextJoin(createParamContextJoin2);
//控制器
// FindNeedModifyController findNeedModifyController2 = setMysqlFindNeedModifyController(newProcessGroupsId);
// createOracleApp2.setFindNeedModifyController(findNeedModifyController2);
CreateAppInstanceResult mysqlAppContext = nifiOperation.createAppContext(createOracleApp2);
//新建LogAttribute处理器(结束处理器)
// String logAttributeId = testCreateProcessor2();
// String logAttributeId = null;
CreateProcessorAndUpdateParamJoin createProcessorAndUpdateParamJoin2 = new CreateProcessorAndUpdateParamJoin();
createProcessorAndUpdateParamJoin2.setTargetProcessorId("7f70897a-0196-1000-241a-3a7cdf5bf521");
createProcessorAndUpdateParamJoin2.setParentProcessGroupId("76e23100-ad84-1aab-4447-b9ee936ee7d5");
createProcessorAndUpdateParamJoin2.setCopyTargetProcessGroupId(newProcessGroupsId);
String logAttributeId = nifiOperation.createProcessorAndUpdateParam(createProcessorAndUpdateParamJoin2);
//查找对应应用的连接标记
//TYPE=INPUT_PORT
PortFilterResult oracleMarkInput = iNifiBaseOperation.getNeedModifyControllerRelationshipByProcessGroup(oracleAppContext.getNewProcessGroupId(), "f5228bc8-0360-41eb-a640-9f4df953937c");
PortFilterResult oracleMarkOutPut = iNifiBaseOperation.getNeedModifyControllerRelationshipByProcessGroup(oracleAppContext.getNewProcessGroupId(), "4929a9ac-291a-4ea2-a4b1-286ddf47164a");
//TYPE=OUTPUT_PORT
PortFilterResult mysqlMarkInput = iNifiBaseOperation.getNeedModifyControllerRelationshipByProcessGroup(mysqlAppContext.getNewProcessGroupId(), "be05a6ad-a440-43ed-b4c0-d1edcf03334f");
PortFilterResult mysqlMarkOutput = iNifiBaseOperation.getNeedModifyControllerRelationshipByProcessGroup(mysqlAppContext.getNewProcessGroupId(), "7ac85368-f2c9-48df-ab5b-ea610449083d");
//查找Mysql应用的输入端口
PortFilterResult automaticTableCreation = iNifiBaseOperation.getNeedModifyControllerRelationshipByProcessGroup(mysqlAppContext.getNewProcessGroupId(), "9480f217-9d94-4dcd-ba80-f718cc6e59db");
//批量创建连接关系
//连接关系一:开始处理器->Oracle应用
SourceOrDestination18 source = new SourceOrDestination18();
source.setId(generateFlowFileId);
source.setGroupId(newProcessGroupsId);
source.setType("PROCESSOR");
SourceOrDestination18 destination = new SourceOrDestination18();
destination.setId(oracleMarkInput.getInputPorts().get(0).getId());
destination.setGroupId(oracleAppContext.getNewProcessGroupId());
destination.setType("INPUT_PORT");
List<String> selectedRelationships = new ArrayList<>();
selectedRelationships.add("success");
Component18 component18 = new Component18();
component18.setSource(source);
component18.setDestination(destination);
component18.setSelectedRelationships(selectedRelationships);
Revision18 revision18 = new Revision18();
revision18.setVersion("0");//默认传递0
CreateConnections18 createConnections17 = new CreateConnections18();
createConnections17.setComponent(component18);
createConnections17.setRevision(revision18);
List<CreateConnections18> createConnections18List = new ArrayList<>();
createConnections18List.add(createConnections17);
//连接关系二Oracle应用->Mysql应用
SourceOrDestination18 source2 = new SourceOrDestination18();
source2.setId(oracleMarkOutPut.getOutputPorts().get(0).getId());
source2.setGroupId(oracleAppContext.getNewProcessGroupId());
source2.setType("OUTPUT_PORT");
SourceOrDestination18 destination2 = new SourceOrDestination18();
destination2.setId(mysqlMarkInput.getInputPorts().get(0).getId());
destination2.setGroupId(mysqlAppContext.getNewProcessGroupId());
destination2.setType("INPUT_PORT");
// List<String> selectedRelationships2 = new ArrayList<>();
// selectedRelationships2.add("success");
Component18 component182 = new Component18();
component182.setSource(source2);
component182.setDestination(destination2);
// component182.setSelectedRelationships(selectedRelationships2);
Revision18 revision182 = new Revision18();
revision182.setVersion("0");//默认传递0
CreateConnections18 createConnections172 = new CreateConnections18();
createConnections172.setComponent(component182);
createConnections172.setRevision(revision182);
createConnections18List.add(createConnections172);
//连接关系三Mysql应用->结束处理器
SourceOrDestination18 source3 = new SourceOrDestination18();
source3.setId(mysqlMarkOutput.getOutputPorts().get(0).getId());
source3.setGroupId(mysqlAppContext.getNewProcessGroupId());
source3.setType("OUTPUT_PORT");
SourceOrDestination18 destination3 = new SourceOrDestination18();
destination3.setId(logAttributeId);
destination3.setGroupId(newProcessGroupsId);
destination3.setType("PROCESSOR");
// List<String> selectedRelationships3 = new ArrayList<>();
// selectedRelationships3.add("success");
Component18 component183 = new Component18();
component183.setSource(source3);
component183.setDestination(destination3);
// component183.setSelectedRelationships(selectedRelationships3);
Revision18 revision183 = new Revision18();
revision183.setVersion("0");//默认传递0
CreateConnections18 createConnections173 = new CreateConnections18();
createConnections173.setComponent(component183);
createConnections173.setRevision(revision183);
createConnections18List.add(createConnections173);
//连接关系四如果存在自动建表则需要从开始节点-连接到Mysql应用的"自动建表"的输入端口
List<String> selectedRelationships2 = new ArrayList<>();
selectedRelationships2.add("success");
SourceOrDestination18 source4 = new SourceOrDestination18();
source4.setId(generateFlowFileId);
source4.setGroupId(newProcessGroupsId);
source4.setType("PROCESSOR");
SourceOrDestination18 destination4 = new SourceOrDestination18();
destination4.setId(automaticTableCreation.getInputPorts().get(0).getId());
destination4.setGroupId(mysqlAppContext.getNewProcessGroupId());
destination4.setType("INPUT_PORT");
Component18 component184 = new Component18();
component184.setSource(source4);
component184.setDestination(destination4);
component184.setSelectedRelationships(selectedRelationships2);
Revision18 revision184 = new Revision18();
revision184.setVersion("0");//默认传递0
CreateConnections18 createConnections174 = new CreateConnections18();
createConnections174.setComponent(component184);
createConnections174.setRevision(revision184);
createConnections18List.add(createConnections174);
CreateProcessorConnections createProcessorConnections = new CreateProcessorConnections();
createProcessorConnections.setProcessGroupsId(newProcessGroupsId);
createProcessorConnections.setCreateConnections18(createConnections18List);
iNifiBaseOperation.batchCreateProcessorConnections(createProcessorConnections);
//去掉流程组内对应的处理器旧状态
// List<String> stringList = new ArrayList<>();
// stringList.add(oracleAppContext.getNewProcessGroupId());
// stringList.add(mysqlAppContext.getNewProcessGroupId());
// iNifiBaseOperation.clearProcessGroupState(stringList);
//启动业务处理器
ProcessGroupsInfoResult9 processGroups = nifiApiService.getProcessGroups(newProcessGroupsId);
Revision9 revision = processGroups.getRevision();
Revision10 revision10 = new Revision10();
revision10.setVersion(revision.getVersion());
StartOrStopProcessGroupsInfoJoin10 startOrStopProcessGroupsInfoJoin10 = new StartOrStopProcessGroupsInfoJoin10();
startOrStopProcessGroupsInfoJoin10.setId(processGroups.getId());
startOrStopProcessGroupsInfoJoin10.setState("RUNNING");
startOrStopProcessGroupsInfoJoin10.setRevision(revision10);
ProcessGroupsInfoResult9 processGroupsInfoResult9 = nifiApiService.startOrStopProcessGroups(startOrStopProcessGroupsInfoJoin10);
System.out.println("流程组id" + processGroupsInfoResult9.getId());
}
public CreateParamContextJoin setOracleParamContextJoin() throws Exception {
Revision revision = new Revision();
revision.setVersion(0);
Parameter2 parameter = new Parameter2();
parameter.setSensitive(false);
parameter.setName("additionalWhereClause");
parameter.setValue("1=1");
parameter.setDescription("where条件");
Parameter2 parameter2 = new Parameter2();
parameter2.setSensitive(false);
parameter2.setName("columnsToReturn");
parameter2.setValue("csaleid,vreceiptcode,ts");
parameter2.setDescription("需要查询的表字段");
Parameter2 parameter3 = new Parameter2();
parameter3.setSensitive(false);
parameter3.setName("customOrderByColumn");
parameter3.setValue("ts,csaleid asc");
parameter3.setDescription("排序规则,如果有增量同步需求,一定要通过时间+主键");
Parameter2 parameter4 = new Parameter2();
parameter4.setSensitive(false);
parameter4.setName("maximumValueColumns");
parameter4.setValue("ts");
parameter4.setDescription("分片字段");
Parameter2 parameter5 = new Parameter2();
parameter5.setSensitive(false);
parameter5.setName("sourceTbName");
parameter5.setValue("U8C241231.SO_SALE");
parameter5.setDescription("查询表名称");
Parameters2 parameters = new Parameters2();
parameters.setParameter(parameter);
Parameters2 parameters2 = new Parameters2();
parameters2.setParameter(parameter2);
Parameters2 parameters3 = new Parameters2();
parameters3.setParameter(parameter3);
Parameters2 parameters4 = new Parameters2();
parameters4.setParameter(parameter4);
Parameters2 parameters5 = new Parameters2();
parameters5.setParameter(parameter5);
List<Parameters2> parametersList = new ArrayList<>();
parametersList.add(parameters);
parametersList.add(parameters2);
parametersList.add(parameters3);
parametersList.add(parameters4);
parametersList.add(parameters5);
Component3 component = new Component3();
component.setName("oracle参数环境" + createParamTime());
component.setParameters(parametersList);
ParameterContextsJoin parameterContextsJoin = new ParameterContextsJoin();
parameterContextsJoin.setComponent(component);
parameterContextsJoin.setRevision(revision);
CreateParamContextJoin createParamContextJoin = new CreateParamContextJoin();
createParamContextJoin.setParameterContextsJoin(parameterContextsJoin);
// createParamContextJoin.setProcessGroupsId(processGroupsId);
return createParamContextJoin;
}
public static String createParamTime() {
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyMMddHHmm");
String formattedTime = now.format(formatter);
return formattedTime;
}
public CreateParamContextJoin setMysqlParamContextJoin(String processGroupsId) throws Exception {
Revision revision = new Revision();
revision.setVersion(0);
// Parameter2 parameter = new Parameter2();
// parameter.setSensitive(false);
// parameter.setName("Release Signal Identifier");
// parameter.setValue("table_creation");
// parameter.setDescription("参数描述");
// Parameter2 parameter2 = new Parameter2();
// parameter2.setSensitive(false);
// parameter2.setName("autoTableCreation");
// parameter2.setValue("Y");
// parameter2.setDescription("是否自动建表");
Parameter2 parameter3 = new Parameter2();
parameter3.setSensitive(false);
parameter3.setName("mappingRelationship");
parameter3.setValue("[\n" + " {\n" + " \"targetTbName\": \"iep_so_sale\",\n" + " \"targetDBType\": \"mysql8.0.44\",\n" + " \"writeType\": \"1\",\n" + " \"fieldRelationship\": [\n" + " {\n" + " \"sourceFieldName\": \"csaleid\",\n" + " \"sourceFieldType\": \"varchar2(30)\",\n" + " \"targetFieldName\": \"csaleid\",\n" + " \"targetFieldType\": \"varchar(100)\",\n" + " \"targetFieldNameNotes\": \"主键\",\n" + " \"primaryKey\": \"Y\"\n" + " },\n" + " {\n" + " \"sourceFieldName\": \"vreceiptcode\",\n" + " \"sourceFieldType\": \"varchar2(30)\",\n" + " \"targetFieldName\": \"vreceiptcode\",\n" + " \"targetFieldType\": \"varchar(100)\",\n" + " \"targetFieldNameNotes\": \"编码\"\n" + " },\n" + " {\n" + " \"sourceFieldName\": \"ts\",\n" + " \"sourceFieldType\": \"varchar2(30)\",\n" + " \"targetFieldName\": \"ts\",\n" + " \"targetFieldType\": \"varchar(100)\",\n" + " \"targetFieldNameNotes\": \"更新时间\"\n" + " }\n" + " ]\n" + " }\n" + "]");
parameter3.setDescription("字段映射关系");
// Parameter2 parameter4 = new Parameter2();
// parameter4.setSensitive(false);
// parameter4.setName("releaseSignalIdentifier");
// parameter4.setValue(UUID.randomUUID().toString());
// parameter4.setDescription("建表信号,传随机值!");
// Parameter2 parameter4 = new Parameter2();
// parameter4.setSensitive(false);
// parameter4.setName("maximumValueColumns");
// parameter4.setValue("ts");
// parameter4.setDescription("参数描述");
// Parameter2 parameter5 = new Parameter2();
// parameter5.setSensitive(false);
// parameter5.setName("sourceTbName");
// parameter5.setValue("U8C241231.SO_SALE");
// parameter5.setDescription("参数描述");
// Parameters2 parameters = new Parameters2();
// parameters.setParameter(parameter4);
// Parameters2 parameters2 = new Parameters2();
// parameters2.setParameter(parameter2);
Parameters2 parameters3 = new Parameters2();
parameters3.setParameter(parameter3);
// Parameters2 parameters4 = new Parameters2();
// parameters4.setParameter(parameter4);
// Parameters2 parameters5 = new Parameters2();
// parameters5.setParameter(parameter5);
List<Parameters2> parametersList = new ArrayList<>();
// parametersList.add(parameters);
// parametersList.add(parameters2);
parametersList.add(parameters3);
// parametersList.add(parameters4);
// parametersList.add(parameters5);
Component3 component = new Component3();
component.setName("mysql参数环境" + createParamTime());
component.setParameters(parametersList);
ParameterContextsJoin parameterContextsJoin = new ParameterContextsJoin();
parameterContextsJoin.setComponent(component);
parameterContextsJoin.setRevision(revision);
CreateParamContextJoin createParamContextJoin = new CreateParamContextJoin();
createParamContextJoin.setParameterContextsJoin(parameterContextsJoin);
createParamContextJoin.setProcessGroupsId(processGroupsId);
return createParamContextJoin;
}
/**
* 控制器参数-oracle
*/
private FindNeedModifyController setOracleFindNeedModifyController(String processGroupId) {
//创建Mysql数据源
Map<String, String> properties = new HashMap<>();
properties.put("Database Connection URL", "jdbc:oracle:thin:@39.170.109.90:1521:orcl");
properties.put("Database Driver Class Name", "oracle.jdbc.OracleDriver");
properties.put("database-driver-locations", "/data/nifi-1.28.1/lib/ojdbc8.jar");
properties.put("Database User", "U8C241231");
properties.put("Password", "U8C241231");
properties.put("Max Wait Time", "600001 millis");
properties.put("Max Total Connections", "20");
properties.put("Validation-query", "select 1 from dual");
properties.put("dbcp-min-idle-conns", "5");
properties.put("dbcp-max-idle-conns", "10");
properties.put("dbcp-max-conn-lifetime", "-1");
properties.put("dbcp-time-between-eviction-runs", "-1");
properties.put("dbcp-min-evictable-idle-time", "30 mins");
properties.put("dbcp-soft-min-evictable-idle-time", "-1");
Component12 component12 = new Component12();
component12.setName("Oracle数据源");
component12.setType("org.apache.nifi.dbcp.DBCPConnectionPool");
//传这个值并没有用
// component12.setState("ENABLED");
component12.setProperties(properties);
component12.setComments("Oracle数据源备注");
component12.setBulletinLevel("DEBUG");
// component12.setId();//需要修改的控制器id
ControllerService12 controllerService11 = new ControllerService12();
controllerService11.setComponent(component12);
controllerService11.setModifyMarkId("vuBXdbEu7v");
// controllerService11.setId();//需要修改的控制器id
List<ControllerService12> controllerService12List = new ArrayList<>();
controllerService12List.add(controllerService11);
FindNeedModifyController findNeedModifyController = new FindNeedModifyController();
findNeedModifyController.setNeedModifyController(controllerService12List);
findNeedModifyController.setProcessGroupId(processGroupId);
return findNeedModifyController;
}
/**
* 控制器参数-oracle
*/
private FindNeedModifyController setMysqlFindNeedModifyController(String processGroupId) {
//创建Mysql数据源
Map<String, String> properties = new HashMap<>();
properties.put("Database Connection URL", "jdbc:mysql://ufidahz.com.cn:9015/apache_nifi_sync?useSSL=false&serverTimezone=Asia/Shanghai&characterEncoding=utf8&useLegacyDatetimeCode=false");
properties.put("Database Driver Class Name", "com.mysql.cj.jdbc.Driver");
properties.put("database-driver-locations", "/data/nifi-1.28.1/lib/mysql-connector-java-8.0.30.jar");
properties.put("Database User", "root");
properties.put("Password", "hzya1314");
properties.put("Max Wait Time", "600001 millis");
properties.put("Max Total Connections", "15");
properties.put("Validation-query", "select 1");
properties.put("dbcp-min-idle-conns", "5");
properties.put("dbcp-max-idle-conns", "10");
properties.put("dbcp-max-conn-lifetime", "-1");
properties.put("dbcp-time-between-eviction-runs", "-1");
properties.put("dbcp-min-evictable-idle-time", "30 mins");
properties.put("dbcp-soft-min-evictable-idle-time", "-1");
Component12 component12 = new Component12();
component12.setName("Mysql数据源");
component12.setType("org.apache.nifi.dbcp.DBCPConnectionPool");
//传这个值并没有用
// component12.setState("ENABLED");
component12.setProperties(properties);
component12.setComments("Mysql数据源备注");
component12.setBulletinLevel("DEBUG");
// component12.setId();//需要修改的控制器id
ControllerService12 controllerService11 = new ControllerService12();
controllerService11.setComponent(component12);
controllerService11.setModifyMarkId("CZFJwnb9sb");
// controllerService11.setId();//需要修改的控制器id
List<ControllerService12> controllerService12List = new ArrayList<>();
controllerService12List.add(controllerService11);
FindNeedModifyController findNeedModifyController = new FindNeedModifyController();
findNeedModifyController.setNeedModifyController(controllerService12List);
findNeedModifyController.setProcessGroupId(processGroupId);
return findNeedModifyController;
}
/**
* 测试nifi数据同步场景调用
*/
@Test
public void testDbSync() throws Exception {
//新建开始处理器
String parentProcessGroupId = "76e23115-ad84-1aab-7630-21c76aa3973d";
String processGroupsName = "跨数据源同步";
String processGroupsId = testCreateProcessGroups(parentProcessGroupId, processGroupsName);
//新建GenerateFlowFile处理器(最开始的处理器)
String generateFlowFileId = testCreateProcessor(processGroupsId);
//拷贝Oracle应用,并实例化到新建的流程组
// String processGroupId = "41437b87-0196-1000-6951-50e41e75c0da";
// String parentProcessGroupId = "76e23100-ad84-1aab-4447-b9ee936ee7d5";
String oracleSnippetId = testCreateSnippets("41437b87-0196-1000-6951-50e41e75c0da", "76e23100-ad84-1aab-4447-b9ee936ee7d5");
String oracleProcessGroupId = testCreateSnippetInstance(processGroupsId, parentProcessGroupId, oracleSnippetId);
//拷贝Mysql应用并实例化到新建的流程组
// String processGroupId2 = "4143d803-0196-1000-968f-b06f55b43a3f";
// String parentProcessGroupId2 = "76e23100-ad84-1aab-4447-b9ee936ee7d5";
String mysqlSnippetId = testCreateSnippets("4143d803-0196-1000-968f-b06f55b43a3f", "76e23100-ad84-1aab-4447-b9ee936ee7d5");
String mysqlProcessGroupId = testCreateSnippetInstance(processGroupsId, parentProcessGroupId, mysqlSnippetId);
//新建LogAttribute处理器(结束处理器)
// String logAttributeId = testCreateProcessor2();
String logAttributeId = null;
//修改Oracle应用数据源
//修改Oracle应用上下文环境
//修改mysql应用数据源
//修改mysql应用上下文环境
//启动Mysql应用对应的控制器服务
//启动Oracle应用对应的控制器服务
//创建连接关系
//启动处理器
}
/**
* 创建空的流程组
*
* @param parentProcessGroupId 需要新建的目标流程组的父流程组id
* @param name 目标流程组名称
*/
public String testCreateProcessGroups(String parentProcessGroupId, String name) throws Exception {
String processGroupsId = "";
try {
Revision5 revision5 = new Revision5();
revision5.setVersion(0);
Component7 component7 = new Component7();
component7.setName(name);
ProcessGroupsJoin processGroupsJoin = new ProcessGroupsJoin();
processGroupsJoin.setRevision(revision5);
processGroupsJoin.setComponent(component7);
//父处理器组
// String parentGroupId = "76e23115-ad84-1aab-7630-21c76aa3973d";
ProcessgroupsResult processGroups = nifiApiService.createProcessGroups(parentProcessGroupId, processGroupsJoin);
processGroupsId = processGroups.getId();
} catch (Exception e) {
e.printStackTrace();
}
return processGroupsId;
}
/**
* 创建GenerateFlowFile处理器
*/
public String testCreateProcessor(String groupId) {
String processId = null;
try {
Revision15 revision15 = new Revision15();
revision15.setVersion("0");
Component15 component15 = new Component15();
component15.setType("org.apache.nifi.processors.standard.GenerateFlowFile");
component15.setName("定时调度");
// Position15 position15 = new Position15();
// position15.setX("0");
// position15.setY("0");
Config15 config15 = new Config15();
config15.setSchedulingPeriod("1 min");
Properties15 properties15 = new Properties15();
properties15.setFileSize("1KB");
config15.setProperties(properties15);
component15.setConfig(config15);
CreateProcessorJoin15 createProcessorJoin15 = new CreateProcessorJoin15();
createProcessorJoin15.setComponent(component15);
createProcessorJoin15.setRevision(revision15);
// String groupId = "019610d1-f933-1f70-16ea-3cf005012c4b";
CreateProcess16 processor = nifiApiService.createProcessor(groupId, createProcessorJoin15);
processId = processor.getId();
} catch (Exception e) {
e.printStackTrace();
}
return processId;
}
/**
* 为指定流程组创建片段
*
* @param targetCopyProcessGroupId 需要复制的目标流程组id
* @param parentProcessGroupId 目标流程组的父流程组id
*/
public String testCreateSnippets(String targetCopyProcessGroupId, String parentProcessGroupId) {
String snippetId = null;
try {
//查询目标流程组版本
ProcessGroupsInfoResult9 processGroups = nifiApiService.getProcessGroups(targetCopyProcessGroupId);
Revision9 revision = processGroups.getRevision();
Map<String, String> processGroupsMap2 = new HashMap<>();
processGroupsMap2.put("version", revision.getVersion());//目标流程组版本号
Map<String, Map<String, String>> processGroupsMap = new HashMap<>();
processGroupsMap.put(targetCopyProcessGroupId, processGroupsMap2);//目标流程组id
Snippet snippet = new Snippet();
snippet.setParentGroupId(parentProcessGroupId);//目标流程组id的父流程组id
snippet.setProcessGroups(processGroupsMap);
SnippetsJoin snippetsJoin = new SnippetsJoin();
snippetsJoin.setSnippet(snippet);
SnippetResult13 snippets = nifiApiService.createSnippets(snippetsJoin);
Snippet13 snippet1 = snippets.getSnippet();
snippetId = snippet1.getId();
} catch (Exception e) {
e.printStackTrace();
}
return snippetId;
}
/**
* 创建LogAttribute处理器
*/
@Test
public void testCreateProcessor2() throws Exception {
// String processorId = null;
try {
Revision15 revision15 = new Revision15();
revision15.setVersion("0");
Component15 component15 = new Component15();
component15.setType("org.apache.nifi.processors.standard.LogAttribute");
component15.setName("结束节点");
// Position15 position15 = new Position15();
// position15.setX("0");
// position15.setY("0");
Properties15 properties15 = new Properties15();
properties15.setLogLevel("info");
properties15.setLogPayload("false");
properties15.setAttributesToLogRegex(".*");
properties15.setLogFlowFileProperties("true");
properties15.setOutputFormat("Line per Attribute");
properties15.setCharacterSet("UTF-8");
Config15 config15 = new Config15();
config15.setProperties(properties15);
config15.setBulletinLevel("DEBUG");
component15.setConfig(config15);
// component15.setPosition(position15);
//定义连接关系
Relationships15 relationships15 = new Relationships15();
relationships15.setName("success");
relationships15.setAutoTerminate(true);
// relationships15.setRetry(true);
// relationships15.setDescription("123");
List<Relationships15> relationships15List = new ArrayList<>();
relationships15List.add(relationships15);
component15.setRelationships(relationships15List);
CreateProcessorJoin15 createProcessorJoin15 = new CreateProcessorJoin15();
createProcessorJoin15.setComponent(component15);
createProcessorJoin15.setRevision(revision15);
String groupId = "76e23115-ad84-1aab-7630-21c76aa3973d";
CreateProcess16 processor = nifiApiService.createProcessor(groupId, createProcessorJoin15);
// System.out.println("处理器id" + processor.getId());
// processorId = processor.getId();
} catch (Exception e) {
e.printStackTrace();
}
// return processorId;
}
/**
* 将片段实例到指定位置
*
* @param groupId 目标流程组id需要拷贝到哪个流程组
* @param parentGroupId 目标流程组的父流程组id
* @param snippetId 片段id
*/
public String testCreateSnippetInstance(String groupId, String parentGroupId, String snippetId) throws Exception {
String processGroupId = null;
try {
//先请求得到代码片段id
ProcessGroupsInfoResult9 processGroups = nifiApiService.getProcessGroups(groupId);
Revision9 revision = processGroups.getRevision();
Map<String, String> processGroupsMap2 = new HashMap<>();
processGroupsMap2.put("version", revision.getVersion());//目标流程组版本号
Map<String, Map<String, String>> processGroupsMap = new HashMap<>();
processGroupsMap.put(groupId, processGroupsMap2);//目标流程组id
// Snippet snippet = new Snippet();
// snippet.setParentGroupId(parentGroupId);//目标流程组id的父流程组id
// snippet.setProcessGroups(processGroupsMap);
// SnippetsJoin snippetsJoin = new SnippetsJoin();
// snippetsJoin.setSnippet(snippet);
// SnippetResult13 snippets = nifiApiService.createSnippets(snippetsJoin);
// Snippet13 snippet1 = snippets.getSnippet();
// System.out.println(snippet1.getId());
//将片段实例化到指定位置
// String groupId = "019610d1-f933-1f70-16ea-3cf005012c4b";//流程组id
SnippetInstanceJoin snippetInstanceJoin = new SnippetInstanceJoin();
snippetInstanceJoin.setSnippetId(snippetId);
// snippetInstanceJoin.setOriginY("0");
// snippetInstanceJoin.setOriginX("0");
SnippetInstance15 snippetInstance = nifiApiService.createSnippetInstance(groupId, snippetInstanceJoin);
Flow15 flow = snippetInstance.getFlow();
ProcessGroups15 processGroups15 = flow.getProcessGroups().get(0);
// System.out.println(processGroups15.getId());
processGroupId = processGroups15.getId();
} catch (Exception e) {
e.printStackTrace();
}
return processGroupId;
}
}

View File

@ -0,0 +1,58 @@
package com.hzya.frame;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.nifilog.dao.ILoggingEvent20250430Dao;
import com.hzya.frame.nifilog.entity.LoggingEvent20250430Entity;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestNifiLog
* @Date2025/5/20 11:53
* @FilenameTestNifiLog
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {WebappApplication.class})
public class TestNifiLog {
@Autowired
private ILoggingEvent20250430Dao iLoggingEvent20250430Dao;
/**
* 获取nifi token
*/
@Test
public void getAccessToken() {
try {
// PageAttribute<LoggingEvent20250430Entity> loggingEvent20250430EntityPageAttribute = iLoggingEvent20250430Dao.queryPaged();
List<String> arg0List = new ArrayList<>();
arg0List.add("UpdateAttribute[id=ad841aed-30f7-16e2-4fa0-595ab0ab9fdc]");
List<String> logDateList = new ArrayList<>();
logDateList.add("20250519");
logDateList.add("20250520");
LoggingEvent20250430Entity loggingEvent20250430Entity = new LoggingEvent20250430Entity();
loggingEvent20250430Entity.setArg0List(arg0List);
loggingEvent20250430Entity.setLogDateList(logDateList);
loggingEvent20250430Entity.setPageNum(1);
loggingEvent20250430Entity.setPageSize(100);
PageInfo<LoggingEvent20250430Entity> loggingEvent20250430EntityPageInfo = iLoggingEvent20250430Dao.queryLoggingEventByProcessorId(loggingEvent20250430Entity);
List<LoggingEvent20250430Entity> list = loggingEvent20250430EntityPageInfo.getList();
System.out.println(list.size());
} catch (Exception e) {
e.printStackTrace();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
package com.hzya.frame.jolt;
import com.bazaarvoice.jolt.Chainr;
import com.bazaarvoice.jolt.JsonUtils;
import org.junit.Test;
/**
* "cardinality"
*
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestJolt
* @Date2025/6/18 11:19
* @FilenameTestJolt
*/
public class TestJoltCardinality {
private final String jsonFileRootRoute = "/Users/liuyang/workspaces/hzya/fw-nifi/jolt-demo";
/**
* ONE:如果输入值是一个列表则获取该列表中的第一个元素并将其设置为该元素的数据,不支持其他类型
*/
@Test
public void testDemo() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/cardinality/input.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/cardinality/spec.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* 'MANY':如果输入不是列表则创建一个列表并将第一个元素设置为输入值
* 如果输入是"null"使它成为一个空列表如果输入是一个列表不支持
*/
@Test
public void testDemo2() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/cardinality/input2.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/cardinality/spec2.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
}

View File

@ -0,0 +1,58 @@
package com.hzya.frame.jolt;
//import org.flywaydb.core.internal.util.JsonUtils;
//import org.flywaydb.core.internal.util.JsonUtils;
//import org.flywaydb.core.internal.util.JsonUtils;
import com.bazaarvoice.jolt.Chainr;
import com.bazaarvoice.jolt.JsonUtils;
import org.junit.Test;
//import java.util.List;
/**
* jolt框架的default部分测试,
* default是一种为json对象设置默认值的核心操作当目标json中某个字段不存在或字段值为null时
* 用你指定的默认值填充该字段,如果字段已存在且值非 null则不会覆盖原有值
*
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestJolt
* @Date2025/6/18 11:19
* @FilenameTestJolt
*/
public class TestJoltDefault {
private final String jsonFileRootRoute = "/Users/liuyang/workspaces/hzya/fw-nifi/jolt-demo";
/**
* 增加一些指定属性
*/
@Test
public void testDemo() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/default/input.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/default/spec.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* 增加一些指定属性
*/
@Test
public void testDemo2() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/default/input3.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/default/spec3.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
}

View File

@ -0,0 +1,32 @@
package com.hzya.frame.jolt;
import com.bazaarvoice.jolt.Chainr;
import com.bazaarvoice.jolt.JsonUtils;
import org.junit.Test;
/**
* jolt框架的modify部分测试
*
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestJolt
* @Date2025/6/18 11:19
* @FilenameTestJolt
*/
public class TestJoltModify {
private final String jsonFileRootRoute = "/Users/liuyang/workspaces/hzya/fw-nifi/jolt-demo";
@Test
public void testDemo() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/modify/input.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/modify/spec.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
}

View File

@ -0,0 +1,44 @@
package com.hzya.frame.jolt;
import com.bazaarvoice.jolt.Chainr;
import com.bazaarvoice.jolt.JsonUtils;
import org.junit.Test;
/**
* "remove" 是一种用于从输入 JSON 中删除指定字段或元素的核心转换操作
*
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestJolt
* @Date2025/6/18 11:19
* @FilenameTestJolt
*/
public class TestJoltRemove {
private final String jsonFileRootRoute = "/Users/liuyang/workspaces/hzya/fw-nifi/jolt-demo";
@Test
public void testDemo() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/remove/input.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/remove/spec.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
@Test
public void testDemo2() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/remove/input3.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/remove/spec3.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
}

View File

@ -0,0 +1,218 @@
package com.hzya.frame.jolt;
//import org.flywaydb.core.internal.util.JsonUtils;
//import org.flywaydb.core.internal.util.JsonUtils;
//import org.flywaydb.core.internal.util.JsonUtils;
import com.bazaarvoice.jolt.Chainr;
import com.bazaarvoice.jolt.JsonUtils;
//import org.flywaydb.core.internal.util.JsonUtils;
import org.junit.Test;
//import java.util.List;
/**
* jolt框架的shift部分测试,Shiftr的基本操作是复制输入JSON的value
*
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestJolt
* @Date2025/6/18 11:19
* @FilenameTestJolt
*/
public class TestJoltShift {
private final String jsonFileRootRoute = "/Users/liuyang/workspaces/hzya/fw-nifi/jolt-demo";
@Test
public void testDemo() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* 字段映射符
*/
@Test
public void testDemo2() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input2.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec2.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* *通配符
*/
@Test
public void testDemo3() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input3.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec3.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
@Test
public void testDemo4() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input4.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec4.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* &通配符
*/
@Test
public void testDemo5() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input5.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec5.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* $通配符
*/
@Test
public void testDemo6() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input6.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec6.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* #通配符在右边
*/
@Test
public void testDemo7() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input7.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec7.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* #通配符在左边
*/
@Test
public void testDemo8() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input8.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec8.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* | 通配符在左边
*/
@Test
public void testDemo9() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input9.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec9.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* @通配符在左边
*/
@Test
public void testDemo10() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input10.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec10.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* @通配符在右边
*/
@Test
public void testDemo11() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input11.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec11.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* 处理输入中的json数组
*/
@Test
public void testDemo12() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input12.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec12.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* 处理输出的json数组
*/
@Test
public void testDemo13() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input13.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec13.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* 同一个输入源可以输出到多个目标输出处
*/
@Test
public void testDemo14() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input14.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec14.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
/**
* 隐式数组
*/
@Test
public void testDemo15() {
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/input15.json");
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/shift/spec15.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
}

View File

@ -0,0 +1,35 @@
package com.hzya.frame.jolt;
import com.bazaarvoice.jolt.Chainr;
import com.bazaarvoice.jolt.JsonUtils;
import org.junit.Test;
/**
* "Sort"排序场景
*
* @Authorliuyang
* @Packagecom.hzya.frame
* @Projectfw-nifi
* @nameTestJolt
* @Date2025/6/18 11:19
* @FilenameTestJolt
*/
public class TestJoltSort {
private final String jsonFileRootRoute = "/Users/liuyang/workspaces/hzya/fw-nifi/jolt-demo";
/**
* 默认按字母升序排列A Z排序后键顺序为a b d r
*/
@Test
public void testDemo() {
//输入json
Object input = JsonUtils.filepathToObject(jsonFileRootRoute + "/sort/input.json");
//spec
Object spec = JsonUtils.filepathToObject(jsonFileRootRoute + "/sort/spec.json");
Chainr chainr = Chainr.fromSpec(spec);
Object transform = chainr.transform(input);
System.out.println(JsonUtils.toJsonString(transform));
}
}

View File

@ -22,11 +22,4 @@ public interface ISysDictionaryshopNewService {
* @return * @return
*/ */
SysDictionaryshopNew getDictionaryshopByValue(String tabName, String columnName, String columnValue); SysDictionaryshopNew getDictionaryshopByValue(String tabName, String columnName, String columnValue);
/**
* 查询列表
* @param object
* @return
*/
JsonResultEntity queryDictionaryList(JSONObject object);
} }

View File

@ -1,6 +1,5 @@
package com.hzya.frame.sys.dictionaryshopNew.service.impl; package com.hzya.frame.sys.dictionaryshopNew.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.web.entity.BaseResult; import com.hzya.frame.web.entity.BaseResult;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.hzya.frame.serviceUtil.ServiceUtil; import com.hzya.frame.serviceUtil.ServiceUtil;
@ -12,7 +11,7 @@ import org.slf4j.LoggerFactory;
import com.hzya.frame.web.entity.JsonResultEntity; import com.hzya.frame.web.entity.JsonResultEntity;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
@ -50,17 +49,4 @@ public class SysDictionaryshopNewServiceImpl extends ServiceUtil implements ISy
sysDictionaryshopNew.setColumnValue(columnValue); sysDictionaryshopNew.setColumnValue(columnValue);
return sysdictionaryshopnewMapper.entity_get_by_value(sysDictionaryshopNew); return sysdictionaryshopnewMapper.entity_get_by_value(sysDictionaryshopNew);
} }
/**
* 查询列表
*
* @param object
* @return
*/
@Override
public JsonResultEntity queryDictionaryList(JSONObject object) {
SysDictionaryshopNew dictionary = getData("jsonStr", object, SysDictionaryshopNew.class);
List<SysDictionaryshopNew> dictionaryList = sysdictionaryshopnewMapper.entity_list_base(dictionary);
return BaseResult.getSuccessMessageEntity("查询列表成功", dictionaryList);
}
} }

View File

@ -10,12 +10,6 @@ import com.hzya.frame.web.entity.BaseEntity;
*/ */
public class SysFlowStepAccountEntity extends BaseEntity { public class SysFlowStepAccountEntity extends BaseEntity {
//流程id
private String flowId;
//流程步骤id
private String stepId;
//应用id
private String appId;
/** 账户名称 */ /** 账户名称 */
private String name; private String name;
/** ip地址 */ /** ip地址 */
@ -128,28 +122,5 @@ public class SysFlowStepAccountEntity extends BaseEntity {
this.agentid = agentid; this.agentid = agentid;
} }
public String getFlowId() {
return flowId;
}
public void setFlowId(String flowId) {
this.flowId = flowId;
}
public String getStepId() {
return stepId;
}
public void setStepId(String stepId) {
this.stepId = stepId;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
} }

View File

@ -15,9 +15,6 @@
<result property="dbName" column="db_name" jdbcType="VARCHAR"/> <result property="dbName" column="db_name" jdbcType="VARCHAR"/>
<result property="userName" column="user_name" jdbcType="VARCHAR"/> <result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="password" column="password" jdbcType="VARCHAR"/> <result property="password" column="password" jdbcType="VARCHAR"/>
<result property="flowId" column="flow_id" jdbcType="VARCHAR"/>
<result property="stepId" column="step_id" jdbcType="VARCHAR"/>
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
<result property="dbType" column="db_type" jdbcType="VARCHAR"/> <result property="dbType" column="db_type" jdbcType="VARCHAR"/>
<result property="appKey" column="app_key" jdbcType="VARCHAR"/> <result property="appKey" column="app_key" jdbcType="VARCHAR"/>
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/> <result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
@ -38,9 +35,6 @@
,db_name ,db_name
,user_name ,user_name
,password ,password
,flow_id
,step_id
,app_id
,db_type ,db_type
,app_key ,app_key
,app_secret ,app_secret
@ -65,9 +59,6 @@
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if> <if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="userName != null and userName != ''"> and user_name = #{userName} </if> <if test="userName != null and userName != ''"> and user_name = #{userName} </if>
<if test="password != null and password != ''"> and password = #{password} </if> <if test="password != null and password != ''"> and password = #{password} </if>
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId} </if>
<if test="stepId != null and stepId != ''"> and step_id = #{stepId} </if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if> <if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if> <if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if> <if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
@ -95,9 +86,6 @@
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if> <if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="userName != null and userName != ''"> and user_name = #{userName} </if> <if test="userName != null and userName != ''"> and user_name = #{userName} </if>
<if test="password != null and password != ''"> and password = #{password} </if> <if test="password != null and password != ''"> and password = #{password} </if>
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId} </if>
<if test="stepId != null and stepId != ''"> and step_id = #{stepId} </if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if> <if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if> <if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if> <if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
@ -127,9 +115,6 @@
<if test="dbName != null and dbName != ''"> and db_name like concat('%',#{dbName},'%') </if> <if test="dbName != null and dbName != ''"> and db_name like concat('%',#{dbName},'%') </if>
<if test="userName != null and userName != ''"> and user_name like concat('%',#{userName},'%') </if> <if test="userName != null and userName != ''"> and user_name like concat('%',#{userName},'%') </if>
<if test="password != null and password != ''"> and password like concat('%',#{password},'%') </if> <if test="password != null and password != ''"> and password like concat('%',#{password},'%') </if>
<if test="flowId != null and flowId != ''"> and flow_id like concat('%',#{flowId},'%') </if>
<if test="stepId != null and stepId != ''"> and step_id like concat('%',#{stepId},'%') </if>
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
<if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if> <if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if>
<if test="appKey != null and appKey != ''"> and app_key like concat('%',#{appKey},'%') </if> <if test="appKey != null and appKey != ''"> and app_key like concat('%',#{appKey},'%') </if>
<if test="appSecret != null and appSecret != ''"> and app_secret like concat('%',#{appSecret},'%') </if> <if test="appSecret != null and appSecret != ''"> and app_secret like concat('%',#{appSecret},'%') </if>
@ -159,9 +144,6 @@
<if test="dbName != null and dbName != ''"> or db_name = #{dbName} </if> <if test="dbName != null and dbName != ''"> or db_name = #{dbName} </if>
<if test="userName != null and userName != ''"> or user_name = #{userName} </if> <if test="userName != null and userName != ''"> or user_name = #{userName} </if>
<if test="password != null and password != ''"> or password = #{password} </if> <if test="password != null and password != ''"> or password = #{password} </if>
<if test="flowId != null and flowId != ''"> or flow_id = #{flowId} </if>
<if test="stepId != null and stepId != ''"> or step_id = #{stepId} </if>
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
<if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if> <if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if>
<if test="appKey != null and appKey != ''"> or app_key = #{appKey} </if> <if test="appKey != null and appKey != ''"> or app_key = #{appKey} </if>
<if test="appSecret != null and appSecret != ''"> or app_secret = #{appSecret} </if> <if test="appSecret != null and appSecret != ''"> or app_secret = #{appSecret} </if>
@ -189,9 +171,6 @@
<if test="dbName != null and dbName != ''"> db_name , </if> <if test="dbName != null and dbName != ''"> db_name , </if>
<if test="userName != null and userName != ''"> user_name , </if> <if test="userName != null and userName != ''"> user_name , </if>
<if test="password != null and password != ''"> password , </if> <if test="password != null and password != ''"> password , </if>
<if test="flowId != null and flowId != ''"> flow_id , </if>
<if test="stepId != null and stepId != ''"> step_id , </if>
<if test="appId != null and appId != ''"> app_id , </if>
<if test="dbType != null and dbType != ''"> db_type , </if> <if test="dbType != null and dbType != ''"> db_type , </if>
<if test="appKey != null and appKey != ''"> app_key , </if> <if test="appKey != null and appKey != ''"> app_key , </if>
<if test="appSecret != null and appSecret != ''"> app_secret , </if> <if test="appSecret != null and appSecret != ''"> app_secret , </if>
@ -214,9 +193,6 @@
<if test="dbName != null and dbName != ''"> #{dbName} ,</if> <if test="dbName != null and dbName != ''"> #{dbName} ,</if>
<if test="userName != null and userName != ''"> #{userName} ,</if> <if test="userName != null and userName != ''"> #{userName} ,</if>
<if test="password != null and password != ''"> #{password} ,</if> <if test="password != null and password != ''"> #{password} ,</if>
<if test="flowId != null and flowId != ''"> #{flowId} ,</if>
<if test="stepId != null and stepId != ''"> #{stepId} ,</if>
<if test="appId != null and appId != ''"> #{appId} ,</if>
<if test="dbType != null and dbType != ''"> #{dbType} ,</if> <if test="dbType != null and dbType != ''"> #{dbType} ,</if>
<if test="appKey != null and appKey != ''"> #{appKey} ,</if> <if test="appKey != null and appKey != ''"> #{appKey} ,</if>
<if test="appSecret != null and appSecret != ''"> #{appSecret} ,</if> <if test="appSecret != null and appSecret != ''"> #{appSecret} ,</if>
@ -229,18 +205,18 @@
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password,flow_id,step_id,app_id, db_type, app_key, app_secret, corpId, agentId, sts) insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password, db_type, app_key, app_secret, corpId, agentId, sts)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.flowId},#{entity.stepId},#{entity.appId},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid}, 'Y') (#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid}, 'Y')
</foreach> </foreach>
</insert> </insert>
<!-- 批量新增或者修改--> <!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password,flow_id,step_id,app_id, db_type, app_key, app_secret, corpId, agentId) insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password, db_type, app_key, app_secret, corpId, agentId)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.flowId},#{entity.stepId},#{entity.appId},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid}) (#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid})
</foreach> </foreach>
on duplicate key update on duplicate key update
create_user_id = values(create_user_id), create_user_id = values(create_user_id),
@ -254,9 +230,6 @@
db_name = values(db_name), db_name = values(db_name),
user_name = values(user_name), user_name = values(user_name),
password = values(password), password = values(password),
flow_id = values(flow_id),
step_id = values(step_id),
app_id = values(app_id),
db_type = values(db_type), db_type = values(db_type),
app_key = values(app_key), app_key = values(app_key),
app_secret = values(app_secret), app_secret = values(app_secret),
@ -277,9 +250,6 @@ update sys_flow_step_account set
<if test="dbName != null and dbName != ''"> db_name = #{dbName},</if> <if test="dbName != null and dbName != ''"> db_name = #{dbName},</if>
<if test="userName != null and userName != ''"> user_name = #{userName},</if> <if test="userName != null and userName != ''"> user_name = #{userName},</if>
<if test="password != null and password != ''"> password = #{password},</if> <if test="password != null and password != ''"> password = #{password},</if>
<if test="flowId != null and flowId != ''"> flow_id = #{flowId},</if>
<if test="stepId != null and stepId != ''"> step_id = #{stepId},</if>
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
<if test="dbType != null and dbType != ''"> db_type = #{dbType},</if> <if test="dbType != null and dbType != ''"> db_type = #{dbType},</if>
<if test="appKey != null and appKey != ''"> app_key = #{appKey},</if> <if test="appKey != null and appKey != ''"> app_key = #{appKey},</if>
<if test="appSecret != null and appSecret != ''"> app_secret = #{appSecret},</if> <if test="appSecret != null and appSecret != ''"> app_secret = #{appSecret},</if>
@ -305,9 +275,6 @@ update sys_flow_step_account set sts= 'N' ,modify_time = #{modify_time},modify_
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if> <if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="userName != null and userName != ''"> and user_name = #{userName} </if> <if test="userName != null and userName != ''"> and user_name = #{userName} </if>
<if test="password != null and password != ''"> and password = #{password} </if> <if test="password != null and password != ''"> and password = #{password} </if>
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId} </if>
<if test="stepId != null and stepId != ''"> and step_id = #{stepId} </if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if> <if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if> <if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if> <if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>

View File

@ -35,8 +35,6 @@ public class SysFlowStepConfigEntity extends BaseEntity {
/** 动态sql语句 */ /** 动态sql语句 */
private String sqlStatement; private String sqlStatement;
//步骤账户表id
private String stepAccountId;
public String getFlowId() { public String getFlowId() {
return flowId; return flowId;
@ -134,12 +132,5 @@ public class SysFlowStepConfigEntity extends BaseEntity {
this.sqlStatement = sqlStatement; this.sqlStatement = sqlStatement;
} }
public String getStepAccountId() {
return stepAccountId;
}
public void setStepAccountId(String stepAccountId) {
this.stepAccountId = stepAccountId;
}
} }

View File

@ -32,10 +32,8 @@ public class SysFlowStepEntity extends BaseEntity {
private String nifiApiId; private String nifiApiId;
/** nifi应用排序模式;先进先出/先进后出 */ /** nifi应用排序模式;先进先出/先进后出 */
private String sortMode; private String sortMode;
//定时任务 corn表达式
private String taskCorn;
//账户对象
private SysFlowStepAccountEntity account;
public Integer getStep() { public Integer getStep() {
return step; return step;
} }
@ -123,21 +121,5 @@ public class SysFlowStepEntity extends BaseEntity {
public void setFlowId(String flowId) { public void setFlowId(String flowId) {
this.flowId = flowId; this.flowId = flowId;
} }
public SysFlowStepAccountEntity getAccount() {
return account;
}
public void setAccount(SysFlowStepAccountEntity account) {
this.account = account;
}
public String getTaskCorn() {
return taskCorn;
}
public void setTaskCorn(String taskCorn) {
this.taskCorn = taskCorn;
}
} }

View File

@ -17,31 +17,29 @@
<result property="actionType" column="action_type" jdbcType="VARCHAR"/> <result property="actionType" column="action_type" jdbcType="VARCHAR"/>
<result property="appId" column="app_id" jdbcType="VARCHAR"/> <result property="appId" column="app_id" jdbcType="VARCHAR"/>
<result property="apiId" column="api_id" jdbcType="VARCHAR"/> <result property="apiId" column="api_id" jdbcType="VARCHAR"/>
<result property="taskCorn" column="task_corn" jdbcType="VARCHAR"/>
<result property="nifiAppId" column="nifi_app_id" jdbcType="VARCHAR"/> <result property="nifiAppId" column="nifi_app_id" jdbcType="VARCHAR"/>
<result property="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/> <result property="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/>
<result property="sortMode" column="sort_mode" jdbcType="VARCHAR"/> <result property="sortMode" column="sort_mode" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id="SysFlowStepEntity_Base_Column_List"> <sql id="SysFlowStepEntity_Base_Column_List">
id, id
create_user_id, ,create_user_id
create_time, ,create_time
modify_user_id, ,modify_user_id
modify_time, ,modify_time
sts, ,sts
step, ,step
step_type, ,step_type
flowId, ,flowId
description, ,description
api_name, ,api_name
action_type, ,action_type
app_id, ,app_id
api_id, ,api_id
taskCorn, ,nifi_app_id
nifi_app_id, ,nifi_api_id
nifi_api_id, ,sort_mode
sort_mode
</sql> </sql>
<!-- 查询 采用==查询 --> <!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-SysFlowStepEntity-result" <select id="entity_list_base" resultMap="get-SysFlowStepEntity-result"
@ -184,7 +182,6 @@
<if test="actionType != null and actionType != ''">action_type ,</if> <if test="actionType != null and actionType != ''">action_type ,</if>
<if test="appId != null and appId != ''">app_id ,</if> <if test="appId != null and appId != ''">app_id ,</if>
<if test="apiId != null and apiId != ''">api_id ,</if> <if test="apiId != null and apiId != ''">api_id ,</if>
<if test="taskCorn != null and taskCorn != ''">task_corn ,</if>
<if test="nifiAppId != null and nifiAppId != ''">nifi_app_id ,</if> <if test="nifiAppId != null and nifiAppId != ''">nifi_app_id ,</if>
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id ,</if> <if test="nifiApiId != null and nifiApiId != ''">nifi_api_id ,</if>
<if test="sortMode != null and sortMode != ''">sort_mode ,</if> <if test="sortMode != null and sortMode != ''">sort_mode ,</if>
@ -207,7 +204,6 @@
<if test="actionType != null and actionType != ''">#{actionType} ,</if> <if test="actionType != null and actionType != ''">#{actionType} ,</if>
<if test="appId != null and appId != ''">#{appId} ,</if> <if test="appId != null and appId != ''">#{appId} ,</if>
<if test="apiId != null and apiId != ''">#{apiId} ,</if> <if test="apiId != null and apiId != ''">#{apiId} ,</if>
<if test="taskCorn != null and taskCorn != ''">#{taskCorn} ,</if>
<if test="nifiAppId != null and nifiAppId != ''">#{nifiAppId} ,</if> <if test="nifiAppId != null and nifiAppId != ''">#{nifiAppId} ,</if>
<if test="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</if> <if test="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</if>
<if test="sortMode != null and sortMode != ''">#{sortMode} ,</if> <if test="sortMode != null and sortMode != ''">#{sortMode} ,</if>
@ -271,7 +267,6 @@
<if test="actionType != null and actionType != ''">action_type = #{actionType},</if> <if test="actionType != null and actionType != ''">action_type = #{actionType},</if>
<if test="appId != null and appId != ''">app_id = #{appId},</if> <if test="appId != null and appId != ''">app_id = #{appId},</if>
<if test="apiId != null and apiId != ''">api_id = #{apiId},</if> <if test="apiId != null and apiId != ''">api_id = #{apiId},</if>
<if test="taskCorn != null and taskCorn != ''">task_corn = #{taskCorn},</if>
<if test="nifiAppId != null and nifiAppId != ''">nifi_app_id = #{nifiAppId},</if> <if test="nifiAppId != null and nifiAppId != ''">nifi_app_id = #{nifiAppId},</if>
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id = #{nifiApiId},</if> <if test="nifiApiId != null and nifiApiId != ''">nifi_api_id = #{nifiApiId},</if>
<if test="sortMode != null and sortMode != ''">sort_mode = #{sortMode},</if> <if test="sortMode != null and sortMode != ''">sort_mode = #{sortMode},</if>
@ -300,7 +295,6 @@
<if test="actionType != null and actionType != ''">and action_type = #{actionType}</if> <if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
<if test="appId != null and appId != ''">and app_id = #{appId}</if> <if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="apiId != null and apiId != ''">and api_id = #{apiId}</if> <if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
<if test="taskCorn != null and taskCorn != ''">and task_corn = #{taskCorn}</if>
<if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id = #{nifiAppId}</if> <if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id = #{nifiAppId}</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if> <if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
<if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if> <if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>

View File

@ -1,10 +1,7 @@
package com.hzya.frame.sys.flow.service; package com.hzya.frame.sys.flow.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity; import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
import com.hzya.frame.basedao.service.IBaseService; import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.web.entity.JsonResultEntity;
/** /**
* 流程步骤账户表(SysFlowStepAccount)表服务接口 * 流程步骤账户表(SysFlowStepAccount)表服务接口
* *
@ -12,53 +9,4 @@ import com.hzya.frame.web.entity.JsonResultEntity;
* @since 2025-04-29 10:16:28 * @since 2025-04-29 10:16:28
*/ */
public interface ISysFlowStepAccountService extends IBaseService<SysFlowStepAccountEntity, String>{ public interface ISysFlowStepAccountService extends IBaseService<SysFlowStepAccountEntity, String>{
/**
* 保存账户信息
* @param object
* @return
*/
JsonResultEntity saveAccount(JSONObject object);
/**
* 更新账户信息
* @param object
* @return
*/
JsonResultEntity updateAccount(JSONObject object);
/**
* 删除账户信息
* @param object
* @return
*/
JsonResultEntity deleteAccount(JSONObject object);
/**
* 查询账户详情
* @param object
* @return
*/
JsonResultEntity getAccount(JSONObject object);
/**
* 查询账户列表数据
* @param object
* @return
*/
JsonResultEntity queryAccountList(JSONObject object);
/**
* 查询账户分页数据
* @param object
* @return
*/
JsonResultEntity queryAccountPaged(JSONObject object);
/**
* 验证数据库账户
* @param object
* @return
*/
JsonResultEntity verifyDataBase(JSONObject object);
} }

View File

@ -1,10 +1,7 @@
package com.hzya.frame.sys.flow.service; package com.hzya.frame.sys.flow.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity; import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
import com.hzya.frame.basedao.service.IBaseService; import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.web.entity.JsonResultEntity;
/** /**
* 映射信息主表(SysFlowStepConfig)表服务接口 * 映射信息主表(SysFlowStepConfig)表服务接口
* *
@ -12,11 +9,4 @@ import com.hzya.frame.web.entity.JsonResultEntity;
* @since 2025-04-29 10:16:28 * @since 2025-04-29 10:16:28
*/ */
public interface ISysFlowStepConfigService extends IBaseService<SysFlowStepConfigEntity, String>{ public interface ISysFlowStepConfigService extends IBaseService<SysFlowStepConfigEntity, String>{
/**
* 测试sql
* @param object
* @return
*/
JsonResultEntity testSql(JSONObject object);
} }

View File

@ -1,10 +1,7 @@
package com.hzya.frame.sys.flow.service; package com.hzya.frame.sys.flow.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity; import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
import com.hzya.frame.basedao.service.IBaseService; import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.web.entity.JsonResultEntity;
/** /**
* 流程步骤信息(SysFlowStep)表服务接口 * 流程步骤信息(SysFlowStep)表服务接口
* *
@ -12,39 +9,4 @@ import com.hzya.frame.web.entity.JsonResultEntity;
* @since 2025-04-29 10:16:27 * @since 2025-04-29 10:16:27
*/ */
public interface ISysFlowStepService extends IBaseService<SysFlowStepEntity, String>{ public interface ISysFlowStepService extends IBaseService<SysFlowStepEntity, String>{
/**
* 保存流程步骤
* @param object
* @return
*/
JsonResultEntity saveFlowStep(JSONObject object);
/**
* 更新流程步骤
* @param object
* @return
*/
JsonResultEntity updateFlowStep(JSONObject object);
/**
* 删除流程步骤
* @param object
* @return
*/
JsonResultEntity deleteFlowStep(JSONObject object);
/**
* 查询列表
* @param object
* @return
*/
JsonResultEntity queryList(JSONObject object);
/**
* 步骤详情
* @param object
* @return
*/
JsonResultEntity getFlowStep(JSONObject object);
} }

View File

@ -53,7 +53,7 @@ public class SysFlowServiceImpl extends BaseService<SysFlowEntity, String> imple
return BaseResult.getFailureMessageEntity(e.getMessage()); return BaseResult.getFailureMessageEntity(e.getMessage());
} }
sysFlowDao.save(flowEntity); sysFlowDao.save(flowEntity);
return BaseResult.getSuccessMessageEntity("保存成功",flowEntity); return BaseResult.getSuccessMessageEntity("保存成功");
} }
/** /**

View File

@ -1,30 +1,12 @@
package com.hzya.frame.sys.flow.service.impl; package com.hzya.frame.sys.flow.service.impl;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.datasource.DataSourceUtilProperties;
import com.hzya.frame.serviceUtil.DsDataSourceUtil;
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity; import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
import com.hzya.frame.sys.flow.dao.ISysFlowStepAccountDao; import com.hzya.frame.sys.flow.dao.ISysFlowStepAccountDao;
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService; import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity;
import com.hzya.frame.sysnew.application.database.service.ISysApplicationDatabaseService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import com.hzya.frame.web.exception.BaseSystemException;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService; import com.hzya.frame.basedao.service.impl.BaseService;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.List;
/** /**
* 流程步骤账户表(SysFlowStepAccount)表服务实现类 * 流程步骤账户表(SysFlowStepAccount)表服务实现类
* *
@ -35,250 +17,10 @@ import java.util.List;
public class SysFlowStepAccountServiceImpl extends BaseService<SysFlowStepAccountEntity, String> implements ISysFlowStepAccountService { public class SysFlowStepAccountServiceImpl extends BaseService<SysFlowStepAccountEntity, String> implements ISysFlowStepAccountService {
private ISysFlowStepAccountDao sysFlowStepAccountDao; private ISysFlowStepAccountDao sysFlowStepAccountDao;
@Resource
private DsDataSourceUtil dsDataSourceUtil;
@Autowired
private ISysApplicationDatabaseService sysApplicationDatabaseService;
@Autowired @Autowired
public void setSysFlowStepAccountDao(ISysFlowStepAccountDao dao) { public void setSysFlowStepAccountDao(ISysFlowStepAccountDao dao) {
this.sysFlowStepAccountDao = dao; this.sysFlowStepAccountDao = dao;
this.dao = dao; this.dao = dao;
} }
/**
* 保存账户信息
*
* @param object
* @return
*/
@Override
public JsonResultEntity saveAccount(JSONObject object) {
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
try {
checkParam(entity, "save");
//控制一下名字不能重复
List<SysFlowStepAccountEntity> queryList = queryByName(entity);
if (CollectionUtils.isNotEmpty(queryList) && queryList.size() > 0) {
return BaseResult.getFailureMessageEntity(entity.getName() + "重复");
}
sysFlowStepAccountDao.save(entity);
//保存数据源表测试sql的时候要用动态数据源动态数据源是从sys_application_database表查数据的
saveOrDataBase(entity);
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
return BaseResult.getSuccessMessageEntity("新增成功");
}
/**
* 保存数据源表测试sql的时候要用动态数据源动态数据源是从sys_application_database表查数据的
*
* @param entity
*/
private void saveOrDataBase(SysFlowStepAccountEntity entity) throws Exception {
Assert.notNull(entity, "参数不能为空");
Assert.notEmpty(entity.getName(), "账户名称不能为空");
SysApplicationDatabaseEntity db = new SysApplicationDatabaseEntity();
db.setSourceCode(entity.getName() + "_flow");
List<SysApplicationDatabaseEntity> queryList = sysApplicationDatabaseService.query(db);
if (CollectionUtils.isNotEmpty(queryList)) {
for (SysApplicationDatabaseEntity sys : queryList) {
sysApplicationDatabaseService.logicRemove(sys);
}
}
SysApplicationDatabaseEntity databaseEntity = new SysApplicationDatabaseEntity();
databaseEntity.setAppId(entity.getAppId());
databaseEntity.setSourceCode(entity.getName() + "_flow");
databaseEntity.setSourceName(entity.getName());
databaseEntity.setSourceType(entity.getDbType());
databaseEntity.setSourceIp(entity.getIpAddress());
databaseEntity.setSourcePort(entity.getPort());
databaseEntity.setLoginName(entity.getUserName());
databaseEntity.setPassword(entity.getPassword());
databaseEntity.setDbName(entity.getDbName());
databaseEntity.setDbStatus("1");
sysApplicationDatabaseService.save(databaseEntity);
}
/**
* 更新账户信息
*
* @param object
* @return
*/
@Override
public JsonResultEntity updateAccount(JSONObject object) {
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
try {
checkParam(entity, "update");
//检查一下名字不能重复
List<SysFlowStepAccountEntity> queryList = queryByName(entity);
if (CollectionUtils.isNotEmpty(queryList) && queryList.size() > 0) {
for (SysFlowStepAccountEntity acc : queryList) {
if (!acc.getId().equals(entity.getId())) {
return BaseResult.getFailureMessageEntity(entity.getName() + "重复");
}
}
}
sysFlowStepAccountDao.update(entity);
//保存数据源表测试sql的时候要用动态数据源动态数据源是从sys_application_database表查数据的
saveOrDataBase(entity);
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
return BaseResult.getSuccessMessageEntity("更新成功");
}
/**
* 删除账户信息
*
* @param object
* @return
*/
@Override
public JsonResultEntity deleteAccount(JSONObject object) {
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
try {
checkParam(entity, "delete");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
sysFlowStepAccountDao.logicRemove(entity);
return BaseResult.getSuccessMessageEntity("删除成功");
}
/**
* 查询账户详情
*
* @param object
* @return
*/
@Override
public JsonResultEntity getAccount(JSONObject object) {
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
try {
checkParam(entity, "get");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
SysFlowStepAccountEntity SysFlowStepAccountEntity = sysFlowStepAccountDao.get(entity.getId());
return BaseResult.getSuccessMessageEntity("查询账户详情成功", SysFlowStepAccountEntity);
}
/**
* 查询账户列表数据
*
* @param object
* @return
*/
@Override
public JsonResultEntity queryAccountList(JSONObject object) {
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
try {
checkParam(entity, "queryList");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
List<SysFlowStepAccountEntity> queryList = sysFlowStepAccountDao.query(entity);
return BaseResult.getSuccessMessageEntity("查询列表成功", queryList);
}
/**
* 查询账户分页数据
*
* @param object
* @return
*/
@Override
public JsonResultEntity queryAccountPaged(JSONObject object) {
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
try {
checkParam(entity, "queryPaged");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
return null;
}
//根据账户名称查询
private List<SysFlowStepAccountEntity> queryByName(SysFlowStepAccountEntity entity) {
if (StrUtil.isNotEmpty(entity.getName())) {
SysFlowStepAccountEntity account = new SysFlowStepAccountEntity();
account.setName(entity.getName());
List<SysFlowStepAccountEntity> queryList = sysFlowStepAccountDao.query(account);
return queryList;
}
return null;
}
/**
* 验证账户
*
* @param object
* @return
*/
@Override
public JsonResultEntity verifyDataBase(JSONObject object) {
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
try {
checkParam(entity, "verify");
String dbType = entity.getDbType();
String driveClass = "";
StringBuffer sourceUrl = new StringBuffer();
if (StrUtil.isNotEmpty(dbType)) {
if ("mysql".equals(dbType)) {
driveClass = DataSourceUtilProperties.MYSQLDRIVER_6;
sourceUrl.append("jdbc:mysql://").append(entity.getIpAddress()).append(":").append(entity.getPort()).append("/").append(entity.getDbName()).append("?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true");
} else if ("oracle".equals(dbType)) {
driveClass = DataSourceUtilProperties.ORACLEDRIVER;
sourceUrl.append("jdbc:oracle:thin:@").append(entity.getIpAddress()).append(":").append(entity.getPort()).append(":").append(entity.getDbName());
} else if ("sqlserver2000".equals(dbType)) {
driveClass = DataSourceUtilProperties.SQL2000DRIVER;
sourceUrl.append("jdbc:sqlserver://").append(entity.getIpAddress()).append(":").append(entity.getPort()).append(";DatabaseName=").append(entity.getDbName()).append(";encrypt=false;trustServerCertificate=true");
} else if ("sqlserver2005".equals(dbType)) {
driveClass = DataSourceUtilProperties.SQL2005DRIVER;
sourceUrl.append("jdbc:sqlserver://").append(entity.getIpAddress()).append(":").append(entity.getPort()).append(";DatabaseName=").append(entity.getDbName()).append(";encrypt=false;trustServerCertificate=true");
}
//测试连接
Class.forName(driveClass);
Connection connection = DriverManager.getConnection(sourceUrl.toString(), entity.getUserName(), entity.getPassword());// 相当于连接数据库
if (null != connection) {
return BaseResult.getSuccessMessageEntity("验证成功");
} else {
return BaseResult.getFailureMessageEntity("验证失败");
}
}
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
return null;
}
//数据检查
private void checkParam(SysFlowStepAccountEntity entity, String type) {
Assert.notNull(entity, "参数不能为空");
if ("save".equals(type)) {
Assert.notEmpty(entity.getFlowId(), "flowId不能为空");
Assert.notEmpty(entity.getAppId(), "appId不能为空");
Assert.notEmpty(entity.getName(), "账户名称不能为空");
} else if ("update".equals(type)) {
Assert.notEmpty(entity.getId(), "id不能为空");
} else if ("delete".equals(type)) {
Assert.notEmpty(entity.getId(), "id不能为空");
} else if ("get".equals(type)) {
Assert.notEmpty(entity.getId(), "id不能为空");
} else if ("queryList".equals(type)) {
Assert.notEmpty(entity.getFlowId(), "flowId不能为空");
Assert.notEmpty(entity.getStepId(), "stepId不能为空");
Assert.notEmpty(entity.getAppId(), "appId不能为空");
} else if ("queryPaged".equals(type)) {
Assert.notNull(entity.getPageNum(), "pageNum不能为空");
Assert.notNull(entity.getPageSize(), "pageSize不能为空");
} else if ("verify".equals(type)) {
}
}
} }

View File

@ -1,27 +1,12 @@
package com.hzya.frame.sys.flow.service.impl; package com.hzya.frame.sys.flow.service.impl;
import cn.hutool.core.lang.Assert;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity; import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
import com.hzya.frame.sys.flow.dao.ISysFlowStepConfigDao; import com.hzya.frame.sys.flow.dao.ISysFlowStepConfigDao;
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
import com.hzya.frame.sys.flow.service.ISysFlowStepConfigService; import com.hzya.frame.sys.flow.service.ISysFlowStepConfigService;
import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity;
import com.hzya.frame.sysnew.application.database.service.ISysApplicationDatabaseService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import com.hzya.frame.web.exception.BaseSystemException;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService; import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/** /**
* 映射信息主表(SysFlowStepConfig)表服务实现类 * 映射信息主表(SysFlowStepConfig)表服务实现类
* *
@ -31,52 +16,11 @@ import java.util.List;
@Service(value = "sysFlowStepConfigService") @Service(value = "sysFlowStepConfigService")
public class SysFlowStepConfigServiceImpl extends BaseService<SysFlowStepConfigEntity, String> implements ISysFlowStepConfigService { public class SysFlowStepConfigServiceImpl extends BaseService<SysFlowStepConfigEntity, String> implements ISysFlowStepConfigService {
Logger logger = LoggerFactory.getLogger(ISysFlowStepConfigService.class);
private ISysFlowStepConfigDao sysFlowStepConfigDao; private ISysFlowStepConfigDao sysFlowStepConfigDao;
@Autowired
private ISysFlowStepAccountService sysFlowStepAccountService;
@Autowired
private ISysApplicationDatabaseService sysApplicationDatabaseService;
@Autowired @Autowired
public void setSysFlowStepConfigDao(ISysFlowStepConfigDao dao) { public void setSysFlowStepConfigDao(ISysFlowStepConfigDao dao) {
this.sysFlowStepConfigDao = dao; this.sysFlowStepConfigDao = dao;
this.dao = dao; this.dao = dao;
} }
/**
* 测试sql
*
* @param object
* @return
*/
@Override
public JsonResultEntity testSql(JSONObject object) {
SysFlowStepConfigEntity config = getData("jsonStr",object,SysFlowStepConfigEntity.class);
try {
checkParams(config,"type");
}catch (Exception e){
return BaseResult.getFailureMessageEntity(e.getMessage());
}
SysFlowStepAccountEntity accountEntity = sysFlowStepAccountService.get(config.getId());
Assert.notNull(accountEntity,"没有找到对应账户");
//查询数据源
SysApplicationDatabaseEntity database = new SysApplicationDatabaseEntity();
database.setSourceCode(accountEntity.getName()+"_flow");
List<SysApplicationDatabaseEntity> databaseList = sysApplicationDatabaseService.query(database);
if (CollectionUtils.isEmpty(databaseList)){
throw new BaseSystemException("没有找到数据源");
}
return null;
}
/**
* 验证数据
* @param entity
* @param type
*/
private void checkParams(SysFlowStepConfigEntity entity, String type) {
Assert.notNull(entity,"参数不能为空");
Assert.notEmpty(entity.getTableName(),"tabName不能为空");
Assert.notEmpty(entity.getStepAccountId(),"tabName不能为空");
}
} }

View File

@ -1,21 +1,12 @@
package com.hzya.frame.sys.flow.service.impl; package com.hzya.frame.sys.flow.service.impl;
import cn.hutool.core.lang.Assert;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sys.flow.dao.ISysFlowStepAccountDao;
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity; import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
import com.hzya.frame.sys.flow.dao.ISysFlowStepDao; import com.hzya.frame.sys.flow.dao.ISysFlowStepDao;
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
import com.hzya.frame.sys.flow.service.ISysFlowStepService; import com.hzya.frame.sys.flow.service.ISysFlowStepService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService; import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/** /**
* 流程步骤信息(SysFlowStep)表服务实现类 * 流程步骤信息(SysFlowStep)表服务实现类
* *
@ -26,135 +17,10 @@ import java.util.List;
public class SysFlowStepServiceImpl extends BaseService<SysFlowStepEntity, String> implements ISysFlowStepService { public class SysFlowStepServiceImpl extends BaseService<SysFlowStepEntity, String> implements ISysFlowStepService {
private ISysFlowStepDao sysFlowStepDao; private ISysFlowStepDao sysFlowStepDao;
@Autowired
private ISysFlowStepAccountService sysFlowStepAccountService;
@Autowired @Autowired
public void setSysFlowStepDao(ISysFlowStepDao dao) { public void setSysFlowStepDao(ISysFlowStepDao dao) {
this.sysFlowStepDao = dao; this.sysFlowStepDao = dao;
this.dao = dao; this.dao = dao;
} }
/**
* 保存流程步骤
*
* @param object
* @return
*/
@Override
public JsonResultEntity saveFlowStep(JSONObject object) {
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
try {
checkParams(sysFlowStep, "save");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
sysFlowStepDao.save(sysFlowStep);
return BaseResult.getSuccessMessageEntity("保存成功", sysFlowStep);
}
/**
* 更新流程步骤
*
* @param object
* @return
*/
@Override
public JsonResultEntity updateFlowStep(JSONObject object) {
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
try {
checkParams(sysFlowStep, "update");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
sysFlowStepDao.update(sysFlowStep);
//保存账户信息
if (null != sysFlowStep.getAccount()) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("jsonStr", JSONObject.toJSONString(sysFlowStep.getAccount()));
sysFlowStepAccountService.saveAccount(jsonObject);
}
return BaseResult.getSuccessMessageEntity("保存成功", sysFlowStep);
}
/**
* 删除流程步骤
*
* @param object
* @return
*/
@Override
public JsonResultEntity deleteFlowStep(JSONObject object) {
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
try {
checkParams(sysFlowStep, "delete");
String id = sysFlowStep.getId();
SysFlowStepEntity step = sysFlowStepDao.get(id);
//删除流程步骤账户表
SysFlowStepAccountEntity stepAccount = new SysFlowStepAccountEntity();
stepAccount.setFlowId(step.getFlowId());
stepAccount.setStepId(id);
sysFlowStepAccountService.logicRemoveMultiCondition(stepAccount);
//删除流程步骤
sysFlowStepDao.logicRemove(step);
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
return BaseResult.getSuccessMessageEntity("删除成功");
}
/**
* 查询列表
*
* @param object
* @return
*/
@Override
public JsonResultEntity queryList(JSONObject object) {
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
try {
checkParams(sysFlowStep, "queryList");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
List<SysFlowStepEntity> list = sysFlowStepDao.query(sysFlowStep);
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
}
/**
* 步骤详情
*
* @param object
* @return
*/
@Override
public JsonResultEntity getFlowStep(JSONObject object) {
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
try {
checkParams(sysFlowStep, "get");
} catch (Exception e) {
return BaseResult.getFailureMessageEntity(e.getMessage());
}
SysFlowStepEntity entity = sysFlowStepDao.get(sysFlowStep.getId());
return BaseResult.getSuccessMessageEntity("查询详情成功", entity);
}
private void checkParams(SysFlowStepEntity entity, String type) {
Assert.notNull(entity, "参数不能为空");
if ("save".equals(type)) {
Assert.notEmpty(entity.getFlowId(), "flowId不能为空");
Assert.notNull(entity.getStep(), "步骤号不能为空");
Assert.notEmpty(entity.getStepType(), "stepType不能为空");
} else if ("update".equals(type)) {
Assert.notEmpty(entity.getAppId(), "appId不能为空");
Assert.notEmpty(entity.getNifiApiId(), "nifiApiId不能为空");
} else if ("delete".equals(type)) {
Assert.notEmpty(entity.getId(), "id不能为空");
}else if ("queryList".equals(type)){
Assert.notEmpty(entity.getFlowId(),"flowId不能为空");
}else if ("get".equals(type)){
Assert.notEmpty(entity.getId(),"id不能为空");
}
}
} }

View File

@ -82,9 +82,6 @@ public class SysApplicationApiEntity extends BaseEntity {
/** 返回描述字段*/ /** 返回描述字段*/
private String returnMsg; private String returnMsg;
//对应nifi的apiid
private String nifiApiId;
public String getReturnMsg() { public String getReturnMsg() {
return returnMsg; return returnMsg;
} }
@ -324,13 +321,5 @@ public class SysApplicationApiEntity extends BaseEntity {
public void setAppCode(Long appCode) { public void setAppCode(Long appCode) {
this.appCode = appCode; this.appCode = appCode;
} }
public String getNifiApiId() {
return nifiApiId;
}
public void setNifiApiId(String nifiApiId) {
this.nifiApiId = nifiApiId;
}
} }

View File

@ -10,7 +10,6 @@
<result property="appCode" column="app_code"/> <result property="appCode" column="app_code"/>
<result property="apiPath" column="api_path" jdbcType="VARCHAR"/> <result property="apiPath" column="api_path" jdbcType="VARCHAR"/>
<result property="appId" column="app_id" jdbcType="VARCHAR"/> <result property="appId" column="app_id" jdbcType="VARCHAR"/>
<result property="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/>
<result property="appName" column="app_name" jdbcType="VARCHAR"/> <result property="appName" column="app_name" jdbcType="VARCHAR"/>
<result property="appUrl" column="app_url" jdbcType="VARCHAR"/> <result property="appUrl" column="app_url" jdbcType="VARCHAR"/>
<result property="catalogueId" column="catalogue_id" jdbcType="VARCHAR"/> <result property="catalogueId" column="catalogue_id" jdbcType="VARCHAR"/>
@ -52,7 +51,6 @@
,api_code ,api_code
,api_path ,api_path
,app_id ,app_id
,nifi_api_id
,catalogue_id ,catalogue_id
,api_name ,api_name
,api_remark ,api_remark
@ -87,7 +85,6 @@
<sql id="SysApplicationApiEntity_join_sysApp_like_Column_Lis"> <sql id="SysApplicationApiEntity_join_sysApp_like_Column_Lis">
sys_application_api.id, sys_application_api.id,
sys_application.app_id as app_code, sys_application.app_id as app_code,
sys_application.nifi_api_id as nifi_api_id,
sys_application_api.api_code, sys_application_api.api_code,
sys_application_api.api_name, sys_application_api.api_name,
sys_application_api.api_remark, sys_application_api.api_remark,
@ -114,7 +111,6 @@
b.name as app_name, b.name as app_name,
b.interface_address as app_url, b.interface_address as app_url,
a.app_id, a.app_id,
a.nifi_api_id,
a.catalogue_id, a.catalogue_id,
c.name as catalogue_name, c.name as catalogue_name,
a.api_name, a.api_name,
@ -166,7 +162,6 @@ WHERE
,api.api_code ,api.api_code
,api.api_path ,api.api_path
,api.app_id ,api.app_id
,api.nifi_api_id
,api.catalogue_id ,api.catalogue_id
,api.api_name ,api.api_name
,api.api_remark ,api.api_remark
@ -205,7 +200,6 @@ WHERE
<if test="apiCode != null ">and api.api_code = #{apiCode}</if> <if test="apiCode != null ">and api.api_code = #{apiCode}</if>
<if test="apiPath != null and apiPath != ''">and api.api_path = #{apiPath}</if> <if test="apiPath != null and apiPath != ''">and api.api_path = #{apiPath}</if>
<if test="appId != null and appId != ''">and api.app_id = #{appId}</if> <if test="appId != null and appId != ''">and api.app_id = #{appId}</if>
<if test="nifiApiId != null and nifiApiId != ''">and api.nifi_api_id = #{nifiApiId}</if>
<if test="catalogueId != null and catalogueId != ''">and api.catalogue_id = #{catalogueId}</if> <if test="catalogueId != null and catalogueId != ''">and api.catalogue_id = #{catalogueId}</if>
<if test="apiName != null and apiName != ''">and api.api_name = #{apiName}</if> <if test="apiName != null and apiName != ''">and api.api_name = #{apiName}</if>
<if test="apiRemark != null and apiRemark != ''">and api.api_remark = #{apiRemark}</if> <if test="apiRemark != null and apiRemark != ''">and api.api_remark = #{apiRemark}</if>
@ -257,7 +251,6 @@ WHERE
<if test="apiCode != null ">and api_code = #{apiCode}</if> <if test="apiCode != null ">and api_code = #{apiCode}</if>
<if test="apiPath != null and apiPath != ''">and api_path = #{apiPath}</if> <if test="apiPath != null and apiPath != ''">and api_path = #{apiPath}</if>
<if test="appId != null and appId != ''">and app_id = #{appId}</if> <if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
<if test="catalogueId != null and catalogueId != ''">and catalogue_id = #{catalogueId}</if> <if test="catalogueId != null and catalogueId != ''">and catalogue_id = #{catalogueId}</if>
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</if> <if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="apiRemark != null and apiRemark != ''">and api_remark = #{apiRemark}</if> <if test="apiRemark != null and apiRemark != ''">and api_remark = #{apiRemark}</if>
@ -311,7 +304,6 @@ WHERE
<if test="apiCode != null ">and api_code like concat('%',#{apiCode},'%')</if> <if test="apiCode != null ">and api_code like concat('%',#{apiCode},'%')</if>
<if test="apiPath != null and apiPath != ''">and api_path like concat('%',#{apiPath},'%')</if> <if test="apiPath != null and apiPath != ''">and api_path like concat('%',#{apiPath},'%')</if>
<if test="appId != null and appId != ''">and app_id like concat('%',#{appId},'%')</if> <if test="appId != null and appId != ''">and app_id like concat('%',#{appId},'%')</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id like concat('%',#{nifiApiId},'%')</if>
<if test="catalogueId != null and catalogueId != ''">and catalogue_id like concat('%',#{catalogueId},'%') <if test="catalogueId != null and catalogueId != ''">and catalogue_id like concat('%',#{catalogueId},'%')
</if> </if>
<if test="apiName != null and apiName != ''">and api_name like concat('%',#{apiName},'%')</if> <if test="apiName != null and apiName != ''">and api_name like concat('%',#{apiName},'%')</if>
@ -380,7 +372,6 @@ WHERE
<if test="apiCode != null ">and sys_application_api.api_code like concat('%',#{apiCode},'%')</if> <if test="apiCode != null ">and sys_application_api.api_code like concat('%',#{apiCode},'%')</if>
<if test="apiPath != null and apiPath != ''">and sys_application_api.api_path like concat('%',#{apiPath},'%')</if> <if test="apiPath != null and apiPath != ''">and sys_application_api.api_path like concat('%',#{apiPath},'%')</if>
<if test="appId != null and appId != ''">and sys_application_api.app_id like concat('%',#{appId},'%')</if> <if test="appId != null and appId != ''">and sys_application_api.app_id like concat('%',#{appId},'%')</if>
<if test="nifiApiId != null and nifiApiId != ''">and sys_application_api.nifi_api_id like concat('%',#{nifiApiId},'%')</if>
<if test="catalogueId != null and catalogueId != ''">and sys_application_api.catalogue_id like concat('%',#{catalogueId},'%') <if test="catalogueId != null and catalogueId != ''">and sys_application_api.catalogue_id like concat('%',#{catalogueId},'%')
</if> </if>
<if test="apiName != null and apiName != ''">and sys_application_api.api_name like concat('%',#{apiName},'%')</if> <if test="apiName != null and apiName != ''">and sys_application_api.api_name like concat('%',#{apiName},'%')</if>
@ -447,7 +438,6 @@ WHERE
<if test="apiCode != null ">or api_code = #{apiCode}</if> <if test="apiCode != null ">or api_code = #{apiCode}</if>
<if test="apiPath != null and apiPath != ''">or api_path = #{apiPath}</if> <if test="apiPath != null and apiPath != ''">or api_path = #{apiPath}</if>
<if test="appId != null and appId != ''">or app_id = #{appId}</if> <if test="appId != null and appId != ''">or app_id = #{appId}</if>
<if test="nifiApiId != null and nifiApiId != ''">or nifi_api_id = #{nifiApiId}</if>
<if test="catalogueId != null and catalogueId != ''">or catalogue_id = #{catalogueId}</if> <if test="catalogueId != null and catalogueId != ''">or catalogue_id = #{catalogueId}</if>
<if test="apiName != null and apiName != ''">or api_name = #{apiName}</if> <if test="apiName != null and apiName != ''">or api_name = #{apiName}</if>
<if test="apiRemark != null and apiRemark != ''">or api_remark = #{apiRemark}</if> <if test="apiRemark != null and apiRemark != ''">or api_remark = #{apiRemark}</if>
@ -500,7 +490,6 @@ WHERE
<if test="apiCode == null ">api_code ,</if> <if test="apiCode == null ">api_code ,</if>
<if test="apiPath != null and apiPath != ''">api_path ,</if> <if test="apiPath != null and apiPath != ''">api_path ,</if>
<if test="appId != null and appId != ''">app_id ,</if> <if test="appId != null and appId != ''">app_id ,</if>
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id ,</if>
<if test="catalogueId != null and catalogueId != ''">catalogue_id ,</if> <if test="catalogueId != null and catalogueId != ''">catalogue_id ,</if>
<if test="apiName != null and apiName != ''">api_name ,</if> <if test="apiName != null and apiName != ''">api_name ,</if>
<if test="apiRemark != null and apiRemark != ''">api_remark ,</if> <if test="apiRemark != null and apiRemark != ''">api_remark ,</if>
@ -542,7 +531,6 @@ WHERE
</if> </if>
<if test="apiPath != null and apiPath != ''">#{apiPath} ,</if> <if test="apiPath != null and apiPath != ''">#{apiPath} ,</if>
<if test="appId != null and appId != ''">#{appId} ,</if> <if test="appId != null and appId != ''">#{appId} ,</if>
<if test="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</if>
<if test="catalogueId != null and catalogueId != ''">#{catalogueId} ,</if> <if test="catalogueId != null and catalogueId != ''">#{catalogueId} ,</if>
<if test="apiName != null and apiName != ''">#{apiName} ,</if> <if test="apiName != null and apiName != ''">#{apiName} ,</if>
<if test="apiRemark != null and apiRemark != ''">#{apiRemark} ,</if> <if test="apiRemark != null and apiRemark != ''">#{apiRemark} ,</if>
@ -579,32 +567,31 @@ WHERE
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="entityInsertBatch" > <insert id="entityInsertBatch" >
insert into sys_application_api(api_status,api_code,api_path, app_id,nifi_api_id, catalogue_id, api_name, api_remark, insert into sys_application_api(api_status,api_code,api_path, app_id, catalogue_id, api_name, api_remark,
need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method, need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method,
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out, bean_name,return_msg,return_success_field,return_success_value, fun_name, extension_api, sorts, create_user_id, timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out, bean_name,return_msg,return_success_field,return_success_value, fun_name, extension_api, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id, sts) create_time, modify_user_id, modify_time, sts, org_id, sts)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.nifiApiId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.returnMsg},#{entity.returnSuccessField},#{entity.returnSuccessValue},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id}, (#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.returnMsg},#{entity.returnSuccessField},#{entity.returnSuccessValue},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y') 'Y')
</foreach> </foreach>
</insert> </insert>
<!-- 批量新增或者修改--> <!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" > <insert id="entityInsertOrUpdateBatch" >
insert into sys_application_api(api_status,api_code,api_path, app_id,nifi_api_id, catalogue_id, api_name, api_remark, insert into sys_application_api(api_status,api_code,api_path, app_id, catalogue_id, api_name, api_remark,
need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method, need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method,
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out,bean_name,return_msg,return_success_field,return_success_value,fun_name,extension_api, sorts, create_user_id, timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out,bean_name,return_msg,return_success_field,return_success_value,fun_name,extension_api, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id) create_time, modify_user_id, modify_time, sts, org_id)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.nifiApiId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.returnMsg},#{entity.returnSuccessField},#{entity.returnSuccessValue},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id}) (#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.returnMsg},#{entity.returnSuccessField},#{entity.returnSuccessValue},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach> </foreach>
on duplicate key update on duplicate key update
api_status = values(api_status), api_status = values(api_status),
api_code = values(api_code), api_code = values(api_code),
api_path = values(api_path), api_path = values(api_path),
app_id = values(app_id), app_id = values(app_id),
nifi_api_id = values(nifi_api_id),
catalogue_id = values(catalogue_id), catalogue_id = values(catalogue_id),
api_name = values(api_name), api_name = values(api_name),
api_remark = values(api_remark), api_remark = values(api_remark),
@ -643,7 +630,6 @@ WHERE
<if test="apiCode != null ">api_code = #{apiCode},</if> <if test="apiCode != null ">api_code = #{apiCode},</if>
<if test="apiPath != null and apiPath != ''">api_path = #{apiPath},</if> <if test="apiPath != null and apiPath != ''">api_path = #{apiPath},</if>
<if test="appId != null and appId != ''">app_id = #{appId},</if> <if test="appId != null and appId != ''">app_id = #{appId},</if>
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id = #{nifiApiId},</if>
<if test="catalogueId != null and catalogueId != ''">catalogue_id = #{catalogueId},</if> <if test="catalogueId != null and catalogueId != ''">catalogue_id = #{catalogueId},</if>
<if test="apiName != null and apiName != ''">api_name = #{apiName},</if> <if test="apiName != null and apiName != ''">api_name = #{apiName},</if>
<if test="apiRemark != null and apiRemark != ''">api_remark = #{apiRemark},</if> <if test="apiRemark != null and apiRemark != ''">api_remark = #{apiRemark},</if>
@ -697,7 +683,6 @@ where id = #{id}
<if test="apiCode != null ">and api_code = #{apiCode}</if> <if test="apiCode != null ">and api_code = #{apiCode}</if>
<if test="apiPath != null and apiPath != ''">and api_path = #{apiPath}</if> <if test="apiPath != null and apiPath != ''">and api_path = #{apiPath}</if>
<if test="appId != null and appId != ''">and app_id = #{appId}</if> <if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
<if test="catalogueId != null and catalogueId != ''">and catalogue_id = #{catalogueId}</if> <if test="catalogueId != null and catalogueId != ''">and catalogue_id = #{catalogueId}</if>
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</if> <if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="apiRemark != null and apiRemark != ''">and api_remark = #{apiRemark}</if> <if test="apiRemark != null and apiRemark != ''">and api_remark = #{apiRemark}</if>
@ -934,7 +919,6 @@ where id = #{id}
select select
id id
,app_id ,app_id
,nifi_api_id
,api_name ,api_name
from sys_application_api from sys_application_api
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
@ -943,7 +927,6 @@ where id = #{id}
<if test="apiCode != null ">and api_code = #{apiCode}</if> <if test="apiCode != null ">and api_code = #{apiCode}</if>
<if test="apiPath != null and apiPath != ''">and api_path = #{apiPath}</if> <if test="apiPath != null and apiPath != ''">and api_path = #{apiPath}</if>
<if test="appId != null and appId != ''">and app_id = #{appId}</if> <if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
<if test="catalogueId != null and catalogueId != ''">and catalogue_id = #{catalogueId}</if> <if test="catalogueId != null and catalogueId != ''">and catalogue_id = #{catalogueId}</if>
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</if> <if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="apiRemark != null and apiRemark != ''">and api_remark = #{apiRemark}</if> <if test="apiRemark != null and apiRemark != ''">and api_remark = #{apiRemark}</if>

View File

@ -1,8 +1,6 @@
package com.hzya.frame.sysnew.application.appAcount.entity; package com.hzya.frame.sysnew.application.appAcount.entity;
import java.util.Date; import java.util.Date;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.web.entity.BaseEntity; import com.hzya.frame.web.entity.BaseEntity;
/** /**
* 应用账户表(SysApplicationAccount)实体类 * 应用账户表(SysApplicationAccount)实体类
@ -134,5 +132,6 @@ public class SysApplicationAccountEntity extends BaseEntity {
public void setAgentid(String agentid) { public void setAgentid(String agentid) {
this.agentid = agentid; this.agentid = agentid;
} }
} }

View File

@ -33,7 +33,7 @@
,modify_time ,modify_time
,sts ,sts
,sorts ,sorts
,app_id ,appId
,name ,name
,ip_address ,ip_address
,port ,port
@ -46,14 +46,6 @@
,corpId ,corpId
,agentId ,agentId
</sql> </sql>
<select id="entity_get" parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity" resultMap="get-SysApplicationAccountEntity-result">
select
<include refid="SysApplicationAccountEntity_Base_Column_List"/>
from sys_application_account
where id = #{id}
and sts = 'Y'
</select>
<!-- 查询 采用==查询 --> <!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-SysApplicationAccountEntity-result" <select id="entity_list_base" resultMap="get-SysApplicationAccountEntity-result"
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity"> parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
@ -207,7 +199,6 @@
<if test="appSecret != null and appSecret != ''">app_secret ,</if> <if test="appSecret != null and appSecret != ''">app_secret ,</if>
<if test="corpid != null and corpid != ''">corpId ,</if> <if test="corpid != null and corpid != ''">corpId ,</if>
<if test="agentid != null and agentid != ''">agentId ,</if> <if test="agentid != null and agentid != ''">agentId ,</if>
<if test="appId != null and appId != ''">app_id ,</if>
<if test="sorts == null ">sorts,</if> <if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if> <if test="sts == null ">sts,</if>
</trim> </trim>
@ -231,10 +222,8 @@
<if test="appSecret != null and appSecret != ''">#{appSecret} ,</if> <if test="appSecret != null and appSecret != ''">#{appSecret} ,</if>
<if test="corpid != null and corpid != ''">#{corpid} ,</if> <if test="corpid != null and corpid != ''">#{corpid} ,</if>
<if test="agentid != null and agentid != ''">#{agentid} ,</if> <if test="agentid != null and agentid != ''">#{agentid} ,</if>
<if test="appId != null and appId != ''">#{appId} ,</if> <if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_application_account a
<if test="sorts == null "> WHERE a.sts = 'Y' )1),
COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_application_account a WHERE
a.sts = 'Y' ),1),
</if> </if>
<if test="sts == null ">'Y',</if> <if test="sts == null ">'Y',</if>
</trim> </trim>
@ -295,7 +284,6 @@
<if test="userName != null and userName != ''">user_name = #{userName},</if> <if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="password != null and password != ''">password = #{password},</if> <if test="password != null and password != ''">password = #{password},</if>
<if test="dbType != null and dbType != ''">db_type = #{dbType},</if> <if test="dbType != null and dbType != ''">db_type = #{dbType},</if>
<if test="appId != null and appId != ''">app_id = #{appId},</if>
<if test="appKey != null and appKey != ''">app_key = #{appKey},</if> <if test="appKey != null and appKey != ''">app_key = #{appKey},</if>
<if test="appSecret != null and appSecret != ''">app_secret = #{appSecret},</if> <if test="appSecret != null and appSecret != ''">app_secret = #{appSecret},</if>
<if test="corpid != null and corpid != ''">corpId = #{corpid},</if> <if test="corpid != null and corpid != ''">corpId = #{corpid},</if>
@ -330,7 +318,6 @@
<if test="appKey != null and appKey != ''">and app_key = #{appKey}</if> <if test="appKey != null and appKey != ''">and app_key = #{appKey}</if>
<if test="appSecret != null and appSecret != ''">and app_secret = #{appSecret}</if> <if test="appSecret != null and appSecret != ''">and app_secret = #{appSecret}</if>
<if test="corpid != null and corpid != ''">and corpId = #{corpid}</if> <if test="corpid != null and corpid != ''">and corpId = #{corpid}</if>
<if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="agentid != null and agentid != ''">and agentId = #{agentid}</if> <if test="agentid != null and agentid != ''">and agentId = #{agentid}</if>
and sts='Y' and sts='Y'
</trim> </trim>

View File

@ -1,21 +1,15 @@
package com.hzya.frame.sysnew.application.appAcount.service.impl; package com.hzya.frame.sysnew.application.appAcount.service.impl;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity; import com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity;
import com.hzya.frame.sysnew.application.appAcount.dao.ISysApplicationAccountDao; import com.hzya.frame.sysnew.application.appAcount.dao.ISysApplicationAccountDao;
import com.hzya.frame.sysnew.application.appAcount.service.ISysApplicationAccountService; import com.hzya.frame.sysnew.application.appAcount.service.ISysApplicationAccountService;
import com.hzya.frame.web.entity.BaseResult; import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity; import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService; import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/** /**
* 应用账户表(SysApplicationAccount)表服务实现类 * 应用账户表(SysApplicationAccount)表服务实现类
* *
@ -47,11 +41,6 @@ public class SysApplicationAccountServiceImpl extends BaseService<SysApplication
}catch (Exception e){ }catch (Exception e){
return BaseResult.getFailureMessageEntity(e.getMessage()); return BaseResult.getFailureMessageEntity(e.getMessage());
} }
//控制一下名字不能重复
List<SysApplicationAccountEntity> queryList = queryByName(entity);
if (CollectionUtils.isNotEmpty(queryList) && queryList.size() > 0){
return BaseResult.getFailureMessageEntity(entity.getName()+"重复");
}
sysApplicationAccountDao.save(entity); sysApplicationAccountDao.save(entity);
return BaseResult.getSuccessMessageEntity("新增成功"); return BaseResult.getSuccessMessageEntity("新增成功");
} }
@ -64,23 +53,7 @@ public class SysApplicationAccountServiceImpl extends BaseService<SysApplication
*/ */
@Override @Override
public JsonResultEntity updateAccount(JSONObject object) { public JsonResultEntity updateAccount(JSONObject object) {
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class); return null;
try {
checkParam(entity,"update");
}catch (Exception e){
return BaseResult.getFailureMessageEntity(e.getMessage());
}
//检查一下名字不能重复
List<SysApplicationAccountEntity> queryList = queryByName(entity);
if (CollectionUtils.isNotEmpty(queryList) && queryList.size() > 0){
for (SysApplicationAccountEntity acc : queryList) {
if (!acc.getId().equals(entity.getId())){
return BaseResult.getFailureMessageEntity(entity.getName()+"重复");
}
}
}
sysApplicationAccountDao.update(entity);
return BaseResult.getSuccessMessageEntity("更新成功");
} }
/** /**
@ -91,14 +64,7 @@ public class SysApplicationAccountServiceImpl extends BaseService<SysApplication
*/ */
@Override @Override
public JsonResultEntity deleteAccount(JSONObject object) { public JsonResultEntity deleteAccount(JSONObject object) {
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class); return null;
try {
checkParam(entity,"delete");
}catch (Exception e){
return BaseResult.getFailureMessageEntity(e.getMessage());
}
sysApplicationAccountDao.logicRemove(entity);
return BaseResult.getSuccessMessageEntity("删除成功");
} }
/** /**
@ -109,14 +75,7 @@ public class SysApplicationAccountServiceImpl extends BaseService<SysApplication
*/ */
@Override @Override
public JsonResultEntity getAccount(JSONObject object) { public JsonResultEntity getAccount(JSONObject object) {
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class); return null;
try {
checkParam(entity,"get");
}catch (Exception e){
return BaseResult.getFailureMessageEntity(e.getMessage());
}
SysApplicationAccountEntity sysApplicationAccountEntity = sysApplicationAccountDao.get(entity.getId());
return BaseResult.getSuccessMessageEntity("查询账户详情成功",sysApplicationAccountEntity);
} }
/** /**
@ -127,14 +86,7 @@ public class SysApplicationAccountServiceImpl extends BaseService<SysApplication
*/ */
@Override @Override
public JsonResultEntity queryAccountList(JSONObject object) { public JsonResultEntity queryAccountList(JSONObject object) {
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class); return null;
try {
checkParam(entity,"queryList");
}catch (Exception e){
return BaseResult.getFailureMessageEntity(e.getMessage());
}
List<SysApplicationAccountEntity> queryList = sysApplicationAccountDao.query(entity);
return BaseResult.getSuccessMessageEntity("查询列表成功",queryList);
} }
/** /**
@ -145,43 +97,11 @@ public class SysApplicationAccountServiceImpl extends BaseService<SysApplication
*/ */
@Override @Override
public JsonResultEntity queryAccountPaged(JSONObject object) { public JsonResultEntity queryAccountPaged(JSONObject object) {
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class);
try {
checkParam(entity,"queryPaged");
}catch (Exception e){
return BaseResult.getFailureMessageEntity(e.getMessage());
}
return null; return null;
} }
//根据账户名称查询
private List<SysApplicationAccountEntity> queryByName(SysApplicationAccountEntity entity){
if (StrUtil.isNotEmpty(entity.getName())){
SysApplicationAccountEntity account = new SysApplicationAccountEntity();
account.setName(entity.getName());
List<SysApplicationAccountEntity> queryList = sysApplicationAccountDao.query(account);
return queryList;
}
return null;
}
//数据检查 //数据检查
private void checkParam(SysApplicationAccountEntity entity,String type){ private void checkParam(SysApplicationAccountEntity entity,String type){
Assert.notNull(entity,"参数不能为空");
if ("save".equals(type)){
Assert.notEmpty(entity.getAppId(),"appId不能为空");
Assert.notEmpty(entity.getName(),"账户名称不能为空");
}else if ("update".equals(type)){
Assert.notEmpty(entity.getId(),"id不能为空");
}else if ("delete".equals(type)){
Assert.notEmpty(entity.getId(),"id不能为空");
}else if ("get".equals(type)){
Assert.notEmpty(entity.getId(),"id不能为空");
}else if ("queryList".equals(type)){
Assert.notEmpty(entity.getAppId(),"appId不能为空");
}else if ("queryPaged".equals(type)){
Assert.notNull(entity.getPageNum(),"pageNum不能为空");
Assert.notNull(entity.getPageSize(),"pageSize不能为空");
}
} }
} }

61
fw-nifi/pom.xml Normal file
View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.hzya.frame</groupId>
<artifactId>kangarooDataCenterV3</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fw-nifi</artifactId>
<packaging>jar</packaging>
<version>${revision}</version>
<dependencies>
<dependency>
<groupId>com.hzya.frame</groupId>
<artifactId>base-service</artifactId>
<version>${revision}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>mysql</groupId>-->
<!-- <artifactId>mysql-connector-java</artifactId>-->
<!-- <version>${mysql-connector-java}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.ibm.jsonata4java</groupId>-->
<!-- <artifactId>JSONata4Java</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<!-- <version>4.10.0</version>-->
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法为了解决Unable to find main class的问题 -->
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
<skip>true</skip>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,11 @@
//package com.hzya.frame.nifi;
//
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//
//@SpringBootApplication(scanBasePackages = "com.hzya.frame.nifi")
//public class NifiApplication {
// public static void main(String[] args) {
// SpringApplication.run(NifiApplication.class, args);
// }
//}

View File

@ -0,0 +1,238 @@
package com.hzya.frame.nifiapi.client;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hzya.frame.nifiapi.config.NifiServiceConfig;
import okhttp3.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
/**
* nifi客户端请求处理
*
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.client
* @Projectfw-nifi
* @nameNifiClient
* @Date2025/5/14 10:00
* @FilenameNifiClient
*/
@Component
public class NifiClient {
private final NifiServiceConfig config;
private final OkHttpClient httpClient;
private final ObjectMapper objectMapper;
private final AtomicReference<String> accessToken = new AtomicReference<>();
private volatile long tokenIssueTime; // Token 发行时间毫秒
private volatile long tokenExpiration; // Token 过期时间毫秒
Logger logger = LoggerFactory.getLogger(NifiClient.class);
@Autowired
public NifiClient(NifiServiceConfig config, OkHttpClient httpClient, ObjectMapper objectMapper) {
this.config = config;
this.httpClient = httpClient;
this.objectMapper = objectMapper;
initializeToken();
}
private void initializeToken() {
try {
accessToken.set(getAccessToken());
tokenIssueTime = System.currentTimeMillis();
tokenExpiration = tokenIssueTime + (12 * 60 * 60 * 1000); // 默认 12 小时
logger.info("令牌已初始化,过期时间:" + new java.util.Date(tokenExpiration));
} catch (Exception e) {
throw new RuntimeException("初始化NiFi访问令牌失败 " + e.getMessage());
}
}
public <T> T get(String path, Class<T> responseType) throws IOException {
return executeRequestWithRetry(() -> {
Request request = new Request.Builder().url(config.getApiUrl() + path).get().header("Authorization", "Bearer " + accessToken.get()).build();
return executeRequest(request, responseType);
});
}
/**
* 获取原始JSON响应字符串不进行反序列化
*/
public String getRaw(String path) throws IOException {
return executeRequestWithRetry(() -> {
Request request = new Request.Builder().url(config.getApiUrl() + path).get().header("Authorization", "Bearer " + accessToken.get()).build();
try (Response response = httpClient.newCall(request).execute()) {
if (!response.isSuccessful()) {
throw new IOException("意外的响应码: " + response.code());
}
return response.body().string();
}
});
}
/**
* 执行GET请求并返回文件流供调用者处理如保存到文件或浏览器下载
*/
public InputStream getAsStream(String path) throws IOException {
return executeRequestWithRetry(() -> {
Request request = new Request.Builder().url(config.getApiUrl() + path).get().header("Authorization", "Bearer " + accessToken.get()).build();
return executeStreamRequest(request);
});
}
public <T> T post(String path, Object requestBody, Class<T> responseType) throws IOException {
String jsonBody = objectMapper.writeValueAsString(requestBody);
RequestBody body = RequestBody.create(jsonBody, MediaType.get("application/json; charset=utf-8"));
return executeRequestWithRetry(() -> {
Request request = new Request.Builder().url(config.getApiUrl() + path).post(body).header("Authorization", "Bearer " + accessToken.get()).build();
return executeRequest(request, responseType);
});
}
public <T> T delete(String path, Class<T> responseType) throws IOException {
return executeRequestWithRetry(() -> {
Request request = new Request.Builder().url(config.getApiUrl() + path).delete().header("Authorization", "Bearer " + accessToken.get()).build();
return executeRequest(request, responseType);
});
}
public <T> T delete(String path, Map<String, String> queryParams, Class<T> responseType) throws IOException {
// 构建 URL 并添加查询参数
HttpUrl.Builder urlBuilder = HttpUrl.parse(config.getApiUrl() + path).newBuilder();
if (queryParams != null) {
queryParams.forEach(urlBuilder::addQueryParameter);
}
String url = urlBuilder.build().toString();
return executeRequestWithRetry(() -> {
Request request = new Request.Builder().url(url).delete().header("Authorization", "Bearer " + accessToken.get()).build();
return executeRequest(request, responseType);
});
}
public <T> T put(String path, Object requestBody, Class<T> responseType) throws IOException {
String jsonBody = objectMapper.writeValueAsString(requestBody);
RequestBody body = RequestBody.create(jsonBody, MediaType.get("application/json; charset=utf-8"));
return executeRequestWithRetry(() -> {
Request request = new Request.Builder().url(config.getApiUrl() + path).put(body).header("Authorization", "Bearer " + accessToken.get()).build();
return executeRequest(request, responseType);
});
}
private <T> T executeRequestWithRetry(IOExceptionRunnable<T> runnable) throws IOException {
int maxRetries = 2;
for (int attempt = 0; attempt < maxRetries; attempt++) {
try {
checkAndRefreshToken();
return runnable.run();
} catch (IOException e) {
if (attempt == maxRetries - 1 || !isTokenExpiredError(e)) {
throw e;
}
logger.info("令牌可能已过期,请刷新并重试...");
try {
accessToken.set(getAccessToken());
tokenIssueTime = System.currentTimeMillis();
tokenExpiration = tokenIssueTime + (12 * 60 * 60 * 1000); // 默认 12 小时
} catch (Exception ex) {
throw new IOException("刷新令牌失败: " + ex.getMessage(), e);
}
}
}
throw new IOException("已达到最大重试次数");
}
private void checkAndRefreshToken() throws IOException {
long currentTime = System.currentTimeMillis();
if (currentTime > tokenExpiration - 300000) { // 提前 5 分钟刷新
try {
accessToken.set(getAccessToken());
tokenIssueTime = System.currentTimeMillis();
tokenExpiration = tokenIssueTime + (12 * 60 * 60 * 1000); // 默认 12 小时
logger.info("令牌已刷新,到期时间: " + new java.util.Date(tokenExpiration));
} catch (Exception e) {
throw new IOException("刷新令牌失败: " + e.getMessage());
}
}
}
private boolean isTokenExpiredError(IOException e) {
// 判断是否为 401 错误Token 过期
return e.getMessage().contains("401") || e.getMessage().contains("Unauthorized");
}
private <T> T executeRequest(Request request, Class<T> responseType) throws IOException {
try (Response response = httpClient.newCall(request).execute()) {
String responseBody = response.body().string();
logger.info("响应体:" + responseBody);
if (!response.isSuccessful()) {
throw new IOException(StrUtil.format("意外的响应码: {}", responseBody));
}
return objectMapper.readValue(responseBody, responseType);
}
}
public synchronized String getAccessToken() throws Exception {
// 创建信任所有证书的 OkHttpClient
// OkHttpClient client = httpClient.newBuilder().sslSocketFactory(createTrustAllSslSocketFactory(), createTrustAllTrustManager()).hostnameVerifier((hostname, session) -> true).build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "username=" + config.getUsername() + "&password=" + config.getPassword());
Request request = new Request.Builder().url(config.getApiUrl() + "/access/token").post(body).addHeader("Content-Type", "application/x-www-form-urlencoded").addHeader("Accept", "*/*").addHeader("User-Agent", "fw-nifi-client/1.0").addHeader("Connection", "keep-alive").build();
try (Response response = httpClient.newCall(request).execute()) {
if (!response.isSuccessful()) {
throw new IOException("获取访问令牌失败,响应码: " + response.code() + " - " + response.message());
}
byte[] bytes = response.body().bytes();
String newToken = new String(bytes, StandardCharsets.UTF_8);
return newToken;
}
}
// private SSLSocketFactory createTrustAllSslSocketFactory() throws Exception {
// SSLContext sslContext = SSLContext.getInstance("SSL");
// sslContext.init(null, new TrustManager[]{createTrustAllTrustManager()}, new SecureRandom());
// return sslContext.getSocketFactory();
// }
// private X509TrustManager createTrustAllTrustManager() {
// return new X509TrustManager() {
// @Override
// public void checkClientTrusted(X509Certificate[] chain, String authType) {
// }
//
// @Override
// public void checkServerTrusted(X509Certificate[] chain, String authType) {
// }
//
// @Override
// public X509Certificate[] getAcceptedIssuers() {
// return new X509Certificate[0];
// }
// };
// }
private InputStream executeStreamRequest(Request request) throws IOException {
Response response = httpClient.newCall(request).execute();
if (!response.isSuccessful()) {
String responseBody = response.body().string();
response.close();
throw new IOException("意外的响应码: " + responseBody);
}
return response.body().byteStream();
}
// 功能接口用于重试逻辑
@FunctionalInterface
private interface IOExceptionRunnable<T> {
T run() throws IOException;
}
}

View File

@ -0,0 +1,59 @@
package com.hzya.frame.nifiapi.config;
import okhttp3.OkHttpClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.concurrent.TimeUnit;
/**
* OkHttpClient配置类
*
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.config
* @Projectfw-nifi
* @nameHttpClientConfig
* @Date2025/5/14 11:45
* @FilenameHttpClientConfig
*/
@Configuration
public class HttpClientConfig {
@Bean
public OkHttpClient okHttpClient() throws Exception {
//调用nifi接口正常情况不会超过60秒的目前遇到的接口1秒以内调用完毕
return new OkHttpClient.Builder().sslSocketFactory(createTrustAllSslSocketFactory(), createTrustAllTrustManager()).hostnameVerifier((hostname, session) -> true).connectTimeout(60, TimeUnit.SECONDS) // 连接超时时间
.readTimeout(60, TimeUnit.SECONDS) // 读取超时时间
.writeTimeout(60, TimeUnit.SECONDS) // 写入超时时间
.build();
}
private SSLSocketFactory createTrustAllSslSocketFactory() throws Exception {
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, new TrustManager[]{createTrustAllTrustManager()}, new SecureRandom());
return sslContext.getSocketFactory();
}
private X509TrustManager createTrustAllTrustManager() {
return new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) {
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) {
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
};
}
}

View File

@ -0,0 +1,29 @@
package com.hzya.frame.nifiapi.config;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* jackson配置类
*
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.config
* @Projectfw-nifi
* @nameJacksonConfig
* @Date2025/5/14 11:54
* @FilenameJacksonConfig
*/
@Configuration
public class JacksonConfig {
@Bean
public ObjectMapper objectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
// 自动注册模块
objectMapper.findAndRegisterModules();
// 忽略 JSON 中存在但实体类中缺少的字段
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return objectMapper;
}
}

View File

@ -0,0 +1,38 @@
package com.hzya.frame.nifiapi.config;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
/**
* nifi service配置类
*
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.config
* @Projectfw-nifi
* @nameNifiConfig
* @Date2025/5/14 09:59
* @FilenameNifiConfig
*/
@Configuration
@Data
public class NifiServiceConfig {
@Value("${nifi.api.url:https://192.168.2.233:8443/nifi-api}")
private String apiUrl;
@Value("${nifi.api.username:hzya}")
private String username;
@Value("${nifi.api.password:hzya1314*nifi}")
private String password;
@Value("${nifi.api.controllerModifymark:接口修改标记}")
private String controllerModifyMark;
@Value("${nifi.api.relationshipMark:接口关系标记}")
private String relationshipMark;
@Value("${nifi.api.relationshipMark:接口状态清理标记}")
private String stateClearMark;
}

View File

@ -0,0 +1,30 @@
package com.hzya.frame.nifiapi.model.basemodel;
import com.hzya.frame.nifiapi.model.joincreparamcontext.CreateParamContextJoin;
import com.hzya.frame.nifiapi.model.joinfindneedmodifycontroller.FindNeedModifyController;
import lombok.Data;
/**
* 基类封转创建应用操作公共的字段
*
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joincreateoracleapp
* @Projectfw-nifi
* @nameCreateOracleApp
* @Date2025/5/21 17:44
* @FilenameCreateOracleApp
*/
@Data
public class JoinBashModel {
//实例化
private String appProcessGroupId;
private String parentProcessGroupId;
private String copyTargetProcessGroupId;
// private String copyTargetParentProcessGroupId;
//上下文
private CreateParamContextJoin createParamContextJoin;
//控制器
private FindNeedModifyController findNeedModifyController;
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.nifiapi.model.joinbindparametercontexts;
import lombok.Data;
/**
* Auto-generated: 2025-05-16 11:1:46
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
public class BindParameterContextsJoin11 {
private Revision11 revision;
private Component11 component;
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.nifiapi.model.joinbindparametercontexts;
import lombok.Data;
/**
* Auto-generated: 2025-05-16 11:1:46
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
public class Component11 {
private String id;
private ParameterContext11 parameterContext;
}

View File

@ -0,0 +1,8 @@
package com.hzya.frame.nifiapi.model.joinbindparametercontexts;
import lombok.Data;
@Data
public class ParameterContext11 {
private String id;
}

View File

@ -0,0 +1,17 @@
/**
* Copyright 2025 bejson.com
*/
package com.hzya.frame.nifiapi.model.joinbindparametercontexts;
import lombok.Data;
/**
* Auto-generated: 2025-05-16 11:1:46
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
public class Revision11 {
private String version;
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.nifiapi.model.joincontrollerenabled;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincontrollerenabled
* @Projectfw-nifi
* @nameEnOrDiControllerServices
* @Date2025/5/16 16:54
* @FilenameEnOrDiControllerServices
*/
@Data
public class EnOrDiControllerServices12 {
private String state;
private Revision13 revision;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joincontrollerenabled;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincontrollerenabled
* @Projectfw-nifi
* @nameControllerServiceStatus
* @Date2025/5/16 16:54
* @FilenameControllerServiceStatus
*/
@Data
public class Revision13 {
private String version;
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.nifiapi.model.joincreateconnection;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreateconnection
* @Projectfw-nifi
* @nameComponent18
* @Date2025/5/19 15:39
* @FilenameComponent18
*/
@Data
public class Component18 {
private String id;
private String parentGroupId;
private String backPressureObjectThreshold;
private String backPressureDataSizeThreshold;
private String flowFileExpiration;
}

View File

@ -0,0 +1,23 @@
package com.hzya.frame.nifiapi.model.joincreateconnection;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreateconnection
* @Projectfw-nifi
* @nameCreateConnection
* @Date2025/5/19 15:35
* @FilenameCreateConnection
*/
@Data
public class CreateConnection18 {
private String id;
private String sourceId;
private String sourceGroupId;
private String sourceType;
private String destinationId;
private String destinationGroupId;
private String destinationType;
private Revision18 revision;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joincreateconnection;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreateconnection
* @Projectfw-nifi
* @nameRevision18
* @Date2025/5/19 15:36
* @FilenameRevision18
*/
@Data
public class Revision18 {
private String version;
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.nifiapi.model.joincreateconnections;
import lombok.Data;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreateconnections
* @Projectfw-nifi
* @nameComponent17
* @Date2025/5/19 11:58
* @FilenameComponent17
*/
@Data
public class Component18 {
private SourceOrDestination18 source;
private SourceOrDestination18 destination;
private List<String> selectedRelationships;
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.nifiapi.model.joincreateconnections;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreateconnections
* @Projectfw-nifi
* @nameCreateConnections
* @Date2025/5/19 11:56
* @FilenameCreateConnections
*/
@Data
public class CreateConnections18 {
private Revision18 revision;
private Component18 component;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joincreateconnections;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreateconnections
* @Projectfw-nifi
* @nameRevision17
* @Date2025/5/19 11:56
* @FilenameRevision17
*/
@Data
public class Revision18 {
private String version;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.joincreateconnections;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreateconnections
* @Projectfw-nifi
* @nameSourceOrDestination
* @Date2025/5/19 13:39
* @FilenameSourceOrDestination
*/
@Data
public class SourceOrDestination18 {
private String id;
private String groupId;
private String type;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joincreatemysqlapp;
import com.hzya.frame.nifiapi.model.basemodel.JoinBashModel;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joincreateoracleapp
* @Projectfw-nifi
* @nameCreateOracleApp
* @Date2025/5/21 17:44
* @FilenameCreateOracleApp
*/
@Data
public class CreateMysqlApp extends JoinBashModel {
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joincreateoracleapp;
import com.hzya.frame.nifiapi.model.basemodel.JoinBashModel;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joincreateoracleapp
* @Projectfw-nifi
* @nameCreateOracleApp
* @Date2025/5/21 17:44
* @FilenameCreateOracleApp
*/
@Data
public class CreateAppInstanceJoin extends JoinBashModel {
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.nifiapi.model.joincreateprocessconnection;
import com.hzya.frame.nifiapi.model.joincreateconnections.CreateConnections18;
import lombok.Data;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joincreateprocessconnection
* @Projectfw-nifi
* @nameCreateProcessorConnections
* @Date2025/5/22 14:06
* @FilenameCreateProcessorConnections
*/
@Data
public class CreateProcessorConnections {
private String processGroupsId;
private List<CreateConnections18> createConnections18;
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.nifiapi.model.joincreateprocessorandupdateparam;
import com.hzya.frame.nifiapi.model.resultprocessorsinfo.Component16;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joincerateprocessorandupdateparam
* @Projectfw-nifi
* @nameCreateProcessorAndUpdateParam
* @Date2025/5/26 15:59
* @FilenameCreateProcessorAndUpdateParam
*/
@Data
public class CreateProcessorAndUpdateParamJoin {
private String targetProcessorId;
private String parentProcessGroupId;
private String copyTargetProcessGroupId;
private Component16 component;
}

View File

@ -0,0 +1,19 @@
package com.hzya.frame.nifiapi.model.joincreatetemp;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joincreatetemp
* @Projectfw-nifi
* @nameCreateTemplateJoin
* @Date2025/5/17 10:52
* @FilenameCreateTemplateJoin
*/
@Data
public class CreateTemplateJoin {
private String name;
private String description;
private String snippetId;
private String disconnectedNodeAcknowledged;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.joincreparamcontext;
import com.hzya.frame.nifiapi.model.joinparametercontexts.ParameterContextsJoin;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joincreparamcontext
* @Projectfw-nifi
* @nameCreateParamContextJoin
* @Date2025/5/22 08:58
* @FilenameCreateParamContextJoin
*/
@Data
public class CreateParamContextJoin {
private ParameterContextsJoin parameterContextsJoin;
private String processGroupsId;
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.nifiapi.model.joinfindneedmodifycontroller;
import com.hzya.frame.nifiapi.model.joingetcontroller.ControllerService12;
import lombok.Data;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joinfindneedmodifycontroller
* @Projectfw-nifi
* @nameFindNeedModifyController
* @Date2025/5/22 11:03
* @FilenameFindNeedModifyController
*/
@Data
public class FindNeedModifyController {
private String processGroupId;
private List<ControllerService12> needModifyController;
}

View File

@ -0,0 +1,31 @@
package com.hzya.frame.nifiapi.model.joingetallcontrollerservice;
import lombok.Data;
import java.util.Map;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joingetallcontrollerservice
* @Projectfw-nifi
* @nameComponent19
* @Date2025/5/22 10:28
* @FilenameComponent19
*/
@Data
public class Component19 {
private String id;
private String name;
private String type;
private String state;
private String validationStatus;
private String bulletinLevel;
private String extensionMissing;
private String comments;
private Map<String, String> properties;
private String persistsState;
private String restricted;
private String deprecated;
private String multipleVersionsAvailable;
private String supportsSensitiveDynamicProperties;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.joingetallcontrollerservice;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joingetallcontrollerservice
* @Projectfw-nifi
* @nameControllerServices19
* @Date2025/5/22 10:15
* @FilenameControllerServices19
*/
@Data
public class ControllerServices19 {
private String id;
private String uri;
private Component19 component;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.joingetallcontrollerservice;
import lombok.Data;
import java.util.List;
/**
* @Author liuyang
* @Package com.hzya.frame.nifiapi.model.joingetallcontrollerservice
* @Project fw-nifi
* @name GetAllController
* @Date 2025/5/22 10:13
* @Filename GetAllController
*/
@Data
public class GetAllController19 {
private List<ControllerServices19> controllerServices;
}

View File

@ -0,0 +1,27 @@
package com.hzya.frame.nifiapi.model.joingetcontroller;
import lombok.Data;
import java.util.Map;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joingetcontroller
* @Projectfw-nifi
* @nameComponent11
* @Date2025/5/16 13:59
* @FilenameComponent11
*/
@Data
public class Component12 {
private String id;//随机字符串
private String name;
private String type;
private String state;
//每个不同类型的控制器服务对应的属性都不一样这里就很坑
private Map<String, String> properties;
private String validationStatus;
private String bulletinLevel;
private String extensionMissing;
private String comments;
}

View File

@ -0,0 +1,21 @@
package com.hzya.frame.nifiapi.model.joingetcontroller;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joingetcontroller
* @Projectfw-nifi
* @nameControllerSerbices
* @Date2025/5/16 13:57
* @FilenameControllerSerbices
*/
@Data
public class ControllerService12 {
//控制器服务id
private String id;
private Revision12 revision;
private Component12 component;
//修改标记id
private String modifyMarkId;
}

View File

@ -0,0 +1,24 @@
//package com.hzya.frame.nifi.model.joingetcontroller;
//
//import lombok.Data;
//
///**
// * @Authorliuyang
// * @Packagecom.hzya.frame.nifi.model.joingetcontroller
// * @Projectfw-nifi
// * @nameProperties11
// * @Date2025/5/16 14:00
// * @FilenameProperties11
// */
//@Data
//public class Properties11 {
// private String databaseConnectionUrl;
// private String databaseDriverClassName;
// private String databaseDriverLocations;
// private String databaseUser;
// private String password;
// private String maxWaitTime;
// private String maxTotalConnections;
// private String validationQuery;
// private String dbcpMinIdleConns;
//}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joingetcontroller;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joingetcontroller
* @Projectfw-nifi
* @nameRevision11
* @Date2025/5/16 13:58
* @FilenameRevision11
*/
@Data
public class Revision12 {
private String version;
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.nifiapi.model.joinparametercontexts;
import lombok.Data;
import java.util.List;
/**
* Auto-generated: 2025-05-14 18:33:21
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
public class Component3 {
private String name;
private List<Parameters2> parameters;
}

View File

@ -0,0 +1,11 @@
package com.hzya.frame.nifiapi.model.joinparametercontexts;
import lombok.Data;
@Data
public class Parameter2 {
private String name;
private String value;
private boolean sensitive;
private String description;
}

View File

@ -0,0 +1,9 @@
package com.hzya.frame.nifiapi.model.joinparametercontexts;
import lombok.Data;
@Data
public class ParameterContextsJoin {
private Revision revision;
private Component3 component;
}

View File

@ -0,0 +1,11 @@
/**
* Copyright 2025 bejson.com
*/
package com.hzya.frame.nifiapi.model.joinparametercontexts;
import lombok.Data;
@Data
public class Parameters2 {
private Parameter2 parameter;
}

View File

@ -0,0 +1,8 @@
package com.hzya.frame.nifiapi.model.joinparametercontexts;
import lombok.Data;
@Data
public class Revision {
private int version;
}

View File

@ -0,0 +1,9 @@
package com.hzya.frame.nifiapi.model.joinprocessgroups;
import lombok.Data;
@Data
public class Component7 {
private String name;
private Position7 position;
}

View File

@ -0,0 +1,25 @@
package com.hzya.frame.nifiapi.model.joinprocessgroups;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifiapi.model.joinprocessgroups
* @Projectfw-nifi
* @namePosition7
* @Date2025/5/21 14:57
* @FilenamePosition7
*/
@Data
public class Position7 {
private String x;
private String y;
public Position7() {
}
public Position7(String x, String y) {
this.x = x;
this.y = y;
}
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joinprocessgroups;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joinprocessgroups
* @Projectfw-nifi
* @nameProcessGroupStatus
* @Date2025/5/15 10:43
* @FilenameProcessGroupStatus
*/
@Data
public class ProcessGroupStatus {
private String name;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.joinprocessgroups;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joinprocessgroups
* @Projectfw-nifi
* @nameProcessGroupsJoin
* @Date2025/5/15 10:43
* @FilenameProcessGroupsJoin
*/
@Data
public class ProcessGroupsJoin {
private Revision5 revision;
// private ProcessGroupStatus status;
private Component7 component;
}

View File

@ -0,0 +1,8 @@
package com.hzya.frame.nifiapi.model.joinprocessgroups;
import lombok.Data;
@Data
public class Revision5 {
private int version;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.joinsnippetinstance;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joinsnippetinstance
* @Projectfw-nifi
* @nameSnippetInstanceJoin
* @Date2025/5/17 14:21
* @FilenameSnippetInstanceJoin
*/
@Data
public class SnippetInstanceJoin {
private String snippetId;
private String originX;
private String originY;
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.nifiapi.model.joinsnippets;
import lombok.Data;
import java.util.Map;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joinsnippets
* @Projectfw-nifi
* @nameSnippet
* @Date2025/5/17 11:01
* @FilenameSnippet
*/
@Data
public class Snippet {
private String parentGroupId;
private Map<String, Map<String, String>> processGroups;
private Map<String, Map<String, String>> processors;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joinsnippets;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joinsnippets
* @Projectfw-nifi
* @nameSnippetsJoin
* @Date2025/5/17 11:00
* @FilenameSnippetsJoin
*/
@Data
public class SnippetsJoin {
private Snippet snippet;
}

View File

@ -0,0 +1,17 @@
/**
* Copyright 2025 bejson.com
*/
package com.hzya.frame.nifiapi.model.joinstartorstopprocessgroup;
import lombok.Data;
/**
* Auto-generated: 2025-05-16 10:47:3
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
public class Revision10 {
private String version;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joinstartorstopprocessgroup;
import lombok.Data;
/**
* Auto-generated: 2025-05-16 10:47:3
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
public class StartOrStopProcessGroupsInfoJoin10 {
private String id;
private String state;
private Revision10 revision;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.joinupdateprocessor;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joinupdateprocessor
* @Projectfw-nifi
* @nameRevision17
* @Date2025/5/19 11:26
* @FilenameRevision17
*/
@Data
public class Revision17 {
private String version;
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.nifiapi.model.joinupdateprocessor;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.joinupdateprocessor
* @Projectfw-nifi
* @nameRunStatusOrStop
* @Date2025/5/19 11:25
* @FilenameRunStatusOrStop
*/
@Data
public class RunStatusOrStop17 {
private String state;
private Revision17 revision;
}

View File

@ -0,0 +1,11 @@
package com.hzya.frame.nifiapi.model.nifitemplates;
import lombok.Data;
import java.util.List;
@Data
public class NifiTemplates {
private List<Templates> templates;
private String generated;
}

View File

@ -0,0 +1,9 @@
package com.hzya.frame.nifiapi.model.nifitemplates;
import lombok.Data;
@Data
public class Permissions {
private String canRead;
private String canWrite;
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.nifiapi.model.nifitemplates;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class Template {
private String uri;
private String id;
private String groupId;
private String name;
private String description;
private String timestamp;
@JsonProperty("encoding-version")
private String encodingVersion;
}

View File

@ -0,0 +1,10 @@
package com.hzya.frame.nifiapi.model.nifitemplates;
import lombok.Data;
@Data
public class Templates {
private String id;
private Permissions permissions;
private Template template;
}

View File

@ -0,0 +1,30 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class AggregateSnapshot {
private String id;
private String groupId;
private String name;
private String type;
private String runStatus;
private String executionNode;
private String bytesRead;
private String bytesWritten;
private String read;
private String written;
private String flowFilesIn;
private String bytesIn;
private String input;
private String flowFilesOut;
private String bytesOut;
private String output;
private String taskCount;
private String tasksDurationNanos;
private String tasks;
private String tasksDuration;
private String activeThreadCount;
private String terminatedThreadCount;
private ProcessingPerformanceStatus processingPerformanceStatus;
}

View File

@ -0,0 +1,10 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class AllowableValue {
private String displayName;
private String value;
private String description;
}

View File

@ -0,0 +1,9 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class AllowableValues {
private AllowableValue allowableValue;
private String canRead;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
import java.util.List;
@Data
public class AttributesToIgnore {
private String name;
private String displayName;
private String description;
private String required;
private String sensitive;
private String dynamic;
private String supportsEl;
private String expressionLanguageScope;
private List<String> dependencies;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
import java.util.List;
@Data
public class AttributesToIgnoreRegex {
private String name;
private String displayName;
private String description;
private String required;
private String sensitive;
private String dynamic;
private String supportsEl;
private String expressionLanguageScope;
private List<String> dependencies;
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
import java.util.List;
@Data
public class AttributesToLog {
private String name;
private String displayName;
private String description;
private String required;
private String sensitive;
private String dynamic;
private String supportsEl;
private String expressionLanguageScope;
private List<String> dependencies;
}

View File

@ -0,0 +1,19 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
import java.util.List;
@Data
public class AttributesToLogRegex {
private String name;
private String displayName;
private String description;
private String defaultValue;
private String required;
private String sensitive;
private String dynamic;
private String supportsEl;
private String expressionLanguageScope;
private List<String> dependencies;
}

View File

@ -0,0 +1,9 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class Breadcrumb {
private String id;
private String name;
}

View File

@ -0,0 +1,11 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class Breadcrumb2 {
private String id;
private Permissions2 permissions;
private Breadcrumb3 breadcrumb;
private ParentBreadcrumb2 parentBreadcrumb;
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.nifi.model.processgroupid
* @Projectfw-nifi
* @nameBreadcrumb3
* @Date2025/5/14 17:57
* @FilenameBreadcrumb3
*/
@Data
public class Breadcrumb3 {
private String id;
private String name;
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class Bulletin {
private String id;
private String category;
private String groupId;
private String sourceId;
private String sourceName;
private String level;
private String message;
private String timestamp;
}

View File

@ -0,0 +1,13 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class Bulletins {
private String id;
private String groupId;
private String sourceId;
private String timestamp;
private String canRead;
private Bulletin bulletin;
}

View File

@ -0,0 +1,10 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
@Data
public class Bundle {
private String group;
private String artifact;
private String version;
}

View File

@ -0,0 +1,19 @@
package com.hzya.frame.nifiapi.model.processgroupid;
import lombok.Data;
import java.util.List;
@Data
public class CharacterSet {
private String name;
private String displayName;
private String description;
private String defaultValue;
private String required;
private String sensitive;
private String dynamic;
private String supportsEl;
private String expressionLanguageScope;
private List<String> dependencies;
}

Some files were not shown because too many files have changed in this diff Show More