Compare commits
34 Commits
Author | SHA1 | Date |
---|---|---|
|
ea26bbe890 | |
|
39854353ef | |
|
2c12cbab6f | |
|
f08165a763 | |
|
f24dc58da2 | |
|
3d25eba30e | |
|
6be7091e2a | |
|
bdd278d786 | |
|
1751d24439 | |
|
162e182914 | |
|
ddee0aa867 | |
|
14e35993ee | |
|
861dbc1a5a | |
|
dd15e0fe95 | |
|
bd8f7e8a88 | |
|
9226681f78 | |
|
c5182abbff | |
|
03cb995c58 | |
|
8ed7373134 | |
|
b038b7e0c2 | |
|
0b13fc0432 | |
|
7409f90e2f | |
|
98efa0a7c9 | |
|
55d5d4399d | |
|
97a4f62a8d | |
|
6c07a69aa7 | |
|
993ef052dd | |
|
4f8936140a | |
|
cb716e6734 | |
|
118aa26aee | |
|
8782307a64 | |
|
686a58a8e7 | |
|
6212f3535c | |
|
22c728657f |
|
@ -60,9 +60,8 @@ $RECYCLE.BIN/
|
||||||
/common/target/
|
/common/target/
|
||||||
/buildpackage/target/
|
/buildpackage/target/
|
||||||
/webapp/target/
|
/webapp/target/
|
||||||
|
/E:/yongansystem/log/2024-10-15/
|
||||||
/base-buildpackage/target/
|
/base-buildpackage/target/
|
||||||
/base-common/target/
|
/base-common/target/
|
||||||
/base-core/target/
|
/base-core/target/
|
||||||
/base-webapp/target/classes/com/hzya/frame/
|
|
||||||
/fw-weixin/target/
|
/fw-weixin/target/
|
||||||
/E:/yongansystem/log/2024-10-15/
|
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
<?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>
|
|
||||||
<artifactId>kangarooDataCenterV3</artifactId>
|
|
||||||
<groupId>com.hzya.frame</groupId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>base-buildpackage</artifactId>
|
|
||||||
<packaging>war</packaging>
|
|
||||||
<version>${revision}</version>
|
|
||||||
<!-- 统一管理依赖版本-->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hzya.frame</groupId>
|
|
||||||
<artifactId>base-webapp</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>dev</id> <!--开发环境-->
|
|
||||||
<properties>
|
|
||||||
<profile.active>dev</profile.active>
|
|
||||||
</properties>
|
|
||||||
<activation>
|
|
||||||
<activeByDefault>true</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>llg</id> <!--吕磊钢-->
|
|
||||||
<properties>
|
|
||||||
<profile.active>llg</profile.active>
|
|
||||||
</properties>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>xel</id> <!--xel-->
|
|
||||||
<properties>
|
|
||||||
<profile.active>xel</profile.active>
|
|
||||||
</properties>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>zqtlocal</id> <!--曾庆拓-->
|
|
||||||
<properties>
|
|
||||||
<profile.active>zqtlocal</profile.active>
|
|
||||||
</properties>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
</profiles>
|
|
||||||
<build>
|
|
||||||
<finalName>kangarooDataCenterV3</finalName>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,23 +0,0 @@
|
||||||
#######################澳星环境#######################
|
|
||||||
logging:
|
|
||||||
#日志级别 指定目录级别
|
|
||||||
level:
|
|
||||||
root: info
|
|
||||||
encodings: GBK
|
|
||||||
file:
|
|
||||||
# 日志保存路径
|
|
||||||
path: E:\yongansystem\log
|
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
dynamic:
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/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: 62e4295b615a30dbf3b8ee96f41c820b
|
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
|
||||||
savefile:
|
|
||||||
# 文件保存路径
|
|
||||||
path: E:\yongansystem\file
|
|
||||||
zt:
|
|
||||||
url: http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
|
@ -1,146 +0,0 @@
|
||||||
package com.hzya.frame;
|
|
||||||
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.util.AESUtil;
|
|
||||||
import org.apache.http.HttpEntity;
|
|
||||||
import org.apache.http.client.config.RequestConfig;
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
import org.apache.http.client.methods.HttpGet;
|
|
||||||
import org.apache.http.client.methods.HttpPut;
|
|
||||||
import org.apache.http.entity.StringEntity;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
|
||||||
import org.apache.http.impl.client.HttpClientBuilder;
|
|
||||||
import org.apache.http.impl.client.HttpClients;
|
|
||||||
import org.apache.http.util.EntityUtils;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName dsasas
|
|
||||||
* @Description
|
|
||||||
* @Author llg
|
|
||||||
* Date 2023/7/16 8:18 上午
|
|
||||||
*/
|
|
||||||
//@RunWith(SpringRunner.class)
|
|
||||||
//@SpringBootTest(classes = {WebappApplication.class})
|
|
||||||
public class temButtom {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void test01() {
|
|
||||||
String a = AESUtil.encrypt("hzya@1314");
|
|
||||||
System.out.println(a);
|
|
||||||
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
|
|
||||||
System.out.println(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void test02() {
|
|
||||||
// 1056162015172640840 -7858803986346327947 3178176833471791293 合同评审-待办测试(bdmanager 2024-10-22 16:45) 7743552636545550897 bdmanager 18058147870 pending start success 新增成功!
|
|
||||||
// success 更新待办为已办成功!
|
|
||||||
// task7803207f54ff047d6008dcce31c2628f 新增成功!
|
|
||||||
// 2024-10-24 2024-10-24
|
|
||||||
|
|
||||||
String phone ="19357235324";
|
|
||||||
String taskid ="task8b0c7ca72439bc9b0c1c89e8866c8275";
|
|
||||||
//token
|
|
||||||
Map<String, String> headers = new HashMap<>();
|
|
||||||
String token ="https://oapi.dingtalk.com/gettoken?appkey=dingxewtjaserj292ggu&appsecret=DuRw6EEEvhGXfr6Q8wN_x4025qKjrffIGCXF9KeCKKIID-LVSsR6_8KWMei6sug1";
|
|
||||||
String body = sendGet(token,headers);
|
|
||||||
JSONObject tokenobject = JSONObject.parseObject(body);
|
|
||||||
|
|
||||||
//钉钉id
|
|
||||||
headers = new HashMap<>();
|
|
||||||
//https://oapi.dingtalk.com/user/get_by_mobile?access_token=9abd3996cb103ba48dd8c69fea5473e7&mobile=15700100840
|
|
||||||
String ddid ="https://oapi.dingtalk.com/user/get_by_mobile?access_token="+tokenobject.get("access_token")+"&mobile="+phone;
|
|
||||||
String ddidbody = sendGet(ddid,headers);
|
|
||||||
JSONObject ddidobject = JSONObject.parseObject(ddidbody);
|
|
||||||
|
|
||||||
//人员id
|
|
||||||
headers = new HashMap<>();
|
|
||||||
//https://oapi.dingtalk.com/user/get?userid=111336474727636213&access_token=3d21a6614fb037a98542a537336e8149
|
|
||||||
String userid ="https://oapi.dingtalk.com/user/get?userid="+ddidobject.get("userid")+"&access_token="+tokenobject.get("access_token");
|
|
||||||
String useridbody = sendGet(userid,headers);
|
|
||||||
JSONObject useridobject = JSONObject.parseObject(useridbody);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
|
||||||
HttpPut httpPut = new HttpPut("https://api.dingtalk.com/v1.0/todo/users/"+useridobject.get("unionid")+"/tasks/"+taskid);
|
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000).setConnectionRequestTimeout(35000).setSocketTimeout(60000).build();
|
|
||||||
httpPut.setConfig(requestConfig);
|
|
||||||
httpPut.setHeader("Content-type", "application/json");
|
|
||||||
httpPut.setHeader("x-acs-dingtalk-access-token", tokenobject.getString("access_token"));
|
|
||||||
Map<String, Object> dataMap = new HashMap();
|
|
||||||
dataMap.put("done", true);
|
|
||||||
CloseableHttpResponse httpResponse = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
httpPut.setEntity(new StringEntity("{\"done\": true}"));
|
|
||||||
httpResponse = httpClient.execute(httpPut);
|
|
||||||
HttpEntity entity = httpResponse.getEntity();
|
|
||||||
String results = EntityUtils.toString(entity);
|
|
||||||
System.out.println(results);
|
|
||||||
} catch (Exception var15) {
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
httpResponse.close();
|
|
||||||
httpClient.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private String sendGet(String url, Map<String, String> headers) {
|
|
||||||
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
|
||||||
// HttpClient
|
|
||||||
CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build();
|
|
||||||
HttpGet get = new HttpGet(url.toString());
|
|
||||||
CloseableHttpResponse response = null;
|
|
||||||
|
|
||||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build();
|
|
||||||
get.setConfig(requestConfig);//设置请求参数【超时时间】
|
|
||||||
if (headers != null && headers.size() > 0) {
|
|
||||||
for (String key : headers.keySet()) {
|
|
||||||
get.setHeader(key, headers.get(key));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
StringBuilder body = new StringBuilder();
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
response = closeableHttpClient.execute(get);
|
|
||||||
HttpEntity entity = response.getEntity();
|
|
||||||
body.append(EntityUtils.toString(entity,"UTF-8"));
|
|
||||||
} catch (Exception e) {
|
|
||||||
body.append(e.getMessage());
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
// 关闭响应对象
|
|
||||||
if (response != null) {
|
|
||||||
response.close();
|
|
||||||
}
|
|
||||||
// 关闭响应对象
|
|
||||||
if (closeableHttpClient != null) {
|
|
||||||
closeableHttpClient.close();
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return body.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
package com.hzya.frame.mdm.entity;
|
|
||||||
|
|
||||||
|
|
||||||
public class MdmFiledsRuleDto {
|
|
||||||
/** 主数据模版ID */
|
|
||||||
private String mdmId;
|
|
||||||
/** 模版数据库id */
|
|
||||||
private String dbId;
|
|
||||||
/** 模版数据库字段id */
|
|
||||||
private String filedId;
|
|
||||||
/** 字段类型 1、select 2、treeselect */
|
|
||||||
private String filedType;
|
|
||||||
/** 字段服务 */
|
|
||||||
private String typeFiled;
|
|
||||||
/** 字段服务 */
|
|
||||||
private String id;
|
|
||||||
/** 字段服务 */
|
|
||||||
private String dataId;
|
|
||||||
|
|
||||||
public String getMdmId() {
|
|
||||||
return mdmId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMdmId(String mdmId) {
|
|
||||||
this.mdmId = mdmId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDbId() {
|
|
||||||
return dbId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDbId(String dbId) {
|
|
||||||
this.dbId = dbId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFiledId() {
|
|
||||||
return filedId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFiledId(String filedId) {
|
|
||||||
this.filedId = filedId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFiledType() {
|
|
||||||
return filedType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFiledType(String filedType) {
|
|
||||||
this.filedType = filedType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTypeFiled() {
|
|
||||||
return typeFiled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTypeFiled(String typeFiled) {
|
|
||||||
this.typeFiled = typeFiled;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataId() {
|
|
||||||
return dataId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDataId(String dataId) {
|
|
||||||
this.dataId = dataId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程分类;对应数环通项目分类(sys_flow_class: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowClassDao extends IBaseDao<SysFlowClassEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程分类权限表(sys_flow_class_rule: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowClassRuleDao extends IBaseDao<SysFlowClassRuleEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程主表;流程就是数环通的Linkup(sys_flow: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:19
|
|
||||||
*/
|
|
||||||
public interface ISysFlowDao extends IBaseDao<SysFlowEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* nifi常量(sys_flow_nifi_constant: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowNifiConstantDao extends IBaseDao<SysFlowNifiConstantEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程步骤账户表(sys_flow_step_account: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepAccountDao extends IBaseDao<SysFlowStepAccountEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 映射信息表体(sys_flow_step_config_b: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepConfigBDao extends IBaseDao<SysFlowStepConfigBEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 映射信息主表(sys_flow_step_config: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepConfigDao extends IBaseDao<SysFlowStepConfigEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程步骤信息(sys_flow_step: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepDao extends IBaseDao<SysFlowStepEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 步骤关联关系表(sys_flow_step_relation: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepRelationDao extends IBaseDao<SysFlowStepRelationEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowClassDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 流程分类;对应数环通项目分类(SysFlowClass)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowClassDaoImpl")
|
|
||||||
public class SysFlowClassDaoImpl extends MybatisGenericDao<SysFlowClassEntity, String> implements ISysFlowClassDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowClassRuleDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 流程分类权限表(SysFlowClassRule)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowClassRuleDaoImpl")
|
|
||||||
public class SysFlowClassRuleDaoImpl extends MybatisGenericDao<SysFlowClassRuleEntity, String> implements ISysFlowClassRuleDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 流程主表;流程就是数环通的Linkup(SysFlow)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:21
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowDaoImpl")
|
|
||||||
public class SysFlowDaoImpl extends MybatisGenericDao<SysFlowEntity, String> implements ISysFlowDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowNifiConstantDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* nifi常量(SysFlowNifiConstant)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowNifiConstantDaoImpl")
|
|
||||||
public class SysFlowNifiConstantDaoImpl extends MybatisGenericDao<SysFlowNifiConstantEntity, String> implements ISysFlowNifiConstantDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepAccountDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 流程步骤账户表(SysFlowStepAccount)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowStepAccountDaoImpl")
|
|
||||||
public class SysFlowStepAccountDaoImpl extends MybatisGenericDao<SysFlowStepAccountEntity, String> implements ISysFlowStepAccountDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepConfigBDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 映射信息表体(SysFlowStepConfigB)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowStepConfigBDaoImpl")
|
|
||||||
public class SysFlowStepConfigBDaoImpl extends MybatisGenericDao<SysFlowStepConfigBEntity, String> implements ISysFlowStepConfigBDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepConfigDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 映射信息主表(SysFlowStepConfig)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowStepConfigDaoImpl")
|
|
||||||
public class SysFlowStepConfigDaoImpl extends MybatisGenericDao<SysFlowStepConfigEntity, String> implements ISysFlowStepConfigDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 流程步骤信息(SysFlowStep)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowStepDaoImpl")
|
|
||||||
public class SysFlowStepDaoImpl extends MybatisGenericDao<SysFlowStepEntity, String> implements ISysFlowStepDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepRelationDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 步骤关联关系表(SysFlowStepRelation)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysFlowStepRelationDaoImpl")
|
|
||||||
public class SysFlowStepRelationDaoImpl extends MybatisGenericDao<SysFlowStepRelationEntity, String> implements ISysFlowStepRelationDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 流程分类;对应数环通项目分类(SysFlowClass)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public class SysFlowClassEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 分类名称 */
|
|
||||||
private String name;
|
|
||||||
/** 上级id */
|
|
||||||
private String parentId;
|
|
||||||
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParentId() {
|
|
||||||
return parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentId(String parentId) {
|
|
||||||
this.parentId = parentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,195 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowClassDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowClassEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowClassEntity" >
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id = "SysFlowClassEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,create_user_id
|
|
||||||
,create_time
|
|
||||||
,modify_user_id
|
|
||||||
,modify_time
|
|
||||||
,sts
|
|
||||||
,name
|
|
||||||
,parent_id
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowClassEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowClassEntity_Base_Column_List" />
|
|
||||||
from sys_flow_class
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity">
|
|
||||||
select count(1) from sys_flow_class
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowClassEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowClassEntity_Base_Column_List" />
|
|
||||||
from sys_flow_class
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
||||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
||||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
|
||||||
<if test="parentId != null and parentId != ''"> and parent_id like concat('%',#{parentId},'%') </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowClassentity_list_or" resultMap="get-SysFlowClassEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowClassEntity_Base_Column_List" />
|
|
||||||
from sys_flow_class
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> or name = #{name} </if>
|
|
||||||
<if test="parentId != null and parentId != ''"> or parent_id = #{parentId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_class(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">id ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
|
|
||||||
<if test="create_time != null">create_time ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
|
|
||||||
<if test="modify_time != null">modify_time ,</if>
|
|
||||||
<if test="sts != null and sts != ''">sts ,</if>
|
|
||||||
<if test="name != null and name != ''">name ,</if>
|
|
||||||
<if test="parentId != null and parentId != ''">parent_id ,</if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">#{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null">#{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null">#{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''">#{sts} ,</if>
|
|
||||||
<if test="name != null and name != ''">#{name} ,</if>
|
|
||||||
<if test="parentId != null and parentId != ''">#{parentId} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_class a WHERE
|
|
||||||
a.sts = 'Y' ),1),
|
|
||||||
</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_class(create_user_id, create_time, modify_user_id, modify_time, sts, name, parent_id, sts)
|
|
||||||
values
|
|
||||||
<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.parentId}, 'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_class(create_user_id, create_time, modify_user_id, modify_time, sts, name, parent_id)
|
|
||||||
values
|
|
||||||
<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.parentId})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
name = values(name),
|
|
||||||
parent_id = values(parent_id)</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity" >
|
|
||||||
update sys_flow_class set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
||||||
<if test="name != null and name != ''"> name = #{name},</if>
|
|
||||||
<if test="parentId != null and parentId != ''"> parent_id = #{parentId},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity" >
|
|
||||||
update sys_flow_class set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowClassEntity" >
|
|
||||||
update sys_flow_class set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete from sys_flow_class where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,75 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 流程分类权限表(SysFlowClassRule)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public class SysFlowClassRuleEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 流程分类id */
|
|
||||||
private String flowClassId;
|
|
||||||
/** 用户id */
|
|
||||||
private String userId;
|
|
||||||
/** 用户名 */
|
|
||||||
private String userName;
|
|
||||||
/** 用户编码 */
|
|
||||||
private String userCode;
|
|
||||||
/** 头像 */
|
|
||||||
private String profileIcon;
|
|
||||||
//权限列表
|
|
||||||
List<SysFlowClassRuleEntity> ruleList;
|
|
||||||
public String getFlowClassId() {
|
|
||||||
return flowClassId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFlowClassId(String flowClassId) {
|
|
||||||
this.flowClassId = flowClassId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName() {
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserName(String userName) {
|
|
||||||
this.userName = userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserCode() {
|
|
||||||
return userCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserCode(String userCode) {
|
|
||||||
this.userCode = userCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProfileIcon() {
|
|
||||||
return profileIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProfileIcon(String profileIcon) {
|
|
||||||
this.profileIcon = profileIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<SysFlowClassRuleEntity> getRuleList() {
|
|
||||||
return ruleList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRuleList(List<SysFlowClassRuleEntity> ruleList) {
|
|
||||||
this.ruleList = ruleList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,247 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowClassRuleDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowClassRuleEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="flowClassId" column="flow_class_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="userCode" column="user_code" jdbcType="VARCHAR"/>
|
|
||||||
<result property="profileIcon" column="profile_icon" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id="SysFlowClassRuleEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,create_user_id
|
|
||||||
,create_time
|
|
||||||
,modify_user_id
|
|
||||||
,modify_time
|
|
||||||
,sts
|
|
||||||
,flow_class_id
|
|
||||||
,user_id
|
|
||||||
,user_name
|
|
||||||
,user_code
|
|
||||||
,profile_icon
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowClassRuleEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowClassRuleEntity_Base_Column_List"/>
|
|
||||||
from sys_flow_class_rule
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">and flow_class_id = #{flowClassId}</if>
|
|
||||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
|
||||||
<if test="userName != null and userName != ''">and user_name = #{userName}</if>
|
|
||||||
<if test="userCode != null and userCode != ''">and user_code = #{userCode}</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">and profile_icon = #{profileIcon}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
select count(1) from sys_flow_class_rule
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">and flow_class_id = #{flowClassId}</if>
|
|
||||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
|
||||||
<if test="userName != null and userName != ''">and user_name = #{userName}</if>
|
|
||||||
<if test="userCode != null and userCode != ''">and user_code = #{userCode}</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">and profile_icon = #{profileIcon}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowClassRuleEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowClassRuleEntity_Base_Column_List"/>
|
|
||||||
from sys_flow_class_rule
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
|
|
||||||
concat('%',#{create_user_id},'%')
|
|
||||||
</if>
|
|
||||||
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
|
|
||||||
concat('%',#{modify_user_id},'%')
|
|
||||||
</if>
|
|
||||||
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">and flow_class_id like concat('%',#{flowClassId},'%')
|
|
||||||
</if>
|
|
||||||
<if test="userId != null and userId != ''">and user_id like concat('%',#{userId},'%')</if>
|
|
||||||
<if test="userName != null and userName != ''">and user_name like concat('%',#{userName},'%')</if>
|
|
||||||
<if test="userCode != null and userCode != ''">and user_code like concat('%',#{userCode},'%')</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">and profile_icon like concat('%',#{profileIcon},'%')
|
|
||||||
</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowClassRuleentity_list_or" resultMap="get-SysFlowClassRuleEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowClassRuleEntity_Base_Column_List"/>
|
|
||||||
from sys_flow_class_rule
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">or id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">or create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">or modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">or sts = #{sts}</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">or flow_class_id = #{flowClassId}</if>
|
|
||||||
<if test="userId != null and userId != ''">or user_id = #{userId}</if>
|
|
||||||
<if test="userName != null and userName != ''">or user_name = #{userName}</if>
|
|
||||||
<if test="userCode != null and userCode != ''">or user_code = #{userCode}</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">or profile_icon = #{profileIcon}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity" keyProperty="id"
|
|
||||||
useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_class_rule(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">id ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
|
|
||||||
<if test="create_time != null">create_time ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
|
|
||||||
<if test="modify_time != null">modify_time ,</if>
|
|
||||||
<if test="sts != null and sts != ''">sts ,</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">flow_class_id ,</if>
|
|
||||||
<if test="userId != null and userId != ''">user_id ,</if>
|
|
||||||
<if test="userName != null and userName != ''">user_name ,</if>
|
|
||||||
<if test="userCode != null and userCode != ''">user_code ,</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">profile_icon ,</if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">#{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null">#{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null">#{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''">#{sts} ,</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">#{flowClassId} ,</if>
|
|
||||||
<if test="userId != null and userId != ''">#{userId} ,</if>
|
|
||||||
<if test="userName != null and userName != ''">#{userName} ,</if>
|
|
||||||
<if test="userCode != null and userCode != ''">#{userCode} ,</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">#{profileIcon} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_class_rule a WHERE a.sts = 'Y' ),1),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_class_rule(create_user_id, create_time, modify_user_id, modify_time, sts, flow_class_id,
|
|
||||||
user_id, user_name, user_code, profile_icon, sts)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.flowClassId},#{entity.userId},#{entity.userName},#{entity.userCode},#{entity.profileIcon},
|
|
||||||
'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_class_rule(create_user_id, create_time, modify_user_id, modify_time, sts, flow_class_id,
|
|
||||||
user_id, user_name, user_code, profile_icon)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.flowClassId},#{entity.userId},#{entity.userName},#{entity.userCode},#{entity.profileIcon})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
flow_class_id = values(flow_class_id),
|
|
||||||
user_id = values(user_id),
|
|
||||||
user_name = values(user_name),
|
|
||||||
user_code = values(user_code),
|
|
||||||
profile_icon = values(profile_icon)
|
|
||||||
</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
update sys_flow_class_rule set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null">create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null">modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''">sts = #{sts},</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">flow_class_id = #{flowClassId},</if>
|
|
||||||
<if test="userId != null and userId != ''">user_id = #{userId},</if>
|
|
||||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
||||||
<if test="userCode != null and userCode != ''">user_code = #{userCode},</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">profile_icon = #{profileIcon},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
update sys_flow_class_rule
|
|
||||||
set sts= 'N',
|
|
||||||
modify_time = #{modify_time},
|
|
||||||
modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity">
|
|
||||||
update sys_flow_class_rule set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="flowClassId != null and flowClassId != ''">and flow_class_id = #{flowClassId}</if>
|
|
||||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
|
||||||
<if test="userName != null and userName != ''">and user_name = #{userName}</if>
|
|
||||||
<if test="userCode != null and userCode != ''">and user_code = #{userCode}</if>
|
|
||||||
<if test="profileIcon != null and profileIcon != ''">and profile_icon = #{profileIcon}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete
|
|
||||||
from sys_flow_class_rule
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 流程主表;流程就是数环通的Linkup(SysFlow)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:23
|
|
||||||
*/
|
|
||||||
public class SysFlowEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 流程名称 */
|
|
||||||
private String name;
|
|
||||||
/** 流程分类id */
|
|
||||||
private String classId;
|
|
||||||
private String className;
|
|
||||||
/** 触发方式id */
|
|
||||||
private String triggerModeId;
|
|
||||||
private String triggerModeName;
|
|
||||||
/** 应用组id */
|
|
||||||
private String nifiGroupId;
|
|
||||||
/** 流程描述 */
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
//状态, 启动/停止
|
|
||||||
private String status;
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClassId() {
|
|
||||||
return classId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClassId(String classId) {
|
|
||||||
this.classId = classId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTriggerModeId() {
|
|
||||||
return triggerModeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTriggerModeId(String triggerModeId) {
|
|
||||||
this.triggerModeId = triggerModeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNifiGroupId() {
|
|
||||||
return nifiGroupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNifiGroupId(String nifiGroupId) {
|
|
||||||
this.nifiGroupId = nifiGroupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClassName() {
|
|
||||||
return className;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClassName(String className) {
|
|
||||||
this.className = className;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTriggerModeName() {
|
|
||||||
return triggerModeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTriggerModeName(String triggerModeName) {
|
|
||||||
this.triggerModeName = triggerModeName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,241 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowEntity" >
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
|
||||||
<result property="classId" column="class_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="className" column="className" jdbcType="VARCHAR"/>
|
|
||||||
<result property="triggerModeId" column="trigger_mode_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="nifiGroupId" column="nifi_group_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="description" column="description" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id = "SysFlowEntity_Base_Column_List">
|
|
||||||
sf.id
|
|
||||||
,sf.create_user_id
|
|
||||||
,sf.create_time
|
|
||||||
,sf.modify_user_id
|
|
||||||
,sf.modify_time
|
|
||||||
,sf.sts
|
|
||||||
,sf.name
|
|
||||||
,sf.status
|
|
||||||
,sf.class_id
|
|
||||||
,sfc.name as className
|
|
||||||
,sf.trigger_mode_id
|
|
||||||
,sf.nifi_group_id
|
|
||||||
,sf.description
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowEntity_Base_Column_List" />
|
|
||||||
from sys_flow sf
|
|
||||||
left join sys_flow_class sfc on sfc.id = sf.class_id
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and sf.id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and sf.create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and sf.create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and sf.modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and sf.modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sf.sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and sf.name = #{name} </if>
|
|
||||||
<if test="status != null and status != ''"> and sf.status = #{status} </if>
|
|
||||||
<if test="classId != null and classId != ''"> and sf.class_id = #{classId} </if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''"> and sf.trigger_mode_id = #{triggerModeId} </if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''"> and sf.nifi_group_id = #{nifiGroupId} </if>
|
|
||||||
<if test="description != null and description != ''"> and sf.description = #{description} </if>
|
|
||||||
and sf.sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sf.sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity">
|
|
||||||
select count(1) from sys_flow
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="status != null and status != ''"> and status = #{status} </if>
|
|
||||||
<if test="classId != null and classId != ''"> and class_id = #{classId} </if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''"> and trigger_mode_id = #{triggerModeId} </if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''"> and nifi_group_id = #{nifiGroupId} </if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowEntity_Base_Column_List" />
|
|
||||||
from sys_flow sf
|
|
||||||
left join sys_flow_class sfc on sfc.id = sf.class_id
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and sf.id like concat('%',#{id},'%') </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and sf.create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
||||||
<if test="create_time != null"> and sf.create_time like concat('%',#{create_time},'%') </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and sf.modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
||||||
<if test="modify_time != null"> and sf.modify_time like concat('%',#{modify_time},'%') </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sf.sts like concat('%',#{sts},'%') </if>
|
|
||||||
<if test="name != null and name != ''"> and sf.name like concat('%',#{name},'%') </if>
|
|
||||||
<if test="status != null and status != ''"> and sf.status like concat('%',#{status},'%') </if>
|
|
||||||
<if test="classId != null and classId != ''"> and sf.class_id like concat('%',#{classId},'%') </if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''"> and sf.trigger_mode_id like concat('%',#{triggerModeId},'%') </if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''"> and sf.nifi_group_id like concat('%',#{nifiGroupId},'%') </if>
|
|
||||||
<if test="description != null and description != ''"> and sf.description like concat('%',#{description},'%') </if>
|
|
||||||
and sf.sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sf.sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowentity_list_or" resultMap="get-SysFlowEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowEntity_Base_Column_List" />
|
|
||||||
from sys_flow sf
|
|
||||||
left join sys_flow_class sfc on sfc.id = sf.class_id
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> or sf.id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> or sf.create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> or sf.create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> or sf.modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> or sf.modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> or sf.sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> or sf.name = #{name} </if>
|
|
||||||
<if test="status != null and status != ''"> or sf.status = #{status} </if>
|
|
||||||
<if test="classId != null and classId != ''"> or sf.class_id = #{classId} </if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''"> or sf.trigger_mode_id = #{triggerModeId} </if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''"> or sf.nifi_group_id = #{nifiGroupId} </if>
|
|
||||||
<if test="description != null and description != ''"> or sf.description = #{description} </if>
|
|
||||||
and sf.sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">id ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
|
|
||||||
<if test="create_time != null">create_time ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
|
|
||||||
<if test="modify_time != null">modify_time ,</if>
|
|
||||||
<if test="sts != null and sts != ''">sts ,</if>
|
|
||||||
<if test="name != null and name != ''">name ,</if>
|
|
||||||
<if test="status != null and status != ''">status ,</if>
|
|
||||||
<if test="classId != null and classId != ''">class_id ,</if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''">trigger_mode_id ,</if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''">nifi_group_id ,</if>
|
|
||||||
<if test="description != null and description != ''">description ,</if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">#{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null">#{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null">#{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''">#{sts} ,</if>
|
|
||||||
<if test="name != null and name != ''">#{name} ,</if>
|
|
||||||
<if test="status != null and status != ''">#{status} ,</if>
|
|
||||||
<if test="classId != null and classId != ''">#{classId} ,</if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''">#{triggerModeId} ,</if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''">#{nifiGroupId} ,</if>
|
|
||||||
<if test="description != null and description != ''">#{description} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow a WHERE a.sts = 'Y' ),1),
|
|
||||||
</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow(create_user_id, create_time, modify_user_id, modify_time, sts, name,status, class_id, trigger_mode_id, nifi_group_id, description, sts)
|
|
||||||
values
|
|
||||||
<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.status},#{entity.classId},#{entity.triggerModeId},#{entity.nifiGroupId},#{entity.description}, 'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow(create_user_id, create_time, modify_user_id, modify_time, sts, name, status,class_id, trigger_mode_id, nifi_group_id, description)
|
|
||||||
values
|
|
||||||
<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.status},#{entity.classId},#{entity.triggerModeId},#{entity.nifiGroupId},#{entity.description})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
name = values(name),
|
|
||||||
class_id = values(class_id),
|
|
||||||
trigger_mode_id = values(trigger_mode_id),
|
|
||||||
nifi_group_id = values(nifi_group_id),
|
|
||||||
description = values(description)</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity" >
|
|
||||||
update sys_flow set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
||||||
<if test="name != null and name != ''"> name = #{name},</if>
|
|
||||||
<if test="status != null and status != ''"> status = #{status},</if>
|
|
||||||
<if test="classId != null and classId != ''"> class_id = #{classId},</if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''"> trigger_mode_id = #{triggerModeId},</if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''"> nifi_group_id = #{nifiGroupId},</if>
|
|
||||||
<if test="description != null and description != ''"> description = #{description},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity" >
|
|
||||||
update sys_flow set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowEntity" >
|
|
||||||
update sys_flow set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="classId != null and classId != ''"> and class_id = #{classId} </if>
|
|
||||||
<if test="triggerModeId != null and triggerModeId != ''"> and trigger_mode_id = #{triggerModeId} </if>
|
|
||||||
<if test="nifiGroupId != null and nifiGroupId != ''"> and nifi_group_id = #{nifiGroupId} </if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete from sys_flow where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* nifi常量(SysFlowNifiConstant)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public class SysFlowNifiConstantEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 键 */
|
|
||||||
private String nifiKey;
|
|
||||||
/** 值 */
|
|
||||||
private String nifiValue;
|
|
||||||
/** 显示值 */
|
|
||||||
private String showValue;
|
|
||||||
/** 描述 */
|
|
||||||
private String description;
|
|
||||||
/** 分类 */
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
|
|
||||||
public String getNifiKey() {
|
|
||||||
return nifiKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNifiKey(String nifiKey) {
|
|
||||||
this.nifiKey = nifiKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNifiValue() {
|
|
||||||
return nifiValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNifiValue(String nifiValue) {
|
|
||||||
this.nifiValue = nifiValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getShowValue() {
|
|
||||||
return showValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShowValue(String showValue) {
|
|
||||||
this.showValue = showValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,226 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowNifiConstantDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowNifiConstantEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity" >
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="nifiKey" column="nifi_key" jdbcType="VARCHAR"/>
|
|
||||||
<result property="nifiValue" column="nifi_value" jdbcType="VARCHAR"/>
|
|
||||||
<result property="showValue" column="show_value" jdbcType="VARCHAR"/>
|
|
||||||
<result property="description" column="description" jdbcType="VARCHAR"/>
|
|
||||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id = "SysFlowNifiConstantEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,create_user_id
|
|
||||||
,create_time
|
|
||||||
,modify_user_id
|
|
||||||
,modify_time
|
|
||||||
,sts
|
|
||||||
,nifi_key
|
|
||||||
,nifi_value
|
|
||||||
,show_value
|
|
||||||
,description
|
|
||||||
,type
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowNifiConstantEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowNifiConstantEntity_Base_Column_List" />
|
|
||||||
from sys_flow_nifi_constant
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> and nifi_key = #{nifiKey} </if>
|
|
||||||
<if test="nifiValue != null and value != ''"> and nifi_value = #{nifiValue} </if>
|
|
||||||
<if test="showValue != null and showValue != ''"> and show_value = #{showValue} </if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description} </if>
|
|
||||||
<if test="type != null and type != ''"> and type = #{type} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity">
|
|
||||||
select count(1) from sys_flow_nifi_constant
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> and nifi_key = #{nifiKey} </if>
|
|
||||||
<if test="nifiValue != null and nifiValue != ''"> and nifi_value = #{nifiValue} </if>
|
|
||||||
<if test="showValue != null and showValue != ''"> and show_value = #{showValue} </if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description} </if>
|
|
||||||
<if test="type != null and type != ''"> and type = #{type} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowNifiConstantEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowNifiConstantEntity_Base_Column_List" />
|
|
||||||
from sys_flow_nifi_constant
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
||||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
||||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> and nifi_key like concat('%',#{nifiKey},'%') </if>
|
|
||||||
<if test="nifiValue != null and nifiValue != ''"> and nifi_value like concat('%',#{nifiValue},'%') </if>
|
|
||||||
<if test="showValue != null and showValue != ''"> and show_value like concat('%',#{showValue},'%') </if>
|
|
||||||
<if test="description != null and description != ''"> and description like concat('%',#{description},'%') </if>
|
|
||||||
<if test="type != null and type != ''"> and type like concat('%',#{type},'%') </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowNifiConstantentity_list_or" resultMap="get-SysFlowNifiConstantEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowNifiConstantEntity_Base_Column_List" />
|
|
||||||
from sys_flow_nifi_constant
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> or nifi_key = #{nifiKey} </if>
|
|
||||||
<if test="nifiValue != null and nifiValue != ''"> or nifi_value = #{nifiValue} </if>
|
|
||||||
<if test="showValue != null and showValue != ''"> or show_value = #{showValue} </if>
|
|
||||||
<if test="description != null and description != ''"> or description = #{description} </if>
|
|
||||||
<if test="type != null and type != ''"> or type = #{type} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_nifi_constant(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> id , </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
|
||||||
<if test="create_time != null"> create_time , </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
|
||||||
<if test="modify_time != null"> modify_time , </if>
|
|
||||||
<if test="sts != null and sts != ''"> sts , </if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> nifi_key , </if>
|
|
||||||
<if test="nifiValue != null and nifiValue != ''"> nifi_value , </if>
|
|
||||||
<if test="showValue != null and showValue != ''"> show_value , </if>
|
|
||||||
<if test="description != null and description != ''"> description , </if>
|
|
||||||
<if test="type != null and type != ''"> type , </if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> #{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null"> #{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> #{nifiKey} ,</if>
|
|
||||||
<if test="nifiValue != null and nifiValue != ''"> #{nifiValue} ,</if>
|
|
||||||
<if test="showValue != null and showValue != ''"> #{showValue} ,</if>
|
|
||||||
<if test="description != null and description != ''"> #{description} ,</if>
|
|
||||||
<if test="type != null and type != ''"> #{type} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_nifi_constant a WHERE a.sts = 'Y' ),1),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_nifi_constant(create_user_id, create_time, modify_user_id, modify_time, sts, nifi_key, nifi_value, show_value, description, type, sts)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.nifiKey},#{entity.nifiValue},#{entity.showValue},#{entity.description},#{entity.type}, 'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_nifi_constant(create_user_id, create_time, modify_user_id, modify_time, sts, nifi_key, nifi_value, show_value, description, type)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.nifiKey},#{entity.nifiValue},#{entity.showValue},#{entity.description},#{entity.type})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
nifi_key = values(nifiKey),
|
|
||||||
nifi_value = values(nifiValue),
|
|
||||||
show_value = values(show_value),
|
|
||||||
description = values(description),
|
|
||||||
type = values(type)</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity" >
|
|
||||||
update sys_flow_nifi_constant set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> nifi_key = #{nifiKey},</if>
|
|
||||||
<if test="nifiValue != null and nifiValue != ''"> nifi_value = #{nifiValue},</if>
|
|
||||||
<if test="showValue != null and showValue != ''"> show_value = #{showValue},</if>
|
|
||||||
<if test="description != null and description != ''"> description = #{description},</if>
|
|
||||||
<if test="type != null and type != ''"> type = #{type},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity" >
|
|
||||||
update sys_flow_nifi_constant set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity" >
|
|
||||||
update sys_flow_nifi_constant set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="nifiKey != null and nifiKey != ''"> andnifi_ key = #{nifiKey} </if>
|
|
||||||
<if test="nifiValue != null and nifiValue != ''"> and nifi_value = #{nifiValue} </if>
|
|
||||||
<if test="showValue != null and showValue != ''"> and show_value = #{showValue} </if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description} </if>
|
|
||||||
<if test="type != null and type != ''"> and type = #{type} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete from sys_flow_nifi_constant where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,155 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 流程步骤账户表(SysFlowStepAccount)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public class SysFlowStepAccountEntity extends BaseEntity {
|
|
||||||
|
|
||||||
//流程id
|
|
||||||
private String flowId;
|
|
||||||
//流程步骤id
|
|
||||||
private String stepId;
|
|
||||||
//应用id
|
|
||||||
private String appId;
|
|
||||||
/** 账户名称 */
|
|
||||||
private String name;
|
|
||||||
/** ip地址 */
|
|
||||||
private String ipAddress;
|
|
||||||
/** 端口 */
|
|
||||||
private String port;
|
|
||||||
/** 数据库名称 */
|
|
||||||
private String dbName;
|
|
||||||
/** 用户名 */
|
|
||||||
private String userName;
|
|
||||||
/** 密码 */
|
|
||||||
private String password;
|
|
||||||
/** 数据库类型 */
|
|
||||||
private String dbType;
|
|
||||||
/** 应用key */
|
|
||||||
private String appKey;
|
|
||||||
/** 应用密钥 */
|
|
||||||
private String appSecret;
|
|
||||||
/** 企业id */
|
|
||||||
private String corpid;
|
|
||||||
/** 应用id */
|
|
||||||
private String agentid;
|
|
||||||
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIpAddress() {
|
|
||||||
return ipAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIpAddress(String ipAddress) {
|
|
||||||
this.ipAddress = ipAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPort() {
|
|
||||||
return port;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPort(String port) {
|
|
||||||
this.port = port;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDbName() {
|
|
||||||
return dbName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDbName(String dbName) {
|
|
||||||
this.dbName = dbName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName() {
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserName(String userName) {
|
|
||||||
this.userName = userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassword() {
|
|
||||||
return password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPassword(String password) {
|
|
||||||
this.password = password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDbType() {
|
|
||||||
return dbType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDbType(String dbType) {
|
|
||||||
this.dbType = dbType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppKey() {
|
|
||||||
return appKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppKey(String appKey) {
|
|
||||||
this.appKey = appKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppSecret() {
|
|
||||||
return appSecret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppSecret(String appSecret) {
|
|
||||||
this.appSecret = appSecret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCorpid() {
|
|
||||||
return corpid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCorpid(String corpid) {
|
|
||||||
this.corpid = corpid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAgentid() {
|
|
||||||
return agentid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAgentid(String 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,325 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowStepAccountDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowStepAccountEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity" >
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="ipAddress" column="ip_address" jdbcType="VARCHAR"/>
|
|
||||||
<result property="port" column="port" jdbcType="VARCHAR"/>
|
|
||||||
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="userName" column="user_name" 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="appKey" column="app_key" jdbcType="VARCHAR"/>
|
|
||||||
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
|
|
||||||
<result property="corpid" column="corpId" jdbcType="VARCHAR"/>
|
|
||||||
<result property="agentid" column="agentId" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id = "SysFlowStepAccountEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,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
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowStepAccountEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepAccountEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress} </if>
|
|
||||||
<if test="port != null and port != ''"> and port = #{port} </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="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="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
|
||||||
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
|
||||||
<if test="corpid != null and corpid != ''"> and corpId = #{corpid} </if>
|
|
||||||
<if test="agentid != null and agentid != ''"> and agentId = #{agentid} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity">
|
|
||||||
select count(1) from sys_flow_step_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress} </if>
|
|
||||||
<if test="port != null and port != ''"> and port = #{port} </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="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="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
|
||||||
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
|
||||||
<if test="corpid != null and corpid != ''"> and corpId = #{corpid} </if>
|
|
||||||
<if test="agentid != null and agentid != ''"> and agentId = #{agentid} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowStepAccountEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepAccountEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
||||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
||||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address like concat('%',#{ipAddress},'%') </if>
|
|
||||||
<if test="port != null and port != ''"> and port like concat('%',#{port},'%') </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="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="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="corpid != null and corpid != ''"> and corpId like concat('%',#{corpid},'%') </if>
|
|
||||||
<if test="agentid != null and agentid != ''"> and agentId like concat('%',#{agentid},'%') </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowStepAccountentity_list_or" resultMap="get-SysFlowStepAccountEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepAccountEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> or name = #{name} </if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> or ip_address = #{ipAddress} </if>
|
|
||||||
<if test="port != null and port != ''"> or port = #{port} </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="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="appKey != null and appKey != ''"> or app_key = #{appKey} </if>
|
|
||||||
<if test="appSecret != null and appSecret != ''"> or app_secret = #{appSecret} </if>
|
|
||||||
<if test="corpid != null and corpid != ''"> or corpId = #{corpid} </if>
|
|
||||||
<if test="agentid != null and agentid != ''"> or agentId = #{agentid} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_account(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> id , </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
|
||||||
<if test="create_time != null"> create_time , </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
|
||||||
<if test="modify_time != null"> modify_time , </if>
|
|
||||||
<if test="sts != null and sts != ''"> sts , </if>
|
|
||||||
<if test="name != null and name != ''"> name , </if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> ip_address , </if>
|
|
||||||
<if test="port != null and port != ''"> port , </if>
|
|
||||||
<if test="dbName != null and dbName != ''"> db_name , </if>
|
|
||||||
<if test="userName != null and userName != ''"> user_name , </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="appKey != null and appKey != ''"> app_key , </if>
|
|
||||||
<if test="appSecret != null and appSecret != ''"> app_secret , </if>
|
|
||||||
<if test="corpid != null and corpid != ''"> corpId , </if>
|
|
||||||
<if test="agentid != null and agentid != ''"> agentId , </if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> #{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null"> #{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
|
||||||
<if test="name != null and name != ''"> #{name} ,</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> #{ipAddress} ,</if>
|
|
||||||
<if test="port != null and port != ''"> #{port} ,</if>
|
|
||||||
<if test="dbName != null and dbName != ''"> #{dbName} ,</if>
|
|
||||||
<if test="userName != null and userName != ''"> #{userName} ,</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="appKey != null and appKey != ''"> #{appKey} ,</if>
|
|
||||||
<if test="appSecret != null and appSecret != ''"> #{appSecret} ,</if>
|
|
||||||
<if test="corpid != null and corpid != ''"> #{corpid} ,</if>
|
|
||||||
<if test="agentid != null and agentid != ''"> #{agentid} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step_account a WHERE a.sts = 'Y' ),1),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<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)
|
|
||||||
values
|
|
||||||
<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')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<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)
|
|
||||||
values
|
|
||||||
<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})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
name = values(name),
|
|
||||||
ip_address = values(ip_address),
|
|
||||||
port = values(port),
|
|
||||||
db_name = values(db_name),
|
|
||||||
user_name = values(user_name),
|
|
||||||
password = values(password),
|
|
||||||
flow_id = values(flow_id),
|
|
||||||
step_id = values(step_id),
|
|
||||||
app_id = values(app_id),
|
|
||||||
db_type = values(db_type),
|
|
||||||
app_key = values(app_key),
|
|
||||||
app_secret = values(app_secret),
|
|
||||||
corpId = values(corpId),
|
|
||||||
agentId = values(agentId)</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity" >
|
|
||||||
update sys_flow_step_account set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
||||||
<if test="name != null and name != ''"> name = #{name},</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> ip_address = #{ipAddress},</if>
|
|
||||||
<if test="port != null and port != ''"> port = #{port},</if>
|
|
||||||
<if test="dbName != null and dbName != ''"> db_name = #{dbName},</if>
|
|
||||||
<if test="userName != null and userName != ''"> user_name = #{userName},</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="appKey != null and appKey != ''"> app_key = #{appKey},</if>
|
|
||||||
<if test="appSecret != null and appSecret != ''"> app_secret = #{appSecret},</if>
|
|
||||||
<if test="corpid != null and corpid != ''"> corpId = #{corpid},</if>
|
|
||||||
<if test="agentid != null and agentid != ''"> agentId = #{agentid},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity" >
|
|
||||||
update sys_flow_step_account set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity" >
|
|
||||||
update sys_flow_step_account set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress} </if>
|
|
||||||
<if test="port != null and port != ''"> and port = #{port} </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="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="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
|
||||||
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
|
||||||
<if test="corpid != null and corpid != ''"> and corpId = #{corpid} </if>
|
|
||||||
<if test="agentid != null and agentid != ''"> and agentId = #{agentid} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete from sys_flow_step_account where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,126 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 映射信息表体(SysFlowStepConfigB)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public class SysFlowStepConfigBEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 主表id */
|
|
||||||
private String mainId;
|
|
||||||
/** 流程id */
|
|
||||||
private String flowId;
|
|
||||||
/** 步骤id */
|
|
||||||
private String stepId;
|
|
||||||
/** 是否主键 */
|
|
||||||
private String primaryKeyFlag;
|
|
||||||
/** 字段名 */
|
|
||||||
private String fieldName;
|
|
||||||
/** 字段备注 */
|
|
||||||
private String fieldDescription;
|
|
||||||
/** 字段类型 */
|
|
||||||
private String fieldType;
|
|
||||||
/** 查询条件 */
|
|
||||||
private String whereCondition;
|
|
||||||
/** 源字段名称;适用于插入场景 */
|
|
||||||
private String sourceFieldName;
|
|
||||||
/** 源字段类型;适用于插入场景 */
|
|
||||||
private String sourceFieldType;
|
|
||||||
/** 源字段描述;适用于插入场景 */
|
|
||||||
private String sourceFieldDescription;
|
|
||||||
|
|
||||||
|
|
||||||
public String getMainId() {
|
|
||||||
return mainId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMainId(String mainId) {
|
|
||||||
this.mainId = mainId;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 getPrimaryKeyFlag() {
|
|
||||||
return primaryKeyFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrimaryKeyFlag(String primaryKeyFlag) {
|
|
||||||
this.primaryKeyFlag = primaryKeyFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFieldName() {
|
|
||||||
return fieldName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFieldName(String fieldName) {
|
|
||||||
this.fieldName = fieldName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFieldDescription() {
|
|
||||||
return fieldDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFieldDescription(String fieldDescription) {
|
|
||||||
this.fieldDescription = fieldDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFieldType() {
|
|
||||||
return fieldType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFieldType(String fieldType) {
|
|
||||||
this.fieldType = fieldType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWhereCondition() {
|
|
||||||
return whereCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWhereCondition(String whereCondition) {
|
|
||||||
this.whereCondition = whereCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSourceFieldName() {
|
|
||||||
return sourceFieldName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSourceFieldName(String sourceFieldName) {
|
|
||||||
this.sourceFieldName = sourceFieldName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSourceFieldType() {
|
|
||||||
return sourceFieldType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSourceFieldType(String sourceFieldType) {
|
|
||||||
this.sourceFieldType = sourceFieldType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSourceFieldDescription() {
|
|
||||||
return sourceFieldDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSourceFieldDescription(String sourceFieldDescription) {
|
|
||||||
this.sourceFieldDescription = sourceFieldDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,292 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowStepConfigBDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowStepConfigBEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity" >
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="mainId" column="main_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="flowId" column="flow_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="stepId" column="step_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="primaryKeyFlag" column="primary_key_flag" jdbcType="VARCHAR"/>
|
|
||||||
<result property="fieldName" column="field_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="fieldDescription" column="field_description" jdbcType="VARCHAR"/>
|
|
||||||
<result property="fieldType" column="field_type" jdbcType="VARCHAR"/>
|
|
||||||
<result property="whereCondition" column="where_condition" jdbcType="VARCHAR"/>
|
|
||||||
<result property="sourceFieldName" column="source_field_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="sourceFieldType" column="source_field_type" jdbcType="VARCHAR"/>
|
|
||||||
<result property="sourceFieldDescription" column="source_field_description" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id = "SysFlowStepConfigBEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,create_user_id
|
|
||||||
,create_time
|
|
||||||
,modify_user_id
|
|
||||||
,modify_time
|
|
||||||
,sts
|
|
||||||
,main_id
|
|
||||||
,flow_id
|
|
||||||
,step_id
|
|
||||||
,primary_key_flag
|
|
||||||
,field_name
|
|
||||||
,field_description
|
|
||||||
,field_type
|
|
||||||
,where_condition
|
|
||||||
,source_field_name
|
|
||||||
,source_field_type
|
|
||||||
,source_field_description
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowStepConfigBEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepConfigBEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_config_b
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="mainId != null and mainId != ''"> and main_id = #{mainId} </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="primaryKeyFlag != null and primaryKeyFlag != ''"> and primary_key_flag = #{primaryKeyFlag} </if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> and field_name = #{fieldName} </if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> and field_description = #{fieldDescription} </if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> and field_type = #{fieldType} </if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> and where_condition = #{whereCondition} </if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> and source_field_name = #{sourceFieldName} </if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> and source_field_type = #{sourceFieldType} </if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> and source_field_description = #{sourceFieldDescription} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity">
|
|
||||||
select count(1) from sys_flow_step_config_b
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="mainId != null and mainId != ''"> and main_id = #{mainId} </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="primaryKeyFlag != null and primaryKeyFlag != ''"> and primary_key_flag = #{primaryKeyFlag} </if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> and field_name = #{fieldName} </if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> and field_description = #{fieldDescription} </if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> and field_type = #{fieldType} </if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> and where_condition = #{whereCondition} </if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> and source_field_name = #{sourceFieldName} </if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> and source_field_type = #{sourceFieldType} </if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> and source_field_description = #{sourceFieldDescription} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowStepConfigBEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepConfigBEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_config_b
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
||||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
||||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
|
||||||
<if test="mainId != null and mainId != ''"> and main_id like concat('%',#{mainId},'%') </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="primaryKeyFlag != null and primaryKeyFlag != ''"> and primary_key_flag like concat('%',#{primaryKeyFlag},'%') </if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> and field_name like concat('%',#{fieldName},'%') </if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> and field_description like concat('%',#{fieldDescription},'%') </if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> and field_type like concat('%',#{fieldType},'%') </if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> and where_condition like concat('%',#{whereCondition},'%') </if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> and source_field_name like concat('%',#{sourceFieldName},'%') </if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> and source_field_type like concat('%',#{sourceFieldType},'%') </if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> and source_field_description like concat('%',#{sourceFieldDescription},'%') </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowStepConfigBentity_list_or" resultMap="get-SysFlowStepConfigBEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepConfigBEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_config_b
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
|
||||||
<if test="mainId != null and mainId != ''"> or main_id = #{mainId} </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="primaryKeyFlag != null and primaryKeyFlag != ''"> or primary_key_flag = #{primaryKeyFlag} </if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> or field_name = #{fieldName} </if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> or field_description = #{fieldDescription} </if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> or field_type = #{fieldType} </if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> or where_condition = #{whereCondition} </if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> or source_field_name = #{sourceFieldName} </if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> or source_field_type = #{sourceFieldType} </if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> or source_field_description = #{sourceFieldDescription} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_config_b(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> id , </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
|
||||||
<if test="create_time != null"> create_time , </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
|
||||||
<if test="modify_time != null"> modify_time , </if>
|
|
||||||
<if test="sts != null and sts != ''"> sts , </if>
|
|
||||||
<if test="mainId != null and mainId != ''"> main_id , </if>
|
|
||||||
<if test="flowId != null and flowId != ''"> flow_id , </if>
|
|
||||||
<if test="stepId != null and stepId != ''"> step_id , </if>
|
|
||||||
<if test="primaryKeyFlag != null and primaryKeyFlag != ''"> primary_key_flag , </if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> field_name , </if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> field_description , </if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> field_type , </if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> where_condition , </if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> source_field_name , </if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> source_field_type , </if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> source_field_description , </if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> #{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null"> #{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
|
||||||
<if test="mainId != null and mainId != ''"> #{mainId} ,</if>
|
|
||||||
<if test="flowId != null and flowId != ''"> #{flowId} ,</if>
|
|
||||||
<if test="stepId != null and stepId != ''"> #{stepId} ,</if>
|
|
||||||
<if test="primaryKeyFlag != null and primaryKeyFlag != ''"> #{primaryKeyFlag} ,</if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> #{fieldName} ,</if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> #{fieldDescription} ,</if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> #{fieldType} ,</if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> #{whereCondition} ,</if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> #{sourceFieldName} ,</if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> #{sourceFieldType} ,</if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> #{sourceFieldDescription} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step_config_b a WHERE a.sts = 'Y' ),1),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_config_b(create_user_id, create_time, modify_user_id, modify_time, sts, main_id, flow_id, step_id, primary_key_flag, field_name, field_description, field_type, where_condition, source_field_name, source_field_type, source_field_description, sts)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.mainId},#{entity.flowId},#{entity.stepId},#{entity.primaryKeyFlag},#{entity.fieldName},#{entity.fieldDescription},#{entity.fieldType},#{entity.whereCondition},#{entity.sourceFieldName},#{entity.sourceFieldType},#{entity.sourceFieldDescription}, 'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_config_b(create_user_id, create_time, modify_user_id, modify_time, sts, main_id, flow_id, step_id, primary_key_flag, field_name, field_description, field_type, where_condition, source_field_name, source_field_type, source_field_description)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.mainId},#{entity.flowId},#{entity.stepId},#{entity.primaryKeyFlag},#{entity.fieldName},#{entity.fieldDescription},#{entity.fieldType},#{entity.whereCondition},#{entity.sourceFieldName},#{entity.sourceFieldType},#{entity.sourceFieldDescription})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
main_id = values(main_id),
|
|
||||||
flow_id = values(flow_id),
|
|
||||||
step_id = values(step_id),
|
|
||||||
primary_key_flag = values(primary_key_flag),
|
|
||||||
field_name = values(field_name),
|
|
||||||
field_description = values(field_description),
|
|
||||||
field_type = values(field_type),
|
|
||||||
where_condition = values(where_condition),
|
|
||||||
source_field_name = values(source_field_name),
|
|
||||||
source_field_type = values(source_field_type),
|
|
||||||
source_field_description = values(source_field_description)</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity" >
|
|
||||||
update sys_flow_step_config_b set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
||||||
<if test="mainId != null and mainId != ''"> main_id = #{mainId},</if>
|
|
||||||
<if test="flowId != null and flowId != ''"> flow_id = #{flowId},</if>
|
|
||||||
<if test="stepId != null and stepId != ''"> step_id = #{stepId},</if>
|
|
||||||
<if test="primaryKeyFlag != null and primaryKeyFlag != ''"> primary_key_flag = #{primaryKeyFlag},</if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> field_name = #{fieldName},</if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> field_description = #{fieldDescription},</if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> field_type = #{fieldType},</if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> where_condition = #{whereCondition},</if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> source_field_name = #{sourceFieldName},</if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> source_field_type = #{sourceFieldType},</if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> source_field_description = #{sourceFieldDescription},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity" >
|
|
||||||
update sys_flow_step_config_b set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity" >
|
|
||||||
update sys_flow_step_config_b set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="mainId != null and mainId != ''"> and main_id = #{mainId} </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="primaryKeyFlag != null and primaryKeyFlag != ''"> and primary_key_flag = #{primaryKeyFlag} </if>
|
|
||||||
<if test="fieldName != null and fieldName != ''"> and field_name = #{fieldName} </if>
|
|
||||||
<if test="fieldDescription != null and fieldDescription != ''"> and field_description = #{fieldDescription} </if>
|
|
||||||
<if test="fieldType != null and fieldType != ''"> and field_type = #{fieldType} </if>
|
|
||||||
<if test="whereCondition != null and whereCondition != ''"> and where_condition = #{whereCondition} </if>
|
|
||||||
<if test="sourceFieldName != null and sourceFieldName != ''"> and source_field_name = #{sourceFieldName} </if>
|
|
||||||
<if test="sourceFieldType != null and sourceFieldType != ''"> and source_field_type = #{sourceFieldType} </if>
|
|
||||||
<if test="sourceFieldDescription != null and sourceFieldDescription != ''"> and source_field_description = #{sourceFieldDescription} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete from sys_flow_step_config_b where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,145 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 映射信息主表(SysFlowStepConfig)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public class SysFlowStepConfigEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 流程id */
|
|
||||||
private String flowId;
|
|
||||||
/** 步骤id */
|
|
||||||
private String stepId;
|
|
||||||
/** 流程操作步骤配置表id */
|
|
||||||
private String setpConfigId;
|
|
||||||
/** 操作类型 */
|
|
||||||
private String actionName;
|
|
||||||
/** 数据库类型;数据库类型+版本 */
|
|
||||||
private String dbType;
|
|
||||||
/** 表名称 */
|
|
||||||
private String tableName;
|
|
||||||
/** 页码 */
|
|
||||||
private String rowNum;
|
|
||||||
/** 每页条数 */
|
|
||||||
private String pageLimit;
|
|
||||||
/** 增量数据字段;例如ts */
|
|
||||||
private String maxValueField;
|
|
||||||
/** 是否建表 */
|
|
||||||
private String createTableFlag;
|
|
||||||
/** 写入模式;覆盖写入/增量写入 */
|
|
||||||
private String writeType;
|
|
||||||
/** 动态sql语句 */
|
|
||||||
private String sqlStatement;
|
|
||||||
|
|
||||||
//步骤账户表id
|
|
||||||
private String stepAccountId;
|
|
||||||
|
|
||||||
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 getSetpConfigId() {
|
|
||||||
return setpConfigId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSetpConfigId(String setpConfigId) {
|
|
||||||
this.setpConfigId = setpConfigId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getActionName() {
|
|
||||||
return actionName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActionName(String actionName) {
|
|
||||||
this.actionName = actionName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDbType() {
|
|
||||||
return dbType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDbType(String dbType) {
|
|
||||||
this.dbType = dbType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTableName() {
|
|
||||||
return tableName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTableName(String tableName) {
|
|
||||||
this.tableName = tableName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRowNum() {
|
|
||||||
return rowNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRowNum(String rowNum) {
|
|
||||||
this.rowNum = rowNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getpageLimit() {
|
|
||||||
return pageLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setpageLimit(String pageLimit) {
|
|
||||||
this.pageLimit = pageLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMaxValueField() {
|
|
||||||
return maxValueField;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMaxValueField(String maxValueField) {
|
|
||||||
this.maxValueField = maxValueField;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreateTableFlag() {
|
|
||||||
return createTableFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTableFlag(String createTableFlag) {
|
|
||||||
this.createTableFlag = createTableFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWriteType() {
|
|
||||||
return writeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWriteType(String writeType) {
|
|
||||||
this.writeType = writeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSqlStatement() {
|
|
||||||
return sqlStatement;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSqlStatement(String sqlStatement) {
|
|
||||||
this.sqlStatement = sqlStatement;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStepAccountId() {
|
|
||||||
return stepAccountId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStepAccountId(String stepAccountId) {
|
|
||||||
this.stepAccountId = stepAccountId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,303 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowStepConfigDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowStepConfigEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity" >
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="flowId" column="flow_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="stepId" column="step_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="setpConfigId" column="setp_config_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="actionName" column="action_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
|
|
||||||
<result property="tableName" column="table_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="rowNum" column="row_num" jdbcType="VARCHAR"/>
|
|
||||||
<result property="pageLimit" column="page_limit" jdbcType="VARCHAR"/>
|
|
||||||
<result property="maxValueField" column="max_value_field" jdbcType="VARCHAR"/>
|
|
||||||
<result property="createTableFlag" column="create_table_flag" jdbcType="VARCHAR"/>
|
|
||||||
<result property="writeType" column="write_type" jdbcType="VARCHAR"/>
|
|
||||||
<result property="sqlStatement" column="sql_statement" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id = "SysFlowStepConfigEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,create_user_id
|
|
||||||
,create_time
|
|
||||||
,modify_user_id
|
|
||||||
,modify_time
|
|
||||||
,sts
|
|
||||||
,flow_id
|
|
||||||
,step_id
|
|
||||||
,setp_config_id
|
|
||||||
,action_name
|
|
||||||
,db_type
|
|
||||||
,table_name
|
|
||||||
,row_num
|
|
||||||
,page_limit
|
|
||||||
,max_value_field
|
|
||||||
,create_table_flag
|
|
||||||
,write_type
|
|
||||||
,sql_statement
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowStepConfigEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepConfigEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_config
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </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="setpConfigId != null and setpConfigId != ''"> and setp_config_id = #{setpConfigId} </if>
|
|
||||||
<if test="actionName != null and actionName != ''"> and action_name = #{actionName} </if>
|
|
||||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
|
||||||
<if test="tableName != null and tableName != ''"> and table_name = #{tableName} </if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> and row_num = #{rowNum} </if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> and page_limit = #{pageLimit} </if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> and max_value_field = #{maxValueField} </if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> and create_table_flag = #{createTableFlag} </if>
|
|
||||||
<if test="writeType != null and writeType != ''"> and write_type = #{writeType} </if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> and sql_statement = #{sqlStatement} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity">
|
|
||||||
select count(1) from sys_flow_step_config
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </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="setpConfigId != null and setpConfigId != ''"> and setp_config_id = #{setpConfigId} </if>
|
|
||||||
<if test="actionName != null and actionName != ''"> and action_name = #{actionName} </if>
|
|
||||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
|
||||||
<if test="tableName != null and tableName != ''"> and table_name = #{tableName} </if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> and row_num = #{rowNum} </if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> and page_limit = #{pageLimit} </if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> and max_value_field = #{maxValueField} </if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> and create_table_flag = #{createTableFlag} </if>
|
|
||||||
<if test="writeType != null and writeType != ''"> and write_type = #{writeType} </if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> and sql_statement = #{sqlStatement} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowStepConfigEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepConfigEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_config
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
||||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
||||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </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="setpConfigId != null and setpConfigId != ''"> and setp_config_id like concat('%',#{setpConfigId},'%') </if>
|
|
||||||
<if test="actionName != null and actionName != ''"> and action_name like concat('%',#{actionName},'%') </if>
|
|
||||||
<if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if>
|
|
||||||
<if test="tableName != null and tableName != ''"> and table_name like concat('%',#{tableName},'%') </if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> and row_num like concat('%',#{rowNum},'%') </if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> and page_limit like concat('%',#{pageLimit},'%') </if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> and max_value_field like concat('%',#{maxValueField},'%') </if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> and create_table_flag like concat('%',#{createTableFlag},'%') </if>
|
|
||||||
<if test="writeType != null and writeType != ''"> and write_type like concat('%',#{writeType},'%') </if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> and sql_statement like concat('%',#{sqlStatement},'%') </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowStepConfigentity_list_or" resultMap="get-SysFlowStepConfigEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepConfigEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_config
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> or sts = #{sts} </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="setpConfigId != null and setpConfigId != ''"> or setp_config_id = #{setpConfigId} </if>
|
|
||||||
<if test="actionName != null and actionName != ''"> or action_name = #{actionName} </if>
|
|
||||||
<if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if>
|
|
||||||
<if test="tableName != null and tableName != ''"> or table_name = #{tableName} </if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> or row_num = #{rowNum} </if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> or page_limit = #{pageLimit} </if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> or max_value_field = #{maxValueField} </if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> or create_table_flag = #{createTableFlag} </if>
|
|
||||||
<if test="writeType != null and writeType != ''"> or write_type = #{writeType} </if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> or sql_statement = #{sqlStatement} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_config(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> id , </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
|
||||||
<if test="create_time != null"> create_time , </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
|
||||||
<if test="modify_time != null"> modify_time , </if>
|
|
||||||
<if test="sts != null and sts != ''"> sts , </if>
|
|
||||||
<if test="flowId != null and flowId != ''"> flow_id , </if>
|
|
||||||
<if test="stepId != null and stepId != ''"> step_id , </if>
|
|
||||||
<if test="setpConfigId != null and setpConfigId != ''"> setp_config_id , </if>
|
|
||||||
<if test="actionName != null and actionName != ''"> action_name , </if>
|
|
||||||
<if test="dbType != null and dbType != ''"> db_type , </if>
|
|
||||||
<if test="tableName != null and tableName != ''"> table_name , </if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> row_num , </if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> page_limit , </if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> max_value_field , </if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> create_table_flag , </if>
|
|
||||||
<if test="writeType != null and writeType != ''"> write_type , </if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> sql_statement , </if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> #{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null"> #{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
|
||||||
<if test="flowId != null and flowId != ''"> #{flowId} ,</if>
|
|
||||||
<if test="stepId != null and stepId != ''"> #{stepId} ,</if>
|
|
||||||
<if test="setpConfigId != null and setpConfigId != ''"> #{setpConfigId} ,</if>
|
|
||||||
<if test="actionName != null and actionName != ''"> #{actionName} ,</if>
|
|
||||||
<if test="dbType != null and dbType != ''"> #{dbType} ,</if>
|
|
||||||
<if test="tableName != null and tableName != ''"> #{tableName} ,</if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> #{rowNum} ,</if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> #{pageLimit} ,</if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> #{maxValueField} ,</if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> #{createTableFlag} ,</if>
|
|
||||||
<if test="writeType != null and writeType != ''"> #{writeType} ,</if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> #{sqlStatement} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step_config a WHERE a.sts = 'Y' ),1),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_config(create_user_id, create_time, modify_user_id, modify_time, sts, flow_id, step_id, setp_config_id, action_name, db_type, table_name, row_num, page_limit, max_value_field, create_table_flag, write_type, sql_statement, sts)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.flowId},#{entity.stepId},#{entity.setpConfigId},#{entity.actionName},#{entity.dbType},#{entity.tableName},#{entity.rowNum},#{entity.pageLimit},#{entity.maxValueField},#{entity.createTableFlag},#{entity.writeType},#{entity.sqlStatement}, 'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_config(create_user_id, create_time, modify_user_id, modify_time, sts, flow_id, step_id, setp_config_id, action_name, db_type, table_name, row_num, page_limit, max_value_field, create_table_flag, write_type, sql_statement)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.flowId},#{entity.stepId},#{entity.setpConfigId},#{entity.actionName},#{entity.dbType},#{entity.tableName},#{entity.rowNum},#{entity.pageLimit},#{entity.maxValueField},#{entity.createTableFlag},#{entity.writeType},#{entity.sqlStatement})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
flow_id = values(flow_id),
|
|
||||||
step_id = values(step_id),
|
|
||||||
setp_config_id = values(setp_config_id),
|
|
||||||
action_name = values(action_name),
|
|
||||||
db_type = values(db_type),
|
|
||||||
table_name = values(table_name),
|
|
||||||
row_num = values(row_num),
|
|
||||||
page_limit = values(page_limit),
|
|
||||||
max_value_field = values(max_value_field),
|
|
||||||
create_table_flag = values(create_table_flag),
|
|
||||||
write_type = values(write_type),
|
|
||||||
sql_statement = values(sql_statement)</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity" >
|
|
||||||
update sys_flow_step_config set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
||||||
<if test="flowId != null and flowId != ''"> flow_id = #{flowId},</if>
|
|
||||||
<if test="stepId != null and stepId != ''"> step_id = #{stepId},</if>
|
|
||||||
<if test="setpConfigId != null and setpConfigId != ''"> setp_config_id = #{setpConfigId},</if>
|
|
||||||
<if test="actionName != null and actionName != ''"> action_name = #{actionName},</if>
|
|
||||||
<if test="dbType != null and dbType != ''"> db_type = #{dbType},</if>
|
|
||||||
<if test="tableName != null and tableName != ''"> table_name = #{tableName},</if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> row_num = #{rowNum},</if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> page_limit = #{pageLimit},</if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> max_value_field = #{maxValueField},</if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> create_table_flag = #{createTableFlag},</if>
|
|
||||||
<if test="writeType != null and writeType != ''"> write_type = #{writeType},</if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> sql_statement = #{sqlStatement},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity" >
|
|
||||||
update sys_flow_step_config set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity" >
|
|
||||||
update sys_flow_step_config set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </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="setpConfigId != null and setpConfigId != ''"> and setp_config_id = #{setpConfigId} </if>
|
|
||||||
<if test="actionName != null and actionName != ''"> and action_name = #{actionName} </if>
|
|
||||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
|
||||||
<if test="tableName != null and tableName != ''"> and table_name = #{tableName} </if>
|
|
||||||
<if test="rowNum != null and rowNum != ''"> and row_num = #{rowNum} </if>
|
|
||||||
<if test="pageLimit != null and pageLimit != ''"> and page_limit = #{pageLimit} </if>
|
|
||||||
<if test="maxValueField != null and maxValueField != ''"> and max_value_field = #{maxValueField} </if>
|
|
||||||
<if test="createTableFlag != null and createTableFlag != ''"> and create_table_flag = #{createTableFlag} </if>
|
|
||||||
<if test="writeType != null and writeType != ''"> and write_type = #{writeType} </if>
|
|
||||||
<if test="sqlStatement != null and sqlStatement != ''"> and sql_statement = #{sqlStatement} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete from sys_flow_step_config where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,143 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 流程步骤信息(SysFlowStep)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public class SysFlowStepEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 步骤序号 */
|
|
||||||
private Integer step;
|
|
||||||
//流程id
|
|
||||||
private String flowId;
|
|
||||||
/** 步骤类型;1定时任务2数据库3应用 */
|
|
||||||
private String stepType;
|
|
||||||
/** 描述 */
|
|
||||||
private String description;
|
|
||||||
/** 操作动作(名称);api名称/插件名称 */
|
|
||||||
private String apiName;
|
|
||||||
/** 操作动作类型;api/插件 */
|
|
||||||
private String actionType;
|
|
||||||
/** 应用id */
|
|
||||||
private String appId;
|
|
||||||
/** 操作动作id;api_id,根据操作动作类型来决定是查api还是插件 */
|
|
||||||
private String apiId;
|
|
||||||
/** nifi返回的应用id;刘工接口返回的nifi应用id,不确定要不要 */
|
|
||||||
private String nifiAppId;
|
|
||||||
/** nifi的apiId */
|
|
||||||
private String nifiApiId;
|
|
||||||
/** nifi应用排序模式;先进先出/先进后出 */
|
|
||||||
private String sortMode;
|
|
||||||
//定时任务 corn表达式
|
|
||||||
private String taskCorn;
|
|
||||||
//账户对象
|
|
||||||
private SysFlowStepAccountEntity account;
|
|
||||||
public Integer getStep() {
|
|
||||||
return step;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStep(Integer step) {
|
|
||||||
this.step = step;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStepType() {
|
|
||||||
return stepType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStepType(String stepType) {
|
|
||||||
this.stepType = stepType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApiName() {
|
|
||||||
return apiName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApiName(String apiName) {
|
|
||||||
this.apiName = apiName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getActionType() {
|
|
||||||
return actionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActionType(String actionType) {
|
|
||||||
this.actionType = actionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppId() {
|
|
||||||
return appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppId(String appId) {
|
|
||||||
this.appId = appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApiId() {
|
|
||||||
return apiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApiId(String apiId) {
|
|
||||||
this.apiId = apiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNifiAppId() {
|
|
||||||
return nifiAppId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNifiAppId(String nifiAppId) {
|
|
||||||
this.nifiAppId = nifiAppId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNifiApiId() {
|
|
||||||
return nifiApiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNifiApiId(String nifiApiId) {
|
|
||||||
this.nifiApiId = nifiApiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSortMode() {
|
|
||||||
return sortMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSortMode(String sortMode) {
|
|
||||||
this.sortMode = sortMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFlowId() {
|
|
||||||
return flowId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFlowId(String 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,318 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowStepDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowStepEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="step" column="step" jdbcType="INTEGER"/>
|
|
||||||
<result property="stepType" column="step_type" jdbcType="VARCHAR"/>
|
|
||||||
<result property="flowId" column="flow_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="description" column="description" jdbcType="VARCHAR"/>
|
|
||||||
<result property="apiName" column="api_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="actionType" column="action_type" jdbcType="VARCHAR"/>
|
|
||||||
<result property="appId" column="app_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="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="sortMode" column="sort_mode" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id="SysFlowStepEntity_Base_Column_List">
|
|
||||||
id,
|
|
||||||
create_user_id,
|
|
||||||
create_time,
|
|
||||||
modify_user_id,
|
|
||||||
modify_time,
|
|
||||||
sts,
|
|
||||||
step,
|
|
||||||
step_type,
|
|
||||||
flowId,
|
|
||||||
description,
|
|
||||||
api_name,
|
|
||||||
action_type,
|
|
||||||
app_id,
|
|
||||||
api_id,
|
|
||||||
taskCorn,
|
|
||||||
nifi_app_id,
|
|
||||||
nifi_api_id,
|
|
||||||
sort_mode
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowStepEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepEntity_Base_Column_List"/>
|
|
||||||
from sys_flow_step
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="step != null">and step = #{step}</if>
|
|
||||||
<if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
|
|
||||||
<if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
|
|
||||||
<if test="description != null and description != ''">and description = #{description}</if>
|
|
||||||
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</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="apiId != null and apiId != ''">and api_id = #{apiId}</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="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
select count(1) from sys_flow_step
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="step != null">and step = #{step}</if>
|
|
||||||
<if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
|
|
||||||
<if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
|
|
||||||
<if test="description != null and description != ''">and description = #{description}</if>
|
|
||||||
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</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="apiId != null and apiId != ''">and api_id = #{apiId}</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="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowStepEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepEntity_Base_Column_List"/>
|
|
||||||
from sys_flow_step
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
|
|
||||||
concat('%',#{create_user_id},'%')
|
|
||||||
</if>
|
|
||||||
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
|
|
||||||
concat('%',#{modify_user_id},'%')
|
|
||||||
</if>
|
|
||||||
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
|
|
||||||
<if test="step != null">and step like concat('%',#{step},'%')</if>
|
|
||||||
<if test="stepType != null and stepType != ''">and step_type like concat('%',#{stepType},'%')</if>
|
|
||||||
<if test="flowId != null and flowId != ''">and flow_id like concat('%',#{flowId},'%')</if>
|
|
||||||
<if test="description != null and description != ''">and description like concat('%',#{description},'%')
|
|
||||||
</if>
|
|
||||||
<if test="apiName != null and apiName != ''">and api_name like concat('%',#{apiName},'%')</if>
|
|
||||||
<if test="actionType != null and actionType != ''">and action_type like concat('%',#{actionType},'%')</if>
|
|
||||||
<if test="appId != null and appId != ''">and app_id like concat('%',#{appId},'%')</if>
|
|
||||||
<if test="apiId != null and apiId != ''">and api_id like concat('%',#{apiId},'%')</if>
|
|
||||||
<if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id like concat('%',#{nifiAppId},'%')</if>
|
|
||||||
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id like concat('%',#{nifiApiId},'%')</if>
|
|
||||||
<if test="sortMode != null and sortMode != ''">and sort_mode like concat('%',#{sortMode},'%')</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowStepentity_list_or" resultMap="get-SysFlowStepEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepEntity_Base_Column_List"/>
|
|
||||||
from sys_flow_step
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">or id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">or create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">or modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">or sts = #{sts}</if>
|
|
||||||
<if test="step != null">or step = #{step}</if>
|
|
||||||
<if test="stepType != null and stepType != ''">or step_type = #{stepType}</if>
|
|
||||||
<if test="flowId != null and flowId != ''">or flow_id = #{flowId}</if>
|
|
||||||
<if test="description != null and description != ''">or description = #{description}</if>
|
|
||||||
<if test="apiName != null and apiName != ''">or api_name = #{apiName}</if>
|
|
||||||
<if test="actionType != null and actionType != ''">or action_type = #{actionType}</if>
|
|
||||||
<if test="appId != null and appId != ''">or app_id = #{appId}</if>
|
|
||||||
<if test="apiId != null and apiId != ''">or api_id = #{apiId}</if>
|
|
||||||
<if test="nifiAppId != null and nifiAppId != ''">or nifi_app_id = #{nifiAppId}</if>
|
|
||||||
<if test="nifiApiId != null and nifiApiId != ''">or nifi_api_id = #{nifiApiId}</if>
|
|
||||||
<if test="sortMode != null and sortMode != ''">or sort_mode = #{sortMode}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity" keyProperty="id"
|
|
||||||
useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">id ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
|
|
||||||
<if test="create_time != null">create_time ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
|
|
||||||
<if test="modify_time != null">modify_time ,</if>
|
|
||||||
<if test="sts != null and sts != ''">sts ,</if>
|
|
||||||
<if test="step != null">step ,</if>
|
|
||||||
<if test="stepType != null and stepType != ''">step_type ,</if>
|
|
||||||
<if test="flowId != null and flowId != ''">flow_id ,</if>
|
|
||||||
<if test="description != null and description != ''">description ,</if>
|
|
||||||
<if test="apiName != null and apiName != ''">api_name ,</if>
|
|
||||||
<if test="actionType != null and actionType != ''">action_type ,</if>
|
|
||||||
<if test="appId != null and appId != ''">app_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="nifiApiId != null and nifiApiId != ''">nifi_api_id ,</if>
|
|
||||||
<if test="sortMode != null and sortMode != ''">sort_mode ,</if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">#{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null">#{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null">#{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''">#{sts} ,</if>
|
|
||||||
<if test="step != null">#{step} ,</if>
|
|
||||||
<if test="stepType != null and stepType != ''">#{stepType} ,</if>
|
|
||||||
<if test="flowId != null and flowId != ''">#{flowId} ,</if>
|
|
||||||
<if test="description != null and description != ''">#{description} ,</if>
|
|
||||||
<if test="apiName != null and apiName != ''">#{apiName} ,</if>
|
|
||||||
<if test="actionType != null and actionType != ''">#{actionType} ,</if>
|
|
||||||
<if test="appId != null and appId != ''">#{appId} ,</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="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</if>
|
|
||||||
<if test="sortMode != null and sortMode != ''">#{sortMode} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step a
|
|
||||||
WHERE a.sts = 'Y' ),1),
|
|
||||||
</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step,
|
|
||||||
step_type,flow_id, description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode, sts)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.step},#{entity.stepType},#{entity.flowId},#{entity.description},#{entity.apiName},#{entity.actionType},#{entity.appId},#{entity.apiId},#{entity.nifiAppId},#{entity.nifiApiId},#{entity.sortMode},
|
|
||||||
'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step, step_type,
|
|
||||||
flow_id,description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.step},#{entity.stepType},#{entity.flowId},#{entity.description},#{entity.apiName},#{entity.actionType},#{entity.appId},#{entity.apiId},#{entity.nifiAppId},#{entity.nifiApiId},#{entity.sortMode})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
step = values(step),
|
|
||||||
step_type = values(step_type),
|
|
||||||
flow_id = values(flow_id),
|
|
||||||
description = values(description),
|
|
||||||
api_name = values(api_name),
|
|
||||||
action_type = values(action_type),
|
|
||||||
app_id = values(app_id),
|
|
||||||
api_id = values(api_id),
|
|
||||||
nifi_app_id = values(nifi_app_id),
|
|
||||||
nifi_api_id = values(nifi_api_id),
|
|
||||||
sort_mode = values(sort_mode)
|
|
||||||
</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
update sys_flow_step set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null">create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null">modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''">sts = #{sts},</if>
|
|
||||||
<if test="step != null">step = #{step},</if>
|
|
||||||
<if test="stepType != null and stepType != ''">step_type = #{stepType},</if>
|
|
||||||
<if test="flowId != null and flowId != ''">flow_id = #{flowId},</if>
|
|
||||||
<if test="description != null and description != ''">description = #{description},</if>
|
|
||||||
<if test="apiName != null and apiName != ''">api_name = #{apiName},</if>
|
|
||||||
<if test="actionType != null and actionType != ''">action_type = #{actionType},</if>
|
|
||||||
<if test="appId != null and appId != ''">app_id = #{appId},</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="nifiApiId != null and nifiApiId != ''">nifi_api_id = #{nifiApiId},</if>
|
|
||||||
<if test="sortMode != null and sortMode != ''">sort_mode = #{sortMode},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
update sys_flow_step
|
|
||||||
set sts= 'N',
|
|
||||||
modify_time = #{modify_time},
|
|
||||||
modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
|
|
||||||
update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="step != null">and step = #{step}</if>
|
|
||||||
<if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
|
|
||||||
<if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
|
|
||||||
<if test="description != null and description != ''">and description = #{description}</if>
|
|
||||||
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</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="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="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
|
|
||||||
<if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete
|
|
||||||
from sys_flow_step
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 步骤关联关系表(SysFlowStepRelation)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public class SysFlowStepRelationEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/** 输入步骤 */
|
|
||||||
private String inputStepId;
|
|
||||||
/** 输出步骤 */
|
|
||||||
private String outputStepId;
|
|
||||||
/** 输入nifi app id */
|
|
||||||
private String inputNifiAppId;
|
|
||||||
/** 输出nifiidapp id */
|
|
||||||
private String outputNifiAppId;
|
|
||||||
/** 输入nifi api id */
|
|
||||||
private String inputNifiApiId;
|
|
||||||
/** 输出nifiidapi id */
|
|
||||||
private String outputNifiApiId;
|
|
||||||
|
|
||||||
|
|
||||||
public String getInputStepId() {
|
|
||||||
return inputStepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInputStepId(String inputStepId) {
|
|
||||||
this.inputStepId = inputStepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOutputStepId() {
|
|
||||||
return outputStepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOutputStepId(String outputStepId) {
|
|
||||||
this.outputStepId = outputStepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInputNifiAppId() {
|
|
||||||
return inputNifiAppId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInputNifiAppId(String inputNifiAppId) {
|
|
||||||
this.inputNifiAppId = inputNifiAppId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOutputNifiAppId() {
|
|
||||||
return outputNifiAppId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOutputNifiAppId(String outputNifiAppId) {
|
|
||||||
this.outputNifiAppId = outputNifiAppId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInputNifiApiId() {
|
|
||||||
return inputNifiApiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInputNifiApiId(String inputNifiApiId) {
|
|
||||||
this.inputNifiApiId = inputNifiApiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOutputNifiApiId() {
|
|
||||||
return outputNifiApiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOutputNifiApiId(String outputNifiApiId) {
|
|
||||||
this.outputNifiApiId = outputNifiApiId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,237 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowStepRelationDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysFlowStepRelationEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity" >
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="inputStepId" column="input_step_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="outputStepId" column="output_step_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="inputNifiAppId" column="input_nifi_app_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="outputNifiAppId" column="output_nifi_app_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="inputNifiApiId" column="input_nifi_api_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="outputNifiApiId" column="output_nifi_api_id" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id = "SysFlowStepRelationEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,create_user_id
|
|
||||||
,create_time
|
|
||||||
,modify_user_id
|
|
||||||
,modify_time
|
|
||||||
,sts
|
|
||||||
,input_step_id
|
|
||||||
,output_step_id
|
|
||||||
,input_nifi_app_id
|
|
||||||
,output_nifi_app_id
|
|
||||||
,input_nifi_api_id
|
|
||||||
,output_nifi_api_id
|
|
||||||
</sql>
|
|
||||||
<!-- 查询 采用==查询 -->
|
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowStepRelationEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepRelationEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_relation
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> and input_step_id = #{inputStepId} </if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> and output_step_id = #{outputStepId} </if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> and input_nifi_app_id = #{inputNifiAppId} </if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> and output_nifi_app_id = #{outputNifiAppId} </if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> and input_nifi_api_id = #{inputNifiApiId} </if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> and output_nifi_api_id = #{outputNifiApiId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity">
|
|
||||||
select count(1) from sys_flow_step_relation
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> and input_step_id = #{inputStepId} </if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> and output_step_id = #{outputStepId} </if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> and input_nifi_app_id = #{inputNifiAppId} </if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> and output_nifi_app_id = #{outputNifiAppId} </if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> and input_nifi_api_id = #{inputNifiApiId} </if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> and output_nifi_api_id = #{outputNifiApiId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysFlowStepRelationEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepRelationEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_relation
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
||||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
||||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> and input_step_id like concat('%',#{inputStepId},'%') </if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> and output_step_id like concat('%',#{outputStepId},'%') </if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> and input_nifi_app_id like concat('%',#{inputNifiAppId},'%') </if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> and output_nifi_app_id like concat('%',#{outputNifiAppId},'%') </if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> and input_nifi_api_id like concat('%',#{inputNifiApiId},'%') </if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> and output_nifi_api_id like concat('%',#{outputNifiApiId},'%') </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysFlowStepRelationentity_list_or" resultMap="get-SysFlowStepRelationEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysFlowStepRelationEntity_Base_Column_List" />
|
|
||||||
from sys_flow_step_relation
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
|
||||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
|
||||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
|
||||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> or input_step_id = #{inputStepId} </if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> or output_step_id = #{outputStepId} </if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> or input_nifi_app_id = #{inputNifiAppId} </if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> or output_nifi_app_id = #{outputNifiAppId} </if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> or input_nifi_api_id = #{inputNifiApiId} </if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> or output_nifi_api_id = #{outputNifiApiId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_relation(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> id , </if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
|
||||||
<if test="create_time != null"> create_time , </if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
|
||||||
<if test="modify_time != null"> modify_time , </if>
|
|
||||||
<if test="sts != null and sts != ''"> sts , </if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> input_step_id , </if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> output_step_id , </if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> input_nifi_app_id , </if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> output_nifi_app_id , </if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> input_nifi_api_id , </if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> output_nifi_api_id , </if>
|
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''"> #{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null"> #{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> #{inputStepId} ,</if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> #{outputStepId} ,</if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> #{inputNifiAppId} ,</if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> #{outputNifiAppId} ,</if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> #{inputNifiApiId} ,</if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> #{outputNifiApiId} ,</if>
|
|
||||||
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step_relation a WHERE a.sts = 'Y' ),1),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_relation(create_user_id, create_time, modify_user_id, modify_time, sts, input_step_id, output_step_id, input_nifi_app_id, output_nifi_app_id, input_nifi_api_id, output_nifi_api_id, sts)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.inputStepId},#{entity.outputStepId},#{entity.inputNifiAppId},#{entity.outputNifiAppId},#{entity.inputNifiApiId},#{entity.outputNifiApiId}, 'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_flow_step_relation(create_user_id, create_time, modify_user_id, modify_time, sts, input_step_id, output_step_id, input_nifi_app_id, output_nifi_app_id, input_nifi_api_id, output_nifi_api_id)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.inputStepId},#{entity.outputStepId},#{entity.inputNifiAppId},#{entity.outputNifiAppId},#{entity.inputNifiApiId},#{entity.outputNifiApiId})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
input_step_id = values(input_step_id),
|
|
||||||
output_step_id = values(output_step_id),
|
|
||||||
input_nifi_app_id = values(input_nifi_app_id),
|
|
||||||
output_nifi_app_id = values(output_nifi_app_id),
|
|
||||||
input_nifi_api_id = values(input_nifi_api_id),
|
|
||||||
output_nifi_api_id = values(output_nifi_api_id)</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity" >
|
|
||||||
update sys_flow_step_relation set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> input_step_id = #{inputStepId},</if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> output_step_id = #{outputStepId},</if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> input_nifi_app_id = #{inputNifiAppId},</if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> output_nifi_app_id = #{outputNifiAppId},</if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> input_nifi_api_id = #{inputNifiApiId},</if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> output_nifi_api_id = #{outputNifiApiId},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity" >
|
|
||||||
update sys_flow_step_relation set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity" >
|
|
||||||
update sys_flow_step_relation set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
||||||
<if test="inputStepId != null and inputStepId != ''"> and input_step_id = #{inputStepId} </if>
|
|
||||||
<if test="outputStepId != null and outputStepId != ''"> and output_step_id = #{outputStepId} </if>
|
|
||||||
<if test="inputNifiAppId != null and inputNifiAppId != ''"> and input_nifi_app_id = #{inputNifiAppId} </if>
|
|
||||||
<if test="outputNifiAppId != null and outputNifiAppId != ''"> and output_nifi_app_id = #{outputNifiAppId} </if>
|
|
||||||
<if test="inputNifiApiId != null and inputNifiApiId != ''"> and input_nifi_api_id = #{inputNifiApiId} </if>
|
|
||||||
<if test="outputNifiApiId != null and outputNifiApiId != ''"> and output_nifi_api_id = #{outputNifiApiId} </if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete from sys_flow_step_relation where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程分类权限表(SysFlowClassRule)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowClassRuleService extends IBaseService<SysFlowClassRuleEntity, String>{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增流程分类权限
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity saveFlowClassRule(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改流程分类权限
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity updateFlowClassRule(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除流程分类权限
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity deleteFlowClassRule(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity queryRuleList(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity queryRulePagedInfo(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询待分配权限的用户列表
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity queryUserList(JSONObject object);
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程分类;对应数环通项目分类(SysFlowClass)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowClassService extends IBaseService<SysFlowClassEntity, String>{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据Id查询
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity getFlowClass(JSONObject object);
|
|
||||||
/**
|
|
||||||
* 新增流程分类
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity saveFlowClass(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改流程分类
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity updateFlowClass(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除流程分类
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity deleteFlowClass(JSONObject object);
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* nifi常量(SysFlowNifiConstant)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
public interface ISysFlowNifiConstantService extends IBaseService<SysFlowNifiConstantEntity, String>{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity getNifiConstant(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存nifi常量
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity saveNifiConstant(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新nifi常量
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity updateNifiConstant(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新nifi常量
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity deleteNifiConstant(JSONObject object);
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程主表;流程就是数环通的Linkup(SysFlow)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:24
|
|
||||||
*/
|
|
||||||
public interface ISysFlowService extends IBaseService<SysFlowEntity, String>{
|
|
||||||
/**
|
|
||||||
* 保存流程主表
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity saveFlow(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新流程主表
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity updateFlow(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除流程主表
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity deleteFlow(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity queryFlowList(JSONObject object);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity queryFlowPagedInfo(JSONObject object);
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程步骤账户表(SysFlowStepAccount)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
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);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
/**
|
|
||||||
* 映射信息表体(SysFlowStepConfigB)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepConfigBService extends IBaseService<SysFlowStepConfigBEntity, String>{
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 映射信息主表(SysFlowStepConfig)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepConfigService extends IBaseService<SysFlowStepConfigEntity, String>{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 测试sql
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JsonResultEntity testSql(JSONObject object);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
/**
|
|
||||||
* 步骤关联关系表(SysFlowStepRelation)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
public interface ISysFlowStepRelationService extends IBaseService<SysFlowStepRelationEntity, String>{
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程步骤信息(SysFlowStep)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
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);
|
|
||||||
}
|
|
|
@ -1,193 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import cn.hutool.core.lang.Assert;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowClassRuleDao;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowClassRuleService;
|
|
||||||
import com.hzya.frame.sysnew.user.dao.ISysUserDao;
|
|
||||||
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
|
|
||||||
import com.hzya.frame.uuid.UUIDUtils;
|
|
||||||
import com.hzya.frame.web.entity.BaseResult;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程分类权限表(SysFlowClassRule)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowClassRuleService")
|
|
||||||
public class SysFlowClassRuleServiceImpl extends BaseService<SysFlowClassRuleEntity, String> implements ISysFlowClassRuleService {
|
|
||||||
|
|
||||||
private ISysFlowClassRuleDao sysFlowClassRuleDao;
|
|
||||||
@Autowired
|
|
||||||
private ISysUserDao sysUserDao;
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowClassRuleDao(ISysFlowClassRuleDao dao) {
|
|
||||||
this.sysFlowClassRuleDao = dao;
|
|
||||||
this.dao = dao;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增流程分类权限
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity saveFlowClassRule(JSONObject object) {
|
|
||||||
SysFlowClassRuleEntity ruleEntity = getData("jsonStr",object,SysFlowClassRuleEntity.class);
|
|
||||||
try {
|
|
||||||
this.checkParams(ruleEntity,"save");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
addRule(ruleEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("保存成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
//保存
|
|
||||||
private void addRule(SysFlowClassRuleEntity ruleEntity) {
|
|
||||||
List<SysFlowClassRuleEntity> ruleList = ruleEntity.getRuleList();
|
|
||||||
for (SysFlowClassRuleEntity r : ruleList) {
|
|
||||||
r.setId(UUIDUtils.getUUID());
|
|
||||||
r.setCreate_time(Convert.toDate(ruleEntity.getCreate_time(),ruleEntity.getModify_time()));
|
|
||||||
r.setCreate_user_id(Convert.toStr(ruleEntity.getCreate_user_id(),ruleEntity.getModify_user_id()));
|
|
||||||
r.setModify_time(r.getCreate_time());
|
|
||||||
r.setModify_user_id(r.getCreate_user_id());
|
|
||||||
r.setFlowClassId(ruleEntity.getFlowClassId());
|
|
||||||
sysFlowClassRuleDao.save(r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改流程分类权限
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity updateFlowClassRule(JSONObject object) {
|
|
||||||
SysFlowClassRuleEntity ruleEntity = getData("jsonStr",object,SysFlowClassRuleEntity.class);
|
|
||||||
try {
|
|
||||||
this.checkParams(ruleEntity,"update");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
//先删除 再重新保存
|
|
||||||
SysFlowClassRuleEntity rule = new SysFlowClassRuleEntity();
|
|
||||||
rule.setFlowClassId(ruleEntity.getFlowClassId());
|
|
||||||
sysFlowClassRuleDao.logicRemoveMultiCondition(rule);
|
|
||||||
addRule(ruleEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("更新成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除流程分类权限
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity deleteFlowClassRule(JSONObject object) {
|
|
||||||
SysFlowClassRuleEntity ruleEntity = getData("jsonStr",object,SysFlowClassRuleEntity.class);
|
|
||||||
try {
|
|
||||||
this.checkParams(ruleEntity,"delete");
|
|
||||||
}catch (Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
SysFlowClassRuleEntity deleteRuleEntity = new SysFlowClassRuleEntity();
|
|
||||||
deleteRuleEntity.setFlowClassId(ruleEntity.getFlowClassId());
|
|
||||||
deleteRuleEntity.setUserId(ruleEntity.getUserId());
|
|
||||||
sysFlowClassRuleDao.logicRemoveMultiCondition(deleteRuleEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("删除成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity queryRuleList(JSONObject object) {
|
|
||||||
SysFlowClassRuleEntity ruleEntity = getData("jsonStr",object,SysFlowClassRuleEntity.class);
|
|
||||||
try {
|
|
||||||
checkParams(ruleEntity,"queryList");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
List<SysFlowClassRuleEntity> sysFlowClassRuleEntities = sysFlowClassRuleDao.queryByLike(ruleEntity);
|
|
||||||
SysFlowClassRuleEntity reuslt = new SysFlowClassRuleEntity();
|
|
||||||
reuslt.setFlowClassId(ruleEntity.getFlowClassId());
|
|
||||||
reuslt.setRuleList(sysFlowClassRuleEntities);
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功",reuslt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity queryRulePagedInfo(JSONObject object) {
|
|
||||||
SysFlowClassRuleEntity ruleEntity = getData("jsonStr",object,SysFlowClassRuleEntity.class);
|
|
||||||
try {
|
|
||||||
checkParams(ruleEntity,"queryPaged");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
PageHelper.startPage(ruleEntity.getPageNum(), ruleEntity.getPageSize());
|
|
||||||
List<SysFlowClassRuleEntity> queryByLike = this.dao.queryByLike(ruleEntity);
|
|
||||||
PageInfo pageInfo = new PageInfo(queryByLike);
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功",pageInfo);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 查询待分配权限的用户列表
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity queryUserList(JSONObject object) {
|
|
||||||
SysUserEntity userEntity = getData("jsonStr",object,SysUserEntity.class);
|
|
||||||
if (StrUtil.isEmpty(userEntity.getFlowClassId())){
|
|
||||||
return BaseResult.getFailureMessageEntity("flowClassId不能为空");
|
|
||||||
}
|
|
||||||
List<SysUserEntity> sysUserEntities = sysUserDao.queryList(userEntity, "com.hzya.frame.sysnew.user.dao.impl.SysUserDaoImpl.entity_list_notin_sys_flowClass");
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询成功",sysUserEntities);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 检查参数
|
|
||||||
* @param entity 参数对象
|
|
||||||
* @param type 操作;类型
|
|
||||||
*/
|
|
||||||
private void checkParams(SysFlowClassRuleEntity entity,String type){
|
|
||||||
Assert.notNull(entity,"请求参数不能为空");
|
|
||||||
Assert.notEmpty(entity.getFlowClassId(),"flowClassId不能为空");
|
|
||||||
if ("save".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getRuleList(),"ruleList不能为空");
|
|
||||||
}else if ("update".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getRuleList(),"ruleList不能为空");
|
|
||||||
}else if ("delete".equals(type)){
|
|
||||||
|
|
||||||
}else if ("queryPaged".equals(type)){
|
|
||||||
Assert.notNull(entity.getPageNum(),"pageNum不能为空");
|
|
||||||
Assert.notNull(entity.getPageSize(),"pageSize不能为空");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,179 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.dictionaryshopNew.service.ISysDictionaryshopNewService;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowClassRuleDao;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowDao;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowClassDao;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowClassRuleEntity;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowEntity;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowClassService;
|
|
||||||
import com.hzya.frame.sysnew.user.dao.ISysUserDao;
|
|
||||||
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
|
|
||||||
import com.hzya.frame.uuid.UUIDLong;
|
|
||||||
import com.hzya.frame.uuid.UUIDUtils;
|
|
||||||
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.beans.factory.annotation.Autowired;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程分类;对应数环通项目分类(SysFlowClass)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowClassService")
|
|
||||||
public class SysFlowClassServiceImpl extends BaseService<SysFlowClassEntity, String> implements ISysFlowClassService {
|
|
||||||
|
|
||||||
private ISysFlowClassDao sysFlowClassDao;
|
|
||||||
@Autowired
|
|
||||||
private ISysFlowDao sysFlowDao;
|
|
||||||
@Autowired
|
|
||||||
private ISysFlowClassRuleDao flowClassRuleDao;
|
|
||||||
@Autowired
|
|
||||||
private ISysUserDao sysUserDao;
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowClassDao(ISysFlowClassDao dao) {
|
|
||||||
this.sysFlowClassDao = dao;
|
|
||||||
this.dao = dao;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据Id查询
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity getFlowClass(JSONObject object) {
|
|
||||||
SysFlowClassEntity flowClass = getData("jsonStr",object,SysFlowClassEntity.class);
|
|
||||||
try {
|
|
||||||
this.checkParams(flowClass,"get");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
SysFlowClassEntity sysFlowClassEntity = sysFlowClassDao.queryOne(flowClass);
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询详情成功",sysFlowClassEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增流程分类
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity saveFlowClass(JSONObject object) {
|
|
||||||
SysFlowClassEntity flowClass = getData("jsonStr",object,SysFlowClassEntity.class);
|
|
||||||
try {
|
|
||||||
this.checkParams(flowClass,"add");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
flowClass.setId(UUIDUtils.getUUID());
|
|
||||||
sysFlowClassDao.save(flowClass);
|
|
||||||
//给创建分类的用户保存一下权限
|
|
||||||
SysUserEntity sysUserEntity = sysUserDao.get(flowClass.getCreate_user_id());
|
|
||||||
SysFlowClassRuleEntity ruleEntity = new SysFlowClassRuleEntity();
|
|
||||||
ruleEntity.setFlowClassId(flowClass.getId());
|
|
||||||
ruleEntity.setUserId(flowClass.getCreate_user_id());
|
|
||||||
if (null != sysUserEntity){
|
|
||||||
ruleEntity.setUserName(sysUserEntity.getPersonName());
|
|
||||||
ruleEntity.setUserCode(sysUserEntity.getPersonCode());
|
|
||||||
}
|
|
||||||
ruleEntity.setCreate_time(new Date());
|
|
||||||
ruleEntity.setModify_time(new Date());
|
|
||||||
ruleEntity.setCreate_user_id(flowClass.getCreate_user_id());
|
|
||||||
ruleEntity.setModify_user_id(flowClass.getModify_user_id());
|
|
||||||
ruleEntity.setId(UUIDUtils.getUUID());
|
|
||||||
flowClassRuleDao.save(ruleEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("新增成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改流程分类
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity updateFlowClass(JSONObject object) {
|
|
||||||
SysFlowClassEntity flowClass = getData("jsonStr",object,SysFlowClassEntity.class);
|
|
||||||
try {
|
|
||||||
this.checkParams(flowClass,"update");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysFlowClassDao.update(flowClass);
|
|
||||||
return BaseResult.getSuccessMessageEntity("更新成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除流程分类
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity deleteFlowClass(JSONObject object) {
|
|
||||||
SysFlowClassEntity flowClass = getData("jsonStr",object,SysFlowClassEntity.class);
|
|
||||||
try {
|
|
||||||
this.checkParams(flowClass,"delete");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysFlowClassDao.logicRemove(flowClass);
|
|
||||||
return BaseResult.getSuccessMessageEntity("删除成功");
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 参数检查
|
|
||||||
* @param flowClass
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
private void checkParams(SysFlowClassEntity flowClass,String type){
|
|
||||||
Assert.notNull(flowClass,"请求参数不能为空");
|
|
||||||
if ("add".equals(type)){//新增
|
|
||||||
Assert.notEmpty(flowClass.getName(),"名称不能为空");
|
|
||||||
//查询是否有同名的
|
|
||||||
SysFlowClassEntity flowQuery = new SysFlowClassEntity();
|
|
||||||
flowQuery.setName(flowClass.getName());
|
|
||||||
List<SysFlowClassEntity> query = sysFlowClassDao.query(flowQuery);
|
|
||||||
if (CollectionUtils.isNotEmpty(query)){
|
|
||||||
throw new BaseSystemException(flowClass.getName()+"已存在");
|
|
||||||
}
|
|
||||||
}else if ("update".equals(type)){//更新
|
|
||||||
Assert.notEmpty(flowClass.getId(),"id不能为空");
|
|
||||||
//查一下有没有同名的
|
|
||||||
SysFlowClassEntity flowQuery = new SysFlowClassEntity();
|
|
||||||
flowQuery.setName(flowClass.getName());
|
|
||||||
List<SysFlowClassEntity> query = sysFlowClassDao.query(flowQuery);
|
|
||||||
if (CollectionUtils.isNotEmpty(query)){
|
|
||||||
for (SysFlowClassEntity f : query) {
|
|
||||||
if (!f.getId().equals(flowClass.getId())){
|
|
||||||
throw new BaseSystemException(flowClass.getName()+"已存在");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else if ("delete".equals(type)){//删除
|
|
||||||
Assert.notEmpty(flowClass.getId(),"id不能为空");
|
|
||||||
//查一下这个分类有没有被引用
|
|
||||||
SysFlowEntity sysFlowEntity = new SysFlowEntity();
|
|
||||||
sysFlowEntity.setClassId(flowClass.getId());
|
|
||||||
List<SysFlowEntity> query = sysFlowDao.query(sysFlowEntity);
|
|
||||||
if (CollectionUtils.isNotEmpty(query)){
|
|
||||||
throw new BaseSystemException("该分类已被引用,删除失败");
|
|
||||||
}
|
|
||||||
}else if ("get".equals(type)){//查询详情
|
|
||||||
Assert.notEmpty(flowClass.getId(),"id不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,155 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowNifiConstantEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowNifiConstantDao;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowNifiConstantService;
|
|
||||||
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.beans.factory.annotation.Autowired;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* nifi常量(SysFlowNifiConstant)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowNifiConstantService")
|
|
||||||
public class SysFlowNifiConstantServiceImpl extends BaseService<SysFlowNifiConstantEntity, String> implements ISysFlowNifiConstantService {
|
|
||||||
|
|
||||||
private ISysFlowNifiConstantDao sysFlowNifiConstantDao;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowNifiConstantDao(ISysFlowNifiConstantDao dao) {
|
|
||||||
this.sysFlowNifiConstantDao = dao;
|
|
||||||
this.dao = dao;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity getNifiConstant(JSONObject object) {
|
|
||||||
SysFlowNifiConstantEntity sysFlowNifiConstantEntity = null;
|
|
||||||
try {
|
|
||||||
sysFlowNifiConstantEntity = preCheck(object,"get");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
SysFlowNifiConstantEntity nifiConstant = sysFlowNifiConstantDao.queryOne(sysFlowNifiConstantEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询详情成功",nifiConstant);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存nifi常量
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity saveNifiConstant(JSONObject object) {
|
|
||||||
SysFlowNifiConstantEntity sysFlowNifiConstantEntity = null;
|
|
||||||
try {
|
|
||||||
sysFlowNifiConstantEntity = preCheck(object,"save");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysFlowNifiConstantDao.save(sysFlowNifiConstantEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("保存成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新nifi常量
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity updateNifiConstant(JSONObject object) {
|
|
||||||
SysFlowNifiConstantEntity sysFlowNifiConstantEntity = null;
|
|
||||||
try {
|
|
||||||
sysFlowNifiConstantEntity = preCheck(object,"update");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysFlowNifiConstantDao.update(sysFlowNifiConstantEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("更新成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新nifi常量
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity deleteNifiConstant(JSONObject object) {
|
|
||||||
SysFlowNifiConstantEntity sysFlowNifiConstantEntity = null;
|
|
||||||
try {
|
|
||||||
sysFlowNifiConstantEntity = preCheck(object,"delete");
|
|
||||||
}catch(Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysFlowNifiConstantDao.logicRemove(sysFlowNifiConstantEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("删除成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参数校验
|
|
||||||
* @param entity
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
private void checkParams(SysFlowNifiConstantEntity entity,String type){
|
|
||||||
Assert.notNull(entity,"请求参数不能为空");
|
|
||||||
if ("save".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getNifiKey(),"nifiKey不能为空");
|
|
||||||
Assert.notEmpty(entity.getNifiValue(),"nifiValue不能为空");
|
|
||||||
//检查是否有重名的key
|
|
||||||
SysFlowNifiConstantEntity nifi = new SysFlowNifiConstantEntity();
|
|
||||||
nifi.setNifiKey(entity.getNifiKey());
|
|
||||||
List<SysFlowNifiConstantEntity> query = sysFlowNifiConstantDao.query(nifi);
|
|
||||||
if (CollectionUtils.isNotEmpty(query)){
|
|
||||||
throw new BaseSystemException(nifi.getNifiKey()+"重复");
|
|
||||||
}
|
|
||||||
}else if ("update".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getId(),"id不能为空");
|
|
||||||
Assert.notEmpty(entity.getNifiKey(),"key不能为空");
|
|
||||||
Assert.notEmpty(entity.getNifiValue(),"value不能为空");
|
|
||||||
SysFlowNifiConstantEntity nifi = new SysFlowNifiConstantEntity();
|
|
||||||
nifi.setNifiKey(entity.getNifiKey());
|
|
||||||
List<SysFlowNifiConstantEntity> query = sysFlowNifiConstantDao.query(nifi);
|
|
||||||
if (CollectionUtils.isNotEmpty(query)){
|
|
||||||
for (SysFlowNifiConstantEntity n : query) {
|
|
||||||
if (!n.getId().equals(entity.getId())){
|
|
||||||
throw new BaseSystemException(entity.getNifiKey()+"重复");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else if ("delete".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getId(),"id不能为空");
|
|
||||||
}else if ("get".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getId(),"id不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//前置操作
|
|
||||||
private SysFlowNifiConstantEntity preCheck(JSONObject object,String type){
|
|
||||||
SysFlowNifiConstantEntity entity = getData("jsonStr", object,SysFlowNifiConstantEntity.class);
|
|
||||||
checkParams(entity,type);
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,190 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew;
|
|
||||||
import com.hzya.frame.sys.dictionaryshopNew.service.ISysDictionaryshopNewService;
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowDao;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowService;
|
|
||||||
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.beans.factory.annotation.Autowired;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程主表;流程就是数环通的Linkup(SysFlow)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:26
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowService")
|
|
||||||
public class SysFlowServiceImpl extends BaseService<SysFlowEntity, String> implements ISysFlowService {
|
|
||||||
|
|
||||||
private ISysFlowDao sysFlowDao;
|
|
||||||
@Autowired
|
|
||||||
private ISysDictionaryshopNewService sysDictionaryshopNewService;
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowDao(ISysFlowDao dao) {
|
|
||||||
this.sysFlowDao = dao;
|
|
||||||
this.dao = dao;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存流程主表
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity saveFlow(JSONObject object) {
|
|
||||||
SysFlowEntity flowEntity = getData("jsonStr",object,SysFlowEntity.class);
|
|
||||||
try {
|
|
||||||
checkParams(flowEntity,"save");
|
|
||||||
} catch (Exception e) {
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysFlowDao.save(flowEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("保存成功",flowEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新流程主表
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity updateFlow(JSONObject object) {
|
|
||||||
SysFlowEntity flowEntity = getData("jsonStr",object,SysFlowEntity.class);
|
|
||||||
try {
|
|
||||||
checkParams(flowEntity,"update");
|
|
||||||
} catch (Exception e) {
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysFlowDao.update(flowEntity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("更新成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除流程主表
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity deleteFlow(JSONObject object) {
|
|
||||||
SysFlowEntity flowEntity = getData("jsonStr",object,SysFlowEntity.class);
|
|
||||||
try {
|
|
||||||
checkParams(flowEntity,"delete");
|
|
||||||
} catch (Exception e) {
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
//删除主表
|
|
||||||
sysFlowDao.logicRemove(flowEntity);
|
|
||||||
//删除子表
|
|
||||||
return BaseResult.getSuccessMessageEntity("删除成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity queryFlowList(JSONObject object) {
|
|
||||||
SysFlowEntity flowEntity = getData("jsonStr",object,SysFlowEntity.class);
|
|
||||||
try {
|
|
||||||
checkParams(flowEntity,"queryList");
|
|
||||||
} catch (Exception e) {
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
List<SysFlowEntity> list = sysFlowDao.query(flowEntity);
|
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
|
||||||
for (SysFlowEntity sysFlowEntity : list) {
|
|
||||||
transferDictionary(sysFlowEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询数据成功",list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity queryFlowPagedInfo(JSONObject object) {
|
|
||||||
SysFlowEntity flowEntity = getData("jsonStr",object,SysFlowEntity.class);
|
|
||||||
try {
|
|
||||||
checkParams(flowEntity,"queryPaged");
|
|
||||||
} catch (Exception e) {
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
PageHelper.startPage(flowEntity.getPageNum(),flowEntity.getPageSize());
|
|
||||||
List<SysFlowEntity> queryByLike = sysFlowDao.queryByLike(flowEntity);
|
|
||||||
if (CollectionUtils.isNotEmpty(queryByLike)){
|
|
||||||
for (SysFlowEntity sysFlowEntity : queryByLike) {
|
|
||||||
transferDictionary(sysFlowEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PageInfo pageInfo = new PageInfo(queryByLike);
|
|
||||||
return BaseResult.getSuccessMessageEntity("pageInfo",pageInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参数检查
|
|
||||||
* @param entity
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
private void checkParams(SysFlowEntity entity,String type){
|
|
||||||
Assert.notNull(entity,"请求参数不能为空");
|
|
||||||
if ("save".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getClassId(),"classId不能为空");
|
|
||||||
Assert.notEmpty(entity.getName(),"name不能为空");
|
|
||||||
SysFlowEntity flow = new SysFlowEntity();
|
|
||||||
flow.setName(entity.getName());
|
|
||||||
List<SysFlowEntity> flowList = sysFlowDao.query(flow);
|
|
||||||
if (CollectionUtils.isNotEmpty(flowList)){
|
|
||||||
throw new BaseSystemException(entity.getName()+"重复");
|
|
||||||
}
|
|
||||||
}else if("update".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getId(),"Id不能为空");
|
|
||||||
SysFlowEntity flow = new SysFlowEntity();
|
|
||||||
flow.setName(entity.getName());
|
|
||||||
List<SysFlowEntity> flowList = sysFlowDao.query(flow);
|
|
||||||
if (CollectionUtils.isNotEmpty(flowList)){
|
|
||||||
for (SysFlowEntity sysFlowEntity : flowList) {
|
|
||||||
if (!sysFlowEntity.getId().equals(entity.getId())){
|
|
||||||
throw new BaseSystemException(entity.getName()+"重复");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else if ("delete".equals(type)){
|
|
||||||
Assert.notEmpty(entity.getId(),"Id不能为空");
|
|
||||||
|
|
||||||
}else if ("queryPaged".equals(type)){
|
|
||||||
Assert.notNull(entity.getPageNum(),"pageNum不能为空");
|
|
||||||
Assert.notNull(entity.getPageSize(),"pageSize不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void transferDictionary(SysFlowEntity sysFlowEntity){
|
|
||||||
if (null != sysFlowEntity){
|
|
||||||
SysDictionaryshopNew dictionaryshopByValue = sysDictionaryshopNewService.getDictionaryshopByValue("sys_flow", "trigger_mode_id", sysFlowEntity.getTriggerModeId());
|
|
||||||
if (null != dictionaryshopByValue){
|
|
||||||
sysFlowEntity.setTriggerModeName(dictionaryshopByValue.getColumnContent());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,284 +0,0 @@
|
||||||
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.dao.ISysFlowStepAccountDao;
|
|
||||||
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.beans.factory.annotation.Autowired;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.DriverManager;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程步骤账户表(SysFlowStepAccount)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowStepAccountService")
|
|
||||||
public class SysFlowStepAccountServiceImpl extends BaseService<SysFlowStepAccountEntity, String> implements ISysFlowStepAccountService {
|
|
||||||
|
|
||||||
private ISysFlowStepAccountDao sysFlowStepAccountDao;
|
|
||||||
@Resource
|
|
||||||
private DsDataSourceUtil dsDataSourceUtil;
|
|
||||||
@Autowired
|
|
||||||
private ISysApplicationDatabaseService sysApplicationDatabaseService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowStepAccountDao(ISysFlowStepAccountDao dao) {
|
|
||||||
this.sysFlowStepAccountDao = 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)) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigBEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepConfigBDao;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowStepConfigBService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
/**
|
|
||||||
* 映射信息表体(SysFlowStepConfigB)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowStepConfigBService")
|
|
||||||
public class SysFlowStepConfigBServiceImpl extends BaseService<SysFlowStepConfigBEntity, String> implements ISysFlowStepConfigBService {
|
|
||||||
|
|
||||||
private ISysFlowStepConfigBDao sysFlowStepConfigBDao;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowStepConfigBDao(ISysFlowStepConfigBDao dao) {
|
|
||||||
this.sysFlowStepConfigBDao = dao;
|
|
||||||
this.dao = dao;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,82 +0,0 @@
|
||||||
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.dao.ISysFlowStepConfigDao;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
|
|
||||||
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.beans.factory.annotation.Autowired;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 映射信息主表(SysFlowStepConfig)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowStepConfigService")
|
|
||||||
public class SysFlowStepConfigServiceImpl extends BaseService<SysFlowStepConfigEntity, String> implements ISysFlowStepConfigService {
|
|
||||||
|
|
||||||
Logger logger = LoggerFactory.getLogger(ISysFlowStepConfigService.class);
|
|
||||||
private ISysFlowStepConfigDao sysFlowStepConfigDao;
|
|
||||||
@Autowired
|
|
||||||
private ISysFlowStepAccountService sysFlowStepAccountService;
|
|
||||||
@Autowired
|
|
||||||
private ISysApplicationDatabaseService sysApplicationDatabaseService;
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowStepConfigDao(ISysFlowStepConfigDao dao) {
|
|
||||||
this.sysFlowStepConfigDao = 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不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepRelationEntity;
|
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepRelationDao;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowStepRelationService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
/**
|
|
||||||
* 步骤关联关系表(SysFlowStepRelation)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:28
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowStepRelationService")
|
|
||||||
public class SysFlowStepRelationServiceImpl extends BaseService<SysFlowStepRelationEntity, String> implements ISysFlowStepRelationService {
|
|
||||||
|
|
||||||
private ISysFlowStepRelationDao sysFlowStepRelationDao;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowStepRelationDao(ISysFlowStepRelationDao dao) {
|
|
||||||
this.sysFlowStepRelationDao = dao;
|
|
||||||
this.dao = dao;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,160 +0,0 @@
|
||||||
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.dao.ISysFlowStepDao;
|
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
|
|
||||||
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.beans.factory.annotation.Autowired;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程步骤信息(SysFlowStep)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-04-29 10:16:27
|
|
||||||
*/
|
|
||||||
@Service(value = "sysFlowStepService")
|
|
||||||
public class SysFlowStepServiceImpl extends BaseService<SysFlowStepEntity, String> implements ISysFlowStepService {
|
|
||||||
|
|
||||||
private ISysFlowStepDao sysFlowStepDao;
|
|
||||||
@Autowired
|
|
||||||
private ISysFlowStepAccountService sysFlowStepAccountService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public void setSysFlowStepDao(ISysFlowStepDao dao) {
|
|
||||||
this.sysFlowStepDao = 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不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.hzya.frame.sysnew.application.appAcount.dao;
|
|
||||||
|
|
||||||
import com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity;
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用账户表(sys_application_account: table)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-05-10 15:52:21
|
|
||||||
*/
|
|
||||||
public interface ISysApplicationAccountDao extends IBaseDao<SysApplicationAccountEntity, String> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.hzya.frame.sysnew.application.appAcount.dao.impl;
|
|
||||||
|
|
||||||
import com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity;
|
|
||||||
import com.hzya.frame.sysnew.application.appAcount.dao.ISysApplicationAccountDao;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
/**
|
|
||||||
* 应用账户表(SysApplicationAccount)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-05-10 15:52:23
|
|
||||||
*/
|
|
||||||
@Repository(value = "SysApplicationAccountDaoImpl")
|
|
||||||
public class SysApplicationAccountDaoImpl extends MybatisGenericDao<SysApplicationAccountEntity, String> implements ISysApplicationAccountDao{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,138 +0,0 @@
|
||||||
package com.hzya.frame.sysnew.application.appAcount.entity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
|
||||||
/**
|
|
||||||
* 应用账户表(SysApplicationAccount)实体类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-05-10 15:52:24
|
|
||||||
*/
|
|
||||||
public class SysApplicationAccountEntity extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用id
|
|
||||||
*/
|
|
||||||
private String appId;
|
|
||||||
/** 账户名称 */
|
|
||||||
private String name;
|
|
||||||
/** ip地址 */
|
|
||||||
private String ipAddress;
|
|
||||||
/** 端口 */
|
|
||||||
private String port;
|
|
||||||
/** 数据库名称 */
|
|
||||||
private String dbName;
|
|
||||||
/** 用户名 */
|
|
||||||
private String userName;
|
|
||||||
/** 密码 */
|
|
||||||
private String password;
|
|
||||||
/** 数据库类型 */
|
|
||||||
private String dbType;
|
|
||||||
/** 应用key */
|
|
||||||
private String appKey;
|
|
||||||
/** 应用密钥 */
|
|
||||||
private String appSecret;
|
|
||||||
/** 企业id */
|
|
||||||
private String corpid;
|
|
||||||
/** 应用id */
|
|
||||||
private String agentid;
|
|
||||||
|
|
||||||
public String getAppId() {
|
|
||||||
return appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppId(String appId) {
|
|
||||||
this.appId = appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIpAddress() {
|
|
||||||
return ipAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIpAddress(String ipAddress) {
|
|
||||||
this.ipAddress = ipAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPort() {
|
|
||||||
return port;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPort(String port) {
|
|
||||||
this.port = port;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDbName() {
|
|
||||||
return dbName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDbName(String dbName) {
|
|
||||||
this.dbName = dbName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName() {
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserName(String userName) {
|
|
||||||
this.userName = userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassword() {
|
|
||||||
return password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPassword(String password) {
|
|
||||||
this.password = password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDbType() {
|
|
||||||
return dbType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDbType(String dbType) {
|
|
||||||
this.dbType = dbType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppKey() {
|
|
||||||
return appKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppKey(String appKey) {
|
|
||||||
this.appKey = appKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppSecret() {
|
|
||||||
return appSecret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppSecret(String appSecret) {
|
|
||||||
this.appSecret = appSecret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCorpid() {
|
|
||||||
return corpid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCorpid(String corpid) {
|
|
||||||
this.corpid = corpid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAgentid() {
|
|
||||||
return agentid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAgentid(String agentid) {
|
|
||||||
this.agentid = agentid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,346 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.hzya.frame.sysnew.application.appAcount.dao.impl.SysApplicationAccountDaoImpl">
|
|
||||||
|
|
||||||
<resultMap id="get-SysApplicationAccountEntity-result"
|
|
||||||
type="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
||||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
|
||||||
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
|
||||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="ipAddress" column="ip_address" jdbcType="VARCHAR"/>
|
|
||||||
<result property="port" column="port" jdbcType="VARCHAR"/>
|
|
||||||
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
|
||||||
<result property="password" column="password" jdbcType="VARCHAR"/>
|
|
||||||
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
|
|
||||||
<result property="appKey" column="app_key" jdbcType="VARCHAR"/>
|
|
||||||
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
|
|
||||||
<result property="corpid" column="corpId" jdbcType="VARCHAR"/>
|
|
||||||
<result property="agentid" column="agentId" jdbcType="VARCHAR"/>
|
|
||||||
</resultMap>
|
|
||||||
<!-- 查询的字段-->
|
|
||||||
<sql id="SysApplicationAccountEntity_Base_Column_List">
|
|
||||||
id
|
|
||||||
,create_user_id
|
|
||||||
,create_time
|
|
||||||
,modify_user_id
|
|
||||||
,modify_time
|
|
||||||
,sts
|
|
||||||
,sorts
|
|
||||||
,app_id
|
|
||||||
,name
|
|
||||||
,ip_address
|
|
||||||
,port
|
|
||||||
,db_name
|
|
||||||
,user_name
|
|
||||||
,password
|
|
||||||
,db_type
|
|
||||||
,app_key
|
|
||||||
,app_secret
|
|
||||||
,corpId
|
|
||||||
,agentId
|
|
||||||
</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"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysApplicationAccountEntity_Base_Column_List"/>
|
|
||||||
from sys_application_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
|
||||||
<if test="appId != null and appId != ''">and app_id = #{appId}</if>
|
|
||||||
<if test="name != null and name != ''">and name = #{name}</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">and ip_address = #{ipAddress}</if>
|
|
||||||
<if test="port != null and port != ''">and port = #{port}</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="password != null and password != ''">and password = #{password}</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="appSecret != null and appSecret != ''">and app_secret = #{appSecret}</if>
|
|
||||||
<if test="corpid != null and corpid != ''">and corpId = #{corpid}</if>
|
|
||||||
<if test="agentid != null and agentid != ''">and agentId = #{agentid}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询符合条件的数量 -->
|
|
||||||
<select id="entity_count" resultType="Integer"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
select count(1) from sys_application_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">and create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">and modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
|
||||||
<if test="appId != null and appId != ''">and app_id = #{appId}</if>
|
|
||||||
<if test="name != null and name != ''">and name = #{name}</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">and ip_address = #{ipAddress}</if>
|
|
||||||
<if test="port != null and port != ''">and port = #{port}</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="password != null and password != ''">and password = #{password}</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="appSecret != null and appSecret != ''">and app_secret = #{appSecret}</if>
|
|
||||||
<if test="corpid != null and corpid != ''">and corpId = #{corpid}</if>
|
|
||||||
<if test="agentid != null and agentid != ''">and agentId = #{agentid}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
|
||||||
<select id="entity_list_like" resultMap="get-SysApplicationAccountEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysApplicationAccountEntity_Base_Column_List"/>
|
|
||||||
from sys_application_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
|
|
||||||
concat('%',#{create_user_id},'%')
|
|
||||||
</if>
|
|
||||||
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
|
|
||||||
concat('%',#{modify_user_id},'%')
|
|
||||||
</if>
|
|
||||||
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
|
|
||||||
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
|
|
||||||
<if test="name != null and name != ''">and name like concat('%',#{name},'%')</if>
|
|
||||||
<if test="appId != null and appId != ''">and app_id like concat('%',#{appId},'%')</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">and ip_address like concat('%',#{ipAddress},'%')</if>
|
|
||||||
<if test="port != null and port != ''">and port like concat('%',#{port},'%')</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="password != null and password != ''">and password like concat('%',#{password},'%')</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="appSecret != null and appSecret != ''">and app_secret like concat('%',#{appSecret},'%')</if>
|
|
||||||
<if test="corpid != null and corpid != ''">and corpId like concat('%',#{corpid},'%')</if>
|
|
||||||
<if test="agentid != null and agentid != ''">and agentId like concat('%',#{agentid},'%')</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
|
||||||
<select id="SysApplicationAccountentity_list_or" resultMap="get-SysApplicationAccountEntity-result"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
select
|
|
||||||
<include refid="SysApplicationAccountEntity_Base_Column_List"/>
|
|
||||||
from sys_application_account
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">or id = #{id}</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
|
|
||||||
<if test="create_time != null">or create_time = #{create_time}</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
|
|
||||||
<if test="modify_time != null">or modify_time = #{modify_time}</if>
|
|
||||||
<if test="sts != null and sts != ''">or sts = #{sts}</if>
|
|
||||||
<if test="sorts != null">or sorts = #{sorts}</if>
|
|
||||||
<if test="name != null and name != ''">or name = #{name}</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">or ip_address = #{ipAddress}</if>
|
|
||||||
<if test="port != null and port != ''">or port = #{port}</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="password != null and password != ''">or password = #{password}</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="appSecret != null and appSecret != ''">or app_secret = #{appSecret}</if>
|
|
||||||
<if test="corpid != null and corpid != ''">or corpId = #{corpid}</if>
|
|
||||||
<if test="agentid != null and agentid != ''">or agentId = #{agentid}</if>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--新增所有列-->
|
|
||||||
<insert id="entity_insert"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity"
|
|
||||||
keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_application_account(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">id ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
|
|
||||||
<if test="create_time != null">create_time ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
|
|
||||||
<if test="modify_time != null">modify_time ,</if>
|
|
||||||
<if test="sts != null and sts != ''">sts ,</if>
|
|
||||||
<if test="sorts != null">sorts ,</if>
|
|
||||||
<if test="name != null and name != ''">name ,</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">ip_address ,</if>
|
|
||||||
<if test="port != null and port != ''">port ,</if>
|
|
||||||
<if test="dbName != null and dbName != ''">db_name ,</if>
|
|
||||||
<if test="userName != null and userName != ''">user_name ,</if>
|
|
||||||
<if test="password != null and password != ''">password ,</if>
|
|
||||||
<if test="dbType != null and dbType != ''">db_type ,</if>
|
|
||||||
<if test="appKey != null and appKey != ''">app_key ,</if>
|
|
||||||
<if test="appSecret != null and appSecret != ''">app_secret ,</if>
|
|
||||||
<if test="corpid != null and corpid != ''">corpId ,</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="sts == null ">sts,</if>
|
|
||||||
</trim>
|
|
||||||
)values(
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="id != null and id != ''">#{id} ,</if>
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
|
|
||||||
<if test="create_time != null">#{create_time} ,</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
|
|
||||||
<if test="modify_time != null">#{modify_time} ,</if>
|
|
||||||
<if test="sts != null and sts != ''">#{sts} ,</if>
|
|
||||||
<if test="sorts != null">#{sorts} ,</if>
|
|
||||||
<if test="name != null and name != ''">#{name} ,</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">#{ipAddress} ,</if>
|
|
||||||
<if test="port != null and port != ''">#{port} ,</if>
|
|
||||||
<if test="dbName != null and dbName != ''">#{dbName} ,</if>
|
|
||||||
<if test="userName != null and userName != ''">#{userName} ,</if>
|
|
||||||
<if test="password != null and password != ''">#{password} ,</if>
|
|
||||||
<if test="dbType != null and dbType != ''">#{dbType} ,</if>
|
|
||||||
<if test="appKey != null and appKey != ''">#{appKey} ,</if>
|
|
||||||
<if test="appSecret != null and appSecret != ''">#{appSecret} ,</if>
|
|
||||||
<if test="corpid != null and corpid != ''">#{corpid} ,</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 WHERE
|
|
||||||
a.sts = 'Y' ),1),
|
|
||||||
</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
|
||||||
</trim>
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增 -->
|
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_application_account(create_user_id, create_time, modify_user_id, modify_time, sts, sorts, name,
|
|
||||||
ip_address, port, db_name, user_name, password, db_type, app_key, app_secret, corpId, agentId, sts)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.sorts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid},
|
|
||||||
'Y')
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<!-- 批量新增或者修改-->
|
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into sys_application_account(create_user_id, create_time, modify_user_id, modify_time, sts, sorts, name,
|
|
||||||
ip_address, port, db_name, user_name, password, db_type, app_key, app_secret, corpId, agentId)
|
|
||||||
values
|
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.sorts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid})
|
|
||||||
</foreach>
|
|
||||||
on duplicate key update
|
|
||||||
create_user_id = values(create_user_id),
|
|
||||||
create_time = values(create_time),
|
|
||||||
modify_user_id = values(modify_user_id),
|
|
||||||
modify_time = values(modify_time),
|
|
||||||
sts = values(sts),
|
|
||||||
sorts = values(sorts),
|
|
||||||
name = values(name),
|
|
||||||
ip_address = values(ip_address),
|
|
||||||
port = values(port),
|
|
||||||
db_name = values(db_name),
|
|
||||||
user_name = values(user_name),
|
|
||||||
password = values(password),
|
|
||||||
db_type = values(db_type),
|
|
||||||
app_key = values(app_key),
|
|
||||||
app_secret = values(app_secret),
|
|
||||||
corpId = values(corpId),
|
|
||||||
agentId = values(agentId)
|
|
||||||
</insert>
|
|
||||||
<!--通过主键修改方法-->
|
|
||||||
<update id="entity_update"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
update sys_application_account set
|
|
||||||
<trim suffix="" suffixOverrides=",">
|
|
||||||
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
|
|
||||||
<if test="create_time != null">create_time = #{create_time},</if>
|
|
||||||
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
|
|
||||||
<if test="modify_time != null">modify_time = #{modify_time},</if>
|
|
||||||
<if test="sts != null and sts != ''">sts = #{sts},</if>
|
|
||||||
<if test="sorts != null">sorts = #{sorts},</if>
|
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">ip_address = #{ipAddress},</if>
|
|
||||||
<if test="port != null and port != ''">port = #{port},</if>
|
|
||||||
<if test="dbName != null and dbName != ''">db_name = #{dbName},</if>
|
|
||||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
||||||
<if test="password != null and password != ''">password = #{password},</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="appSecret != null and appSecret != ''">app_secret = #{appSecret},</if>
|
|
||||||
<if test="corpid != null and corpid != ''">corpId = #{corpid},</if>
|
|
||||||
<if test="agentid != null and agentid != ''">agentId = #{agentid},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
update sys_application_account
|
|
||||||
set sts= 'N',
|
|
||||||
modify_time = #{modify_time},
|
|
||||||
modify_user_id = #{modify_user_id}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<!-- 多条件逻辑删除 -->
|
|
||||||
<update id="entity_logicDelete_Multi_Condition"
|
|
||||||
parameterType="com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity">
|
|
||||||
update sys_application_account set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
|
||||||
<if test="id != null and id != ''">and id = #{id}</if>
|
|
||||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
|
||||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
|
||||||
<if test="name != null and name != ''">and name = #{name}</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''">and ip_address = #{ipAddress}</if>
|
|
||||||
<if test="port != null and port != ''">and port = #{port}</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="password != null and password != ''">and password = #{password}</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="appSecret != null and appSecret != ''">and app_secret = #{appSecret}</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>
|
|
||||||
and sts='Y'
|
|
||||||
</trim>
|
|
||||||
</update>
|
|
||||||
<!--通过主键删除-->
|
|
||||||
<delete id="entity_delete">
|
|
||||||
delete
|
|
||||||
from sys_application_account
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
package com.hzya.frame.sysnew.application.appAcount.service;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用账户表(SysApplicationAccount)表服务接口
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-05-10 15:52:25
|
|
||||||
*/
|
|
||||||
public interface ISysApplicationAccountService extends IBaseService<SysApplicationAccountEntity, 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);
|
|
||||||
}
|
|
|
@ -1,187 +0,0 @@
|
||||||
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.hzya.frame.sysnew.application.appAcount.entity.SysApplicationAccountEntity;
|
|
||||||
import com.hzya.frame.sysnew.application.appAcount.dao.ISysApplicationAccountDao;
|
|
||||||
import com.hzya.frame.sysnew.application.appAcount.service.ISysApplicationAccountService;
|
|
||||||
import com.hzya.frame.web.entity.BaseResult;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用账户表(SysApplicationAccount)表服务实现类
|
|
||||||
*
|
|
||||||
* @author xiang2lin
|
|
||||||
* @since 2025-05-10 15:52:26
|
|
||||||
*/
|
|
||||||
@Service(value = "sysApplicationAccountService")
|
|
||||||
public class SysApplicationAccountServiceImpl extends BaseService<SysApplicationAccountEntity, String> implements ISysApplicationAccountService {
|
|
||||||
|
|
||||||
private ISysApplicationAccountDao sysApplicationAccountDao;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public void setSysApplicationAccountDao(ISysApplicationAccountDao dao) {
|
|
||||||
this.sysApplicationAccountDao = dao;
|
|
||||||
this.dao = dao;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存账户信息
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity saveAccount(JSONObject object) {
|
|
||||||
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class);
|
|
||||||
try {
|
|
||||||
checkParam(entity,"save");
|
|
||||||
}catch (Exception e){
|
|
||||||
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);
|
|
||||||
return BaseResult.getSuccessMessageEntity("新增成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新账户信息
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity updateAccount(JSONObject object) {
|
|
||||||
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class);
|
|
||||||
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("更新成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除账户信息
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity deleteAccount(JSONObject object) {
|
|
||||||
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class);
|
|
||||||
try {
|
|
||||||
checkParam(entity,"delete");
|
|
||||||
}catch (Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
sysApplicationAccountDao.logicRemove(entity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("删除成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询账户详情
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity getAccount(JSONObject object) {
|
|
||||||
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class);
|
|
||||||
try {
|
|
||||||
checkParam(entity,"get");
|
|
||||||
}catch (Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
SysApplicationAccountEntity sysApplicationAccountEntity = sysApplicationAccountDao.get(entity.getId());
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询账户详情成功",sysApplicationAccountEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询账户列表数据
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity queryAccountList(JSONObject object) {
|
|
||||||
SysApplicationAccountEntity entity = getData("jsonStr", object, SysApplicationAccountEntity.class);
|
|
||||||
try {
|
|
||||||
checkParam(entity,"queryList");
|
|
||||||
}catch (Exception e){
|
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
|
||||||
}
|
|
||||||
List<SysApplicationAccountEntity> queryList = sysApplicationAccountDao.query(entity);
|
|
||||||
return BaseResult.getSuccessMessageEntity("查询列表成功",queryList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询账户分页数据
|
|
||||||
*
|
|
||||||
* @param object
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//根据账户名称查询
|
|
||||||
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){
|
|
||||||
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不能为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,338 +0,0 @@
|
||||||
package com.hzya.frame.sysnew.login.impl;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.SaTokenInfo;
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import cn.hutool.http.HttpRequest;
|
|
||||||
import cn.hutool.http.HttpUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.dingtalk.api.DefaultDingTalkClient;
|
|
||||||
import com.dingtalk.api.DingTalkClient;
|
|
||||||
import com.dingtalk.api.request.OapiGettokenRequest;
|
|
||||||
import com.dingtalk.api.request.OapiV2UserGetRequest;
|
|
||||||
import com.dingtalk.api.request.OapiV2UserGetuserinfoRequest;
|
|
||||||
import com.dingtalk.api.response.OapiGettokenResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2UserGetResponse;
|
|
||||||
import com.dingtalk.api.response.OapiV2UserGetuserinfoResponse;
|
|
||||||
import com.hzya.frame.sysnew.application.dao.ISysApplicationDao;
|
|
||||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
|
||||||
import com.hzya.frame.sysnew.login.ILoginService;
|
|
||||||
import com.hzya.frame.sysnew.organ.dao.ISysOrganDao;
|
|
||||||
import com.hzya.frame.sysnew.organ.entity.SysOrganEntity;
|
|
||||||
import com.hzya.frame.sysnew.person.dao.ISysPersonDao;
|
|
||||||
import com.hzya.frame.sysnew.person.entity.SysPersonEntity;
|
|
||||||
import com.hzya.frame.sysnew.popedomInterface.entity.SysPopedomInterfaceEntity;
|
|
||||||
import com.hzya.frame.sysnew.popedomInterface.service.impl.InterfaceCache;
|
|
||||||
import com.hzya.frame.sysnew.sysInterface.entity.SysInterfaceEntity;
|
|
||||||
import com.hzya.frame.sysnew.user.dao.ISysUserDao;
|
|
||||||
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
|
|
||||||
import com.hzya.frame.sysnew.userCompany.dao.ISysUserCompanyDao;
|
|
||||||
import com.hzya.frame.sysnew.userCompany.entity.SysUserCompanyEntity;
|
|
||||||
import com.hzya.frame.sysnew.userRoles.entity.SysUserRolesEntity;
|
|
||||||
import com.hzya.frame.util.AESUtil;
|
|
||||||
import com.hzya.frame.web.entity.BaseResult;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
import com.hzya.frame.web.exception.BaseSystemException;
|
|
||||||
import org.checkerframework.checker.units.qual.C;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description 登录
|
|
||||||
* @Author xiangerlin
|
|
||||||
* @Date 2022/12/20 16:09
|
|
||||||
**/
|
|
||||||
@Service(value = "loginService")
|
|
||||||
public class LoginServiceImpl implements ILoginService {
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(LoginServiceImpl.class);
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ISysUserDao sysUserDao;
|
|
||||||
@Resource
|
|
||||||
private ISysPersonDao sysPersonDao;
|
|
||||||
@Resource
|
|
||||||
private ISysOrganDao sysOrganDao;
|
|
||||||
@Value("${zt.url}")
|
|
||||||
private String url ;
|
|
||||||
@Resource
|
|
||||||
private ISysApplicationDao sysApplicationDao;
|
|
||||||
@Resource
|
|
||||||
private InterfaceCache interfaceCache;
|
|
||||||
/**
|
|
||||||
* 登录
|
|
||||||
*
|
|
||||||
* @param jsonObject
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity doLogin(JSONObject jsonObject) throws Exception {
|
|
||||||
SysUserEntity entity = getData("jsonStr", jsonObject, SysUserEntity.class);
|
|
||||||
if (entity == null) {
|
|
||||||
return BaseResult.getFailureMessageEntity("请输入用户名或密码");
|
|
||||||
}
|
|
||||||
if (entity.getPassword() == null || "".equals(entity.getPassword())) {
|
|
||||||
return BaseResult.getFailureMessageEntity("请输入用户名或密码");
|
|
||||||
}
|
|
||||||
if (entity.getLoginCode() == null || "".equals(entity.getLoginCode())) {
|
|
||||||
return BaseResult.getFailureMessageEntity("请输入用户名或密码");
|
|
||||||
}
|
|
||||||
entity.setPassword(AESUtil.encrypt(entity.getLoginCode() + "-" + entity.getPassword()));
|
|
||||||
SysUserEntity sysUserEntity = new SysUserEntity();
|
|
||||||
sysUserEntity.setLoginCode(entity.getLoginCode());
|
|
||||||
sysUserEntity.setPassword(entity.getPassword());
|
|
||||||
sysUserEntity = sysUserDao.queryOne(sysUserEntity);
|
|
||||||
if (sysUserEntity == null || sysUserEntity.getId() == null || "".equals(sysUserEntity.getId())) {
|
|
||||||
return BaseResult.getFailureMessageEntity("用户名或密码错误");
|
|
||||||
}
|
|
||||||
if (sysUserEntity.getState() == null || !"0".equals(sysUserEntity.getState())) {
|
|
||||||
return BaseResult.getFailureMessageEntity("当前用户已停用,请先启用");
|
|
||||||
}
|
|
||||||
if(sysUserEntity.getPersonId() != null &&!"".equals(sysUserEntity.getPersonId())){
|
|
||||||
SysPersonEntity sysPersonEntity = sysPersonDao.get(sysUserEntity.getPersonId());
|
|
||||||
if(sysPersonEntity != null && sysPersonEntity.getPersonName()!= null){
|
|
||||||
sysUserEntity.setPersonName(sysPersonEntity.getPersonName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//校验当前登陆人是否有权限
|
|
||||||
//boolean flag = false;
|
|
||||||
//SysInterfaceEntity sysInterfaceEntity = (SysInterfaceEntity) interfaceCache.get("6","beanNameloginServiceinterfacNamedoLogin");
|
|
||||||
//if(sysInterfaceEntity == null || sysInterfaceEntity.getId() == null){
|
|
||||||
// return BaseResult.getFailureMessageEntity("用户无访问权限,请联系管理员");
|
|
||||||
//}
|
|
||||||
////查询用户权限
|
|
||||||
//if(!flag){
|
|
||||||
// SysPopedomInterfaceEntity userPopedomInterfaceEntity = (SysPopedomInterfaceEntity) interfaceCache.get("4","userId"+sysUserEntity.getId()+"interfaceId"+sysInterfaceEntity.getId());
|
|
||||||
// if(userPopedomInterfaceEntity != null && userPopedomInterfaceEntity.getId() != null ){
|
|
||||||
// flag = true;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
////查询用户角色的权限
|
|
||||||
//if(!flag){
|
|
||||||
// List<SysUserRolesEntity> userRoleMap = (List<SysUserRolesEntity>) interfaceCache.get("3",null);
|
|
||||||
// if(userRoleMap != null && userRoleMap.size() > 0){
|
|
||||||
// for (SysUserRolesEntity sysUserRolesEntity : userRoleMap) {
|
|
||||||
// if(sysUserRolesEntity.getUserId().equals(sysUserEntity.getId())){
|
|
||||||
// SysPopedomInterfaceEntity sysPopedomInterfaceEntity = (SysPopedomInterfaceEntity) interfaceCache.get("5","roleId"+sysUserRolesEntity.getRoleId()+"interfaceId"+sysInterfaceEntity.getId());
|
|
||||||
// if(sysPopedomInterfaceEntity != null && sysPopedomInterfaceEntity.getId() != null ){
|
|
||||||
// flag = true;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//if(!flag){
|
|
||||||
// return BaseResult.getFailureMessageEntity("用户无访问权限,请联系管理员");
|
|
||||||
//}
|
|
||||||
//登录
|
|
||||||
StpUtil.login(sysUserEntity.getId());
|
|
||||||
//修改ddid或者修改微信id
|
|
||||||
if((entity.getDdUserId() != null && !"".equals(entity.getDdUserId()))
|
|
||||||
|| (entity.getWxUserId() != null && !"".equals(entity.getWxUserId())) ){
|
|
||||||
sysUserEntity.setDdUserId(entity.getDdUserId());
|
|
||||||
sysUserEntity.setWxUserId(entity.getWxUserId());
|
|
||||||
sysUserDao.update(sysUserEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取token
|
|
||||||
SaTokenInfo tokenInfo = StpUtil.getTokenInfo();
|
|
||||||
String token = tokenInfo.getTokenValue();
|
|
||||||
//获取公司
|
|
||||||
SysOrganEntity sysOrganEntity = new SysOrganEntity();
|
|
||||||
sysOrganEntity.setUserId(sysUserEntity.getId());
|
|
||||||
List<SysOrganEntity> sysOrganEntities = sysOrganDao.queryUserCompany(sysOrganEntity);
|
|
||||||
//返回值
|
|
||||||
JSONObject res = new JSONObject();
|
|
||||||
res.put("zt-token", token);
|
|
||||||
res.put("userInfo", sysUserEntity);
|
|
||||||
res.put("company", sysOrganEntities);
|
|
||||||
|
|
||||||
|
|
||||||
//切换数据源查询
|
|
||||||
return BaseResult.getSuccessMessageEntity("登录成功", res);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****
|
|
||||||
* 移动端登录地址
|
|
||||||
* @content:
|
|
||||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
|
||||||
* @date 2024-09-14 11:14
|
|
||||||
* @param
|
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public JsonResultEntity appDoLogin(JSONObject jsonObject) {
|
|
||||||
//移动端类型
|
|
||||||
JSONObject entity = getData("jsonStr", jsonObject, JSONObject.class);
|
|
||||||
logger.error(entity.toString());
|
|
||||||
//boolean f = true;
|
|
||||||
//if(f){
|
|
||||||
// return BaseResult.getFailureMessageEntity("cuowu",entity);
|
|
||||||
//}
|
|
||||||
//DD,weChat
|
|
||||||
String appType = entity.getString("appType");
|
|
||||||
String appId = entity.getString("appId");
|
|
||||||
String apiCode = entity.getString("apiCode");
|
|
||||||
String userApiCode = entity.getString("userApiCode");
|
|
||||||
SysUserEntity userEntity = new SysUserEntity();
|
|
||||||
switch (appType){
|
|
||||||
case "DD":
|
|
||||||
String code = entity.getString("code");//授权码
|
|
||||||
String requestType = entity.getString("UserAgent");// pc端还是移动端
|
|
||||||
JSONObject bodyParams = new JSONObject();
|
|
||||||
bodyParams.put("code",code);
|
|
||||||
String result = HttpRequest.post(url).
|
|
||||||
header("appId",appId).
|
|
||||||
header("apiCode",userApiCode).
|
|
||||||
header("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
|
|
||||||
header("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
|
||||||
body(bodyParams.toJSONString()).
|
|
||||||
execute().
|
|
||||||
body();
|
|
||||||
JSONObject resultJson = JSONObject.parseObject(result);
|
|
||||||
boolean flag = resultJson.getBoolean("flag");
|
|
||||||
if(!flag){
|
|
||||||
return BaseResult.getFailureMessageEntity("请求错误:"+resultJson.getString("msg"));
|
|
||||||
}
|
|
||||||
String userid = resultJson.getJSONObject("attribute").getJSONObject("result").getString("userid");
|
|
||||||
if(StrUtil.isEmpty(userid)){
|
|
||||||
return BaseResult.getFailureMessageEntity("认证失败!获取钉钉userid错误","1006");
|
|
||||||
}
|
|
||||||
userEntity.setDdUserId( userid);
|
|
||||||
userEntity = sysUserDao.queryOne(userEntity);
|
|
||||||
if(null == userEntity ){
|
|
||||||
JSONObject object = new JSONObject();
|
|
||||||
object.put("userid",userid);
|
|
||||||
return BaseResult.getFailureMessageEntity("认证失败!当前用户未绑定钉钉","1005",object);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "weChat":
|
|
||||||
String authCode = entity.getString("code");//授权码
|
|
||||||
JSONObject params = new JSONObject();
|
|
||||||
params.put("code",authCode);
|
|
||||||
params.put("corpid",entity.getString("corpid"));
|
|
||||||
params.put("corpsecret",entity.getString("corpsecret"));
|
|
||||||
params.put("access_token",entity.getString("access_token"));
|
|
||||||
String res = HttpRequest.post(url).
|
|
||||||
header("appId",appId).
|
|
||||||
header("apiCode",userApiCode).
|
|
||||||
header("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
|
|
||||||
header("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
|
||||||
body(params.toJSONString()).
|
|
||||||
execute().
|
|
||||||
body();
|
|
||||||
JSONObject resJsonObject = JSONObject.parseObject(res);
|
|
||||||
JSONObject attribute = resJsonObject.getJSONObject("attribute");
|
|
||||||
String attributeCode = attribute.getString("code");
|
|
||||||
String attributeMsg = attribute.getString("msg");
|
|
||||||
if(!"200".equals(attributeCode)){
|
|
||||||
return BaseResult.getFailureMessageEntity("请求错误:"+attributeMsg);
|
|
||||||
}
|
|
||||||
String weComUserid = attribute.getString("data");
|
|
||||||
userEntity.setWxUserId(weComUserid);
|
|
||||||
userEntity = sysUserDao.queryOne(userEntity);
|
|
||||||
if(null == userEntity ){
|
|
||||||
JSONObject object = new JSONObject();
|
|
||||||
object.put("userid",weComUserid);
|
|
||||||
return BaseResult.getFailureMessageEntity("认证失败!当前用户未绑定企业微信","1005",object);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return BaseResult.getFailureMessageEntity("错误的App类型:"+appType+" 支持的app类型有:DD,weChat");
|
|
||||||
|
|
||||||
}
|
|
||||||
//登录
|
|
||||||
StpUtil.login(userEntity.getId());
|
|
||||||
//获取token
|
|
||||||
SaTokenInfo tokenInfo = StpUtil.getTokenInfo();
|
|
||||||
String token = tokenInfo.getTokenValue();
|
|
||||||
//获取公司
|
|
||||||
SysOrganEntity sysOrganEntity = new SysOrganEntity();
|
|
||||||
sysOrganEntity.setUserId(userEntity.getId());
|
|
||||||
List<SysOrganEntity> sysOrganEntities = sysOrganDao.queryUserCompany(sysOrganEntity);
|
|
||||||
//返回值
|
|
||||||
JSONObject res = new JSONObject();
|
|
||||||
res.put("token", token);
|
|
||||||
res.put("userInfo", userEntity);
|
|
||||||
res.put("company", sysOrganEntities);
|
|
||||||
//切换数据源查询
|
|
||||||
|
|
||||||
return BaseResult.getSuccessMessageEntity("登录成功", res);
|
|
||||||
|
|
||||||
//校验当前登陆人是否有权限
|
|
||||||
//boolean flag = false;
|
|
||||||
//SysInterfaceEntity sysInterfaceEntity = (SysInterfaceEntity) interfaceCache.get("6","beanNameloginServiceinterfacNamedoLogin");
|
|
||||||
//if(sysInterfaceEntity == null || sysInterfaceEntity.getId() == null){
|
|
||||||
// return BaseResult.getFailureMessageEntity("用户无访问权限,请联系管理员");
|
|
||||||
//}
|
|
||||||
////查询用户权限
|
|
||||||
//if(!flag){
|
|
||||||
// SysPopedomInterfaceEntity userPopedomInterfaceEntity = (SysPopedomInterfaceEntity) interfaceCache.get("4","userId"+sysUserEntity.getId()+"interfaceId"+sysInterfaceEntity.getId());
|
|
||||||
// if(userPopedomInterfaceEntity != null && userPopedomInterfaceEntity.getId() != null ){
|
|
||||||
// flag = true;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
////查询用户角色的权限
|
|
||||||
//if(!flag){
|
|
||||||
// List<SysUserRolesEntity> userRoleMap = (List<SysUserRolesEntity>) interfaceCache.get("3",null);
|
|
||||||
// if(userRoleMap != null && userRoleMap.size() > 0){
|
|
||||||
// for (SysUserRolesEntity sysUserRolesEntity : userRoleMap) {
|
|
||||||
// if(sysUserRolesEntity.getUserId().equals(sysUserEntity.getId())){
|
|
||||||
// SysPopedomInterfaceEntity sysPopedomInterfaceEntity = (SysPopedomInterfaceEntity) interfaceCache.get("5","roleId"+sysUserRolesEntity.getRoleId()+"interfaceId"+sysInterfaceEntity.getId());
|
|
||||||
// if(sysPopedomInterfaceEntity != null && sysPopedomInterfaceEntity.getId() != null ){
|
|
||||||
// flag = true;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//if(!flag){
|
|
||||||
// return BaseResult.getFailureMessageEntity("用户无访问权限,请联系管理员");
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private JSONObject getAccess_token(String appId,String apiCode) {
|
|
||||||
String result = HttpRequest.post(url).
|
|
||||||
header("appId",appId).
|
|
||||||
header("apiCode",apiCode).
|
|
||||||
header("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
|
|
||||||
header("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
|
||||||
execute().
|
|
||||||
body();
|
|
||||||
JSONObject resultJson = JSONObject.parseObject(result);
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected <T> T getData(String key, JSONObject jsonObject, Class<T> clz) {
|
|
||||||
if (checkStr(jsonObject.getString(key))) {
|
|
||||||
return jsonObject.getJSONObject(key).toJavaObject(clz);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param str
|
|
||||||
* @return void
|
|
||||||
* @Author lvleigang
|
|
||||||
* @Description 校验字符串
|
|
||||||
* @Date 11:41 上午 2022/12/7
|
|
||||||
**/
|
|
||||||
protected Boolean checkStr(String str) {
|
|
||||||
Boolean flag = true;
|
|
||||||
if (str == null || "".equals(str)) {
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,105 +0,0 @@
|
||||||
<?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>
|
|
||||||
<artifactId>kangarooDataCenterV3</artifactId>
|
|
||||||
<groupId>com.hzya.frame</groupId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<artifactId>base-webapp</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hzya.frame</groupId>
|
|
||||||
<artifactId>base-service</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-bip</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-cbs</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-dd</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-grpU8</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-nc</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-ncc</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-ningbobank</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-oa</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-u8</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-u8c</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-u9c</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
|
||||||
<!-- <artifactId>fw-weixin</artifactId>-->
|
|
||||||
<!-- <version>${revision}</version>-->
|
|
||||||
<!-- </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> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?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>
|
||||||
|
<artifactId>kangarooDataCenterV3</artifactId>
|
||||||
|
<groupId>com.hzya.frame</groupId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>buildpackage</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<!-- 统一管理依赖版本-->
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.hzya.frame</groupId>
|
||||||
|
<artifactId>webapp</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- <!– 淘宝奇门sdk–>-->
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>com.reabam.sdk</groupId>-->
|
||||||
|
<!-- <artifactId>reabam-sdk-java</artifactId>-->
|
||||||
|
<!-- <version>1.0</version>-->
|
||||||
|
<!-- <scope>system</scope>-->
|
||||||
|
<!-- <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/openapi-sdk-1.0.0.jar</systemPath>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>com.taobao.qmsdk</groupId>-->
|
||||||
|
<!-- <artifactId>taobao-sdk-java-auto</artifactId>-->
|
||||||
|
<!-- <version>1.1</version>-->
|
||||||
|
<!-- <scope>system</scope>-->
|
||||||
|
<!-- <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/taobao-sdk-java-auto-1.1.jar</systemPath>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>local</id> <!--本地环境-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>local</profile.active>
|
||||||
|
</properties>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>dev</id> <!--开发环境-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>dev</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>ax</id> <!--澳星-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>ax</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>hclocal</id> <!--何灿-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>hclocal</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>llg</id> <!--吕磊钢-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>llg</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>zqtlocal</id> <!--曾庆拓-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>zqtlocal</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>yuqh</id> <!--于群辉-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>yuqh</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>xel</id> <!--相二林-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>xel</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>ydc</id> <!--英德赛-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>ydc</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>yc</id> <!--越城区-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>yc</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
<build>
|
||||||
|
<finalName>kangarooDataCenterV3</finalName>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
|
@ -158,7 +158,7 @@ public class BackUpDatabaseInitializer extends PluginBaseEntity {
|
||||||
// 构建 mysqldump 命令
|
// 构建 mysqldump 命令
|
||||||
ProcessBuilder processBuilder = new ProcessBuilder(
|
ProcessBuilder processBuilder = new ProcessBuilder(
|
||||||
"mysqldump",
|
"mysqldump",
|
||||||
"--ssl-mode=DISABLED",
|
"--single-transaction",
|
||||||
"-h", host,
|
"-h", host,
|
||||||
"-u", username,
|
"-u", username,
|
||||||
"-p" + password,
|
"-p" + password,
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.plugin.a8bill.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织档案(mdm_org: table)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-07 18:30:04
|
||||||
|
*/
|
||||||
|
public interface IPayBillDao extends IBaseDao<PayBillEntity, String> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hzya.frame.plugin.a8bill.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.plugin.a8bill.dao.IPayBillDao;
|
||||||
|
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织档案(MdmOrg)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-07 18:30:04
|
||||||
|
*/
|
||||||
|
public class PayBillDaoImpl extends MybatisGenericDao<PayBillEntity, String> implements IPayBillDao {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.hzya.frame.plugin.a8bill.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款单
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-07 18:30:04
|
||||||
|
*/
|
||||||
|
public class PayBillEntity extends BaseEntity {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.plugin.a8bill.dao.impl.PayBillDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-PayBillEntity-result" type="com.hzya.frame.plugin.a8bill.entity.PayBillEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "PayBillEntity_Base_Column_List">
|
||||||
|
id
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.hzya.frame.plugin.a8bill.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
|
||||||
|
import com.hzya.frame.seeyon.paybill.service.IPayBillService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款单(PayBill)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-07 18:30:05
|
||||||
|
*/
|
||||||
|
public class PayBillPluginInitializer extends PluginBaseEntity{
|
||||||
|
Logger logger = LoggerFactory.getLogger(PayBillPluginInitializer.class);
|
||||||
|
@Autowired
|
||||||
|
private IPayBillService payBillService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "PayBillPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "PayBillPlugin插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "PayBillPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||||
|
try {
|
||||||
|
logger.info("======开始执行付款单据信息同步========");
|
||||||
|
return payBillService.sendEngineerPayBillToBip(requestJson);
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("======执行付款单据同步失败:{}========",e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.hzya.frame.plugin.a8bill.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.seeyon.paybill.service.IPayBillService;
|
||||||
|
import com.hzya.frame.seeyon.recbill.service.IRecBillService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收款单(RecBill)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-07 18:30:05
|
||||||
|
*/
|
||||||
|
public class RecBillPluginInitializer extends PluginBaseEntity{
|
||||||
|
Logger logger = LoggerFactory.getLogger(RecBillPluginInitializer.class);
|
||||||
|
@Autowired
|
||||||
|
private IRecBillService recBillService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "RecBillPluginInitializer";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "RecBillPluginInitializer插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "RecBillPluginInitializer";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||||
|
try {
|
||||||
|
logger.info("======开始执行收款单据信息同步========");
|
||||||
|
return recBillService.sendRecBillToBip(requestJson);
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("======执行收款单据同步失败:{}========",e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.hzya.frame.plugin.a8bill.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款单
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-07 18:30:05
|
||||||
|
*/
|
||||||
|
public interface IPayBillService extends IBaseService<PayBillEntity, String>{
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.hzya.frame.plugin.a8bill.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||||
|
import com.hzya.frame.plugin.a8bill.service.IPayBillService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* private IMdmOrgDao mdmOrgDao;
|
||||||
|
*
|
||||||
|
* @Autowired
|
||||||
|
* public void setMdmOrgDao(IMdmOrgDao dao) {
|
||||||
|
* this.mdmOrgDao = dao;
|
||||||
|
* this.dao = dao;
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-07 18:30:05
|
||||||
|
*/
|
||||||
|
public class PayBillServiceImpl extends BaseService<PayBillEntity, String> implements IPayBillService {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.cbs8.dto.req.AgentPayResultRequestDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.AgentPayQueryDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.AgentPayResultResDTO;
|
||||||
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.checkerframework.checker.units.qual.A;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/18 17:22
|
||||||
|
**/
|
||||||
|
public class AgentPayResultPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(AgentPayResultPluginInitializer.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICbsPluginService cbsPluginService;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "CBS8AgentPayResultPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "cbs8代发代扣详情查询插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "cbs8代发代扣详情查询插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
//1、查询代发代扣交易未完成代
|
||||||
|
//2、调用cbs接口
|
||||||
|
AgentPayResultRequestDTO agentPayResultRequestDTO = new AgentPayResultRequestDTO();
|
||||||
|
agentPayResultRequestDTO.setBusNum("PA00034224062600011");
|
||||||
|
AgentPayResultResDTO agentPayResultResDTO = cbsPluginService.agentPayResult(agentPayResultRequestDTO);
|
||||||
|
//记录日志
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 电子回单定时任务
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/17 14:03
|
||||||
|
**/
|
||||||
|
public class ElecBillPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Autowired
|
||||||
|
private ICbsPluginService cbsPluginService;
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "CBS8ElecBillPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "cbs8电子回单插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "cbs8电子回单插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
cbsPluginService.elecBillUpload(requestJson);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.PayResponseDTO;
|
||||||
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/18 14:03
|
||||||
|
**/
|
||||||
|
public class PayApplyAgentPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(PayApplyAgentPluginInitializer.class);
|
||||||
|
@Autowired
|
||||||
|
private ICbsPluginService cbsPluginService;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAgentPaymentService agentPaymentService;
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "CBS8PayApplyAgentPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "cbs8代发代扣插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "cbs8代发代扣插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
//1、查询代支付的
|
||||||
|
AgentPaymentEntity agentPaymentEntity = new AgentPaymentEntity();
|
||||||
|
agentPaymentEntity.setOaId("4442823497745714629");
|
||||||
|
cbsPluginService.applyAgentPay(agentPaymentEntity);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,112 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 经办支付申请
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/7 13:42
|
||||||
|
**/
|
||||||
|
public class PayApplyPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(PayApplyPluginInitializer.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICbsPluginService cbsPluginService;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "CBS8PayApplyPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "cbs8支付申请插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "cbs8支付申请插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
PaymentEntity paymentEntity = null;
|
||||||
|
if (null != requestJson){
|
||||||
|
requestJson.remove("jsonStr");
|
||||||
|
paymentEntity = JSONObject.parseObject(requestJson.toString(),PaymentEntity.class);
|
||||||
|
}
|
||||||
|
if (null == paymentEntity)
|
||||||
|
paymentEntity = new PaymentEntity();
|
||||||
|
//支付申请
|
||||||
|
paymentEntity.setOaId("8475071606892874568");
|
||||||
|
cbsPluginService.applyPay(paymentEntity);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 查询支付结果
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/14 16:24
|
||||||
|
**/
|
||||||
|
public class PayResultPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(PayResultPluginInitializer.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICbsPluginService cbsPluginService;
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "CBS8PayResultPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "cbs8支付结果查询插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "cbs8支付结果查询插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
CbsLogEntity cbsLogEntity = null;
|
||||||
|
if (null != requestJson){
|
||||||
|
requestJson.remove("jsonStr");
|
||||||
|
cbsLogEntity = JSONObject.parseObject(requestJson.toString(),CbsLogEntity.class);
|
||||||
|
}
|
||||||
|
if (null == cbsLogEntity){
|
||||||
|
cbsLogEntity = new CbsLogEntity();
|
||||||
|
}
|
||||||
|
cbsPluginService.queryResult(cbsLogEntity);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.TransactionDetailDTO;
|
||||||
|
import com.hzya.frame.cbs8.util.CBSUtil;
|
||||||
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 交易明细查询
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/17 16:03
|
||||||
|
**/
|
||||||
|
public class TransactionDetailPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICbsPluginService cbsPluginService;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "CBS8TransactionDetailQueryPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "cbs8交易明细查询插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "cbs8交易明细查询插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
TransactionDetailReqDTO transactionDetailReqDTO = null;
|
||||||
|
if (null != requestJson){
|
||||||
|
requestJson.remove("jsonStr");
|
||||||
|
transactionDetailReqDTO = JSONObject.parseObject(requestJson.toString(),TransactionDetailReqDTO.class);
|
||||||
|
}
|
||||||
|
if (null == transactionDetailReqDTO){
|
||||||
|
transactionDetailReqDTO = new TransactionDetailReqDTO();
|
||||||
|
}
|
||||||
|
transactionDetailReqDTO.setCurrentPage(CBSUtil.DEFAULT_CURRENT_PAGE);
|
||||||
|
transactionDetailReqDTO.setPageSize(CBSUtil.DEFAULT_PAGE_SIZE);
|
||||||
|
transactionDetailReqDTO.setStartDate(DateUtil.today());
|
||||||
|
transactionDetailReqDTO.setEndDate(DateUtil.today());
|
||||||
|
transactionDetailReqDTO.setDateType("0");
|
||||||
|
transactionDetailReqDTO.setLoanType("2");
|
||||||
|
//1查询交易明细
|
||||||
|
List<TransactionDetailDTO> transactionDetailList = cbsPluginService.queryTransactionDetail(transactionDetailReqDTO);
|
||||||
|
//保存交易明细到OA底表
|
||||||
|
cbsPluginService.saveTransactionDetail(transactionDetailList);
|
||||||
|
return new JsonResultEntity("成功",true,transactionDetailList);
|
||||||
|
//return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.cbs8.dto.req.AgentPayResultRequestDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.AgentPayResultResDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.PayResponseDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.TransactionDetailDTO;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/17 08:46
|
||||||
|
**/
|
||||||
|
public interface ICbsPluginService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付申请
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void applyPay(PaymentEntity entity)throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存支付申请日志
|
||||||
|
* @param entity
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void savePayLog(PaymentEntity entity,PayResponseDTO payResponseDTO)throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支付申请的交易结果
|
||||||
|
* @param cbsLogEntity
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void queryResult(CbsLogEntity cbsLogEntity)throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电子回单查询 并上传OA
|
||||||
|
* @param requestJson
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void elecBillUpload(JSONObject requestJson)throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询交易明细
|
||||||
|
* transactionDetailReqDTO.currentPage 、 transactionDetailReqDTO.pageSize 必填
|
||||||
|
* @param transactionDetailReqDTO
|
||||||
|
*/
|
||||||
|
List<TransactionDetailDTO> queryTransactionDetail(TransactionDetailReqDTO transactionDetailReqDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代发代扣 支付申请
|
||||||
|
* @param paymentEntity
|
||||||
|
*/
|
||||||
|
void applyAgentPay(AgentPaymentEntity paymentEntity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代发代扣 结果详情查询
|
||||||
|
* @param agentPayResultRequestDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存交易明细到OA底表
|
||||||
|
* @param transactionDetailList
|
||||||
|
*/
|
||||||
|
void saveTransactionDetail(List<TransactionDetailDTO> transactionDetailList);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,513 @@
|
||||||
|
package com.hzya.frame.plugin.cbs8.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import cn.hutool.core.map.MapBuilder;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
import com.hzya.frame.cbs8.dto.req.*;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.*;
|
||||||
|
import com.hzya.frame.cbs8.service.ICbs8Service;
|
||||||
|
import com.hzya.frame.cbs8.util.CBSUtil;
|
||||||
|
import com.hzya.frame.cbs8.util.CurrencyEnum;
|
||||||
|
import com.hzya.frame.cbs8.util.PayState;
|
||||||
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
import com.hzya.frame.seeyon.cap4.form.dto.*;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.*;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.service.*;
|
||||||
|
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
|
||||||
|
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||||
|
import com.hzya.frame.seeyon.service.ICtpAttachmentService;
|
||||||
|
import com.hzya.frame.seeyon.util.RestUtil;
|
||||||
|
import com.hzya.frame.uuid.UUIDLong;
|
||||||
|
import com.hzya.frame.web.exception.BaseSystemException;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/17 08:46
|
||||||
|
**/
|
||||||
|
public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(CbsPluginServiceImpl.class);
|
||||||
|
@Autowired
|
||||||
|
private ICbs8Service cbs8Service;
|
||||||
|
@Autowired
|
||||||
|
private IPaymentService paymentService;
|
||||||
|
@Autowired
|
||||||
|
private ICbsLogService cbsLogService;
|
||||||
|
@Autowired
|
||||||
|
private ICtpAttachmentService ctpAttachmentService;
|
||||||
|
@Autowired
|
||||||
|
private ITransactionDetailService transactionDetailService;
|
||||||
|
@Autowired
|
||||||
|
private IAgentPaymentService agentPaymentService;
|
||||||
|
@Autowired
|
||||||
|
private IAgentPaymentDetailService agentPaymentDetailService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RestUtil restUtil;
|
||||||
|
@Value("${cbs8.elec_path:}")
|
||||||
|
private String elec_path;
|
||||||
|
@Value("${OA.data_source_code:}")
|
||||||
|
private String oa_data_source_code;
|
||||||
|
/**
|
||||||
|
* 支付申请
|
||||||
|
*
|
||||||
|
* @param paymentEntity
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void applyPay(PaymentEntity paymentEntity) throws Exception{
|
||||||
|
//查询待支付的列表
|
||||||
|
if (null == paymentEntity){
|
||||||
|
paymentEntity = new PaymentEntity();
|
||||||
|
}
|
||||||
|
paymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
List<PaymentEntity> paymentList = paymentService.queryUnpaid(paymentEntity);
|
||||||
|
/* List<PaymentEntity> paymentList = new ArrayList<>();
|
||||||
|
paymentEntity.setReferenceNum("CL202406140001");
|
||||||
|
paymentEntity.setPayAccount("655905707410000");
|
||||||
|
paymentEntity.setPayBankName("");
|
||||||
|
paymentEntity.setAmount("99");
|
||||||
|
paymentEntity.setRevAccount("123456778");
|
||||||
|
paymentEntity.setRevBankName("中国工商银行总行清算中心");
|
||||||
|
paymentEntity.setRevBankType("ICB");
|
||||||
|
paymentEntity.setRevAccountName("测试账户");
|
||||||
|
paymentEntity.setCnapsCode("102100099996");
|
||||||
|
paymentEntity.setPurpose("测试用途");
|
||||||
|
paymentEntity.setBusType("202");
|
||||||
|
paymentEntity.setCurrency("10");
|
||||||
|
paymentEntity.setPurpose("测试用途");
|
||||||
|
paymentList.add(paymentEntity);*/
|
||||||
|
if (CollectionUtils.isNotEmpty(paymentList)){
|
||||||
|
for (PaymentEntity pay : paymentList) {
|
||||||
|
//调用支付申请接口
|
||||||
|
PayResponseDTO payResponseDTO = cbs8Service.payApply(pay);
|
||||||
|
boolean successed = payResponseDTO.getSuccessed();
|
||||||
|
if (successed){
|
||||||
|
pay.setPayResult(PayState.p.getValue());
|
||||||
|
}else {
|
||||||
|
pay.setPayResult("推送失败");
|
||||||
|
}
|
||||||
|
//4、更新OA表单
|
||||||
|
pay.setDataSourceCode(oa_data_source_code);
|
||||||
|
pay.setApplyCode(payResponseDTO.getBusNum());
|
||||||
|
paymentService.updatePayState(pay);
|
||||||
|
//5、记录操作日志
|
||||||
|
savePayLog(pay,payResponseDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存支付申请日志
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void savePayLog(PaymentEntity entity,PayResponseDTO payResponseDTO) throws Exception {
|
||||||
|
//4. 保存日志
|
||||||
|
CbsLogEntity cbsLogEntity = new CbsLogEntity();
|
||||||
|
cbsLogEntity.setTitle(entity.getTitle());
|
||||||
|
cbsLogEntity.setPay_company(entity.getPayCompany());
|
||||||
|
cbsLogEntity.setPayee(entity.getRevAccountName());
|
||||||
|
cbsLogEntity.setAmount(entity.getAmount());
|
||||||
|
cbsLogEntity.setOa_id(entity.getOaId());
|
||||||
|
cbsLogEntity.setBill_code(Convert.toStr(entity.getReferenceNumNew(),entity.getReferenceNum()));
|
||||||
|
cbsLogEntity.setTab_name_ch(entity.getBillName());
|
||||||
|
cbsLogEntity.setTab_name_en(entity.getTableName());
|
||||||
|
Boolean successed = payResponseDTO.getSuccessed();
|
||||||
|
if (successed){
|
||||||
|
cbsLogEntity.setPay_state(PayState.p.getValue());
|
||||||
|
cbsLogEntity.setApply_state(PayState.two.getValue());
|
||||||
|
cbsLogEntity.setCbs_apply_code(payResponseDTO.getBusNum());
|
||||||
|
cbsLogEntity.setSuccessed("true");
|
||||||
|
entity.setPayResult(PayState.p.getValue());
|
||||||
|
}else {
|
||||||
|
cbsLogEntity.setPay_state("推送失败");
|
||||||
|
cbsLogEntity.setMessage(payResponseDTO.getErrorMsg());
|
||||||
|
cbsLogEntity.setSuccessed("false");
|
||||||
|
entity.setPayResult("推送失败");
|
||||||
|
}
|
||||||
|
cbsLogService.saveLog(cbsLogEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支付申请的交易结果
|
||||||
|
*
|
||||||
|
* @param cbsLogEntity
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void queryResult(CbsLogEntity cbsLogEntity) throws Exception {
|
||||||
|
if (null == cbsLogEntity){
|
||||||
|
cbsLogEntity = new CbsLogEntity();
|
||||||
|
}
|
||||||
|
cbsLogEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
// 1、查询支付中的日志
|
||||||
|
List<CbsLogEntity> inPayList = cbsLogService.queryInPayment(cbsLogEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(inPayList)){
|
||||||
|
for (CbsLogEntity entity : inPayList) {
|
||||||
|
try {
|
||||||
|
List<PayResultResDTO> payResultResList = cbs8Service.queryPayResult(new PayResultRequestDTO(entity.getBill_code()));
|
||||||
|
if (CollectionUtils.isNotEmpty(payResultResList)){
|
||||||
|
PayResultResDTO payResultResDTO = payResultResList.get(0);
|
||||||
|
//支付申请状态
|
||||||
|
String status = payResultResDTO.getStatus();
|
||||||
|
//支付状态
|
||||||
|
String pay_status = payResultResDTO.getPayStatus();
|
||||||
|
//不等于支付中的时候 更新支付状态
|
||||||
|
if (!PayState.p.getType().equals(pay_status)){
|
||||||
|
//如果支付状态为空,保存支付申请状态,如果支付状态不为空,则保存支付状态
|
||||||
|
PaymentEntity paymentEntity = new PaymentEntity();
|
||||||
|
paymentEntity.setOaId(entity.getOa_id());
|
||||||
|
paymentEntity.setApplyCode(entity.getCbs_apply_code());
|
||||||
|
paymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
List<PaymentEntity> paymentList = paymentService.query(paymentEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(paymentList)){
|
||||||
|
paymentEntity = paymentList.get(0);
|
||||||
|
if (StrUtil.isEmpty(pay_status)) {
|
||||||
|
//支付申请状态 支付状态和支付申请状态用一个
|
||||||
|
paymentEntity.setPayResult(PayState.payStateGetValue(status));
|
||||||
|
} else {
|
||||||
|
//支付状态 支付状态和支付申请状态用一个
|
||||||
|
paymentEntity.setPayResult(PayState.payStateGetValue(pay_status));
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(pay_status) && pay_status.equals(PayState.g.getType())) {
|
||||||
|
//支付时间
|
||||||
|
paymentEntity.setPayDate(CBSUtil.convertTimestampToString(payResultResDTO.getPayDate()));
|
||||||
|
}
|
||||||
|
//更新视图单据状态
|
||||||
|
paymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
paymentService.updatePayState(paymentEntity);
|
||||||
|
//更新日志表状态
|
||||||
|
entity.setPay_state(paymentEntity.getPayResult());
|
||||||
|
entity.setApply_state(PayState.payStateGetValue(status));
|
||||||
|
entity.setDataSourceCode(oa_data_source_code);
|
||||||
|
cbsLogService.updateLog(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error("查询交易结果出错",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电子回单查询 并上传OA
|
||||||
|
*
|
||||||
|
* @param requestJson
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void elecBillUpload(JSONObject requestJson) throws Exception {
|
||||||
|
//查询支付成功 没有电子回单的数据
|
||||||
|
PaymentEntity paymentEntity = new PaymentEntity();
|
||||||
|
// List<PaymentEntity> paymentList = paymentService.queryElecIsNull(paymentEntity);
|
||||||
|
paymentEntity.setPayDate("2024-06-20");
|
||||||
|
paymentEntity.setReferenceNum("41");
|
||||||
|
List<PaymentEntity> paymentList = Arrays.asList(paymentEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(paymentList)) {
|
||||||
|
for (PaymentEntity pay : paymentList) {
|
||||||
|
try {
|
||||||
|
String payDate = DateUtil.format(DateUtil.parse(pay.getPayDate()), "yyyy-MM-dd");
|
||||||
|
//查询cbs电子回单
|
||||||
|
List<ElecResponseDTO> elecResList = cbs8Service.queryElecBill(new ElecRequestDTO(payDate,DateUtil.today(),pay.getReferenceNum()));
|
||||||
|
if (CollectionUtils.isNotEmpty(elecResList)){
|
||||||
|
ElecResponseDTO elecResponseDTO = elecResList.get(0);
|
||||||
|
String bucketFileUrl = elecResponseDTO.getBucketFileUrl();
|
||||||
|
String bucketFileName = elecResponseDTO.getBucketFileName();
|
||||||
|
//上传电子回单到OA
|
||||||
|
HttpUtil.downloadFile(bucketFileUrl, FileUtil.file(elec_path));//附件下载
|
||||||
|
String pdfUrl = elec_path + bucketFileName;
|
||||||
|
File file = new File(pdfUrl);
|
||||||
|
if (file.exists()) {
|
||||||
|
CtpFileEntity cpFileEntity = new CtpFileEntity();
|
||||||
|
cpFileEntity.setFile(file);
|
||||||
|
cpFileEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
JSONObject jsonObjectUpload = restUtil.fileUpload(file,"8000240005");
|
||||||
|
String file_url = jsonObjectUpload.getString("fileUrl");
|
||||||
|
if (null != jsonObjectUpload && StrUtil.isNotEmpty(file_url)) {
|
||||||
|
String sub_reference = String.valueOf(UUIDLong.longUUID());
|
||||||
|
pay.setReceipt(sub_reference);
|
||||||
|
//更新表单的电子回单值
|
||||||
|
paymentService.updateElec(pay);
|
||||||
|
//保存附件关系
|
||||||
|
CtpAttachmentEntity ctpAttachmentEntity = new CtpAttachmentEntity();
|
||||||
|
ctpAttachmentEntity.setFile_url(file_url);
|
||||||
|
ctpAttachmentService.saveAttachment(file_url, pay.getSummaryId(), sub_reference);
|
||||||
|
}
|
||||||
|
//删除本地临时文件
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error("电子回单查询出错",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询交易明细
|
||||||
|
* transactionDetailReqDTO.currentPage 、 transactionDetailReqDTO.pageSize 必填
|
||||||
|
* @param transactionDetailReqDTO
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TransactionDetailDTO> queryTransactionDetail(TransactionDetailReqDTO transactionDetailReqDTO) {
|
||||||
|
boolean hasNextPage = true;//是否有下一页
|
||||||
|
int currentPage = transactionDetailReqDTO.getCurrentPage();
|
||||||
|
int pageSize = transactionDetailReqDTO.getPageSize();
|
||||||
|
if (currentPage == 0){
|
||||||
|
currentPage = CBSUtil.DEFAULT_CURRENT_PAGE;//页码
|
||||||
|
}
|
||||||
|
if (pageSize == 0){
|
||||||
|
pageSize = CBSUtil.DEFAULT_PAGE_SIZE;//每页条数
|
||||||
|
transactionDetailReqDTO.setPageSize(pageSize);
|
||||||
|
}
|
||||||
|
List<TransactionDetailDTO> resultList = new ArrayList<>();
|
||||||
|
do{
|
||||||
|
transactionDetailReqDTO.setCurrentPage(currentPage);//页码
|
||||||
|
currentPage++;//页码自增
|
||||||
|
hasNextPage = false;//保护功能,防止出现死循环
|
||||||
|
CbsResDataDTO dataDTO = cbs8Service.queryTransactionDetail(transactionDetailReqDTO);
|
||||||
|
if (null != dataDTO){
|
||||||
|
hasNextPage = dataDTO.getHasNextPage();
|
||||||
|
List<TransactionDetailDTO> transactionDetailDTOList = CBSUtil.convertJsonArrayToList(dataDTO.getList(), TransactionDetailDTO.class);
|
||||||
|
resultList.addAll(transactionDetailDTOList);
|
||||||
|
}
|
||||||
|
}while (hasNextPage);
|
||||||
|
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代发代扣 支付申请
|
||||||
|
*
|
||||||
|
* @param paymentEntity
|
||||||
|
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void applyAgentPay(AgentPaymentEntity paymentEntity) {
|
||||||
|
try {
|
||||||
|
if (null != paymentEntity ){
|
||||||
|
paymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
List<AgentPaymentEntity> agentPaymentList = agentPaymentService.queryUnpaid(paymentEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(agentPaymentList)){
|
||||||
|
for (AgentPaymentEntity agentPay : agentPaymentList) {
|
||||||
|
AgentPaymentDetailEntity detailEntity = new AgentPaymentDetailEntity();
|
||||||
|
detailEntity.setFormmainId(agentPay.getOaId());
|
||||||
|
detailEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
List<AgentPaymentDetailEntity> agentPaymentDetailList = agentPaymentService.queryDetails(detailEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(agentPaymentDetailList)){
|
||||||
|
PaymentApplySubmitReqDTO paymentApplySubmitReqDTO = BeanUtil.copyProperties(agentPay,PaymentApplySubmitReqDTO.class);
|
||||||
|
List<PaymentApplyAgentDTO> paymentApplyAgentList = new ArrayList<>();
|
||||||
|
for (AgentPaymentDetailEntity detail : agentPaymentDetailList) {
|
||||||
|
PaymentApplyAgentDTO detailDTO = BeanUtil.copyProperties(detail,PaymentApplyAgentDTO.class);
|
||||||
|
paymentApplyAgentList.add(detailDTO);
|
||||||
|
}
|
||||||
|
//招行这里要传203
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend5("203");
|
||||||
|
PayResponseDTO payResponseDTO = cbs8Service.agentPayApply(paymentApplySubmitReqDTO,paymentApplyAgentList);
|
||||||
|
if (null != payResponseDTO){
|
||||||
|
Boolean successed = payResponseDTO.getSuccessed();
|
||||||
|
AgentPaymentEntity pay = new AgentPaymentEntity();
|
||||||
|
pay.setOaId(paymentEntity.getOaId());
|
||||||
|
pay.setDataSourceCode(oa_data_source_code);
|
||||||
|
if (successed){
|
||||||
|
//更新申请单号到OA
|
||||||
|
pay.setApplyCode(payResponseDTO.getBusNum());
|
||||||
|
pay.setPayResult("审批中");
|
||||||
|
}else {
|
||||||
|
pay.setPayResult(payResponseDTO.getErrorMsg());
|
||||||
|
}
|
||||||
|
agentPaymentService.updateResult(pay);
|
||||||
|
System.out.println(JSONObject.toJSONString(payResponseDTO));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
throw new BaseSystemException("参数不能为空");
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error("代发代扣出错:{}",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代发代扣 结果详情查询
|
||||||
|
*
|
||||||
|
* @param agentPayResultRequestDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO) {
|
||||||
|
try {
|
||||||
|
if (null != agentPayResultRequestDTO && StrUtil.isNotEmpty(agentPayResultRequestDTO.getBusNum())){
|
||||||
|
AgentPayResultResDTO agentPayResultResDTO = cbs8Service.agentPayResult(agentPayResultRequestDTO);
|
||||||
|
//更新OA表单
|
||||||
|
String busNum = agentPayResultResDTO.getBusNum();
|
||||||
|
if (StringUtils.isNotEmpty(busNum)){
|
||||||
|
AgentPaymentEntity agentPaymentEntity = new AgentPaymentEntity();
|
||||||
|
agentPaymentEntity.setApplyCode(busNum);
|
||||||
|
agentPaymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
AgentPaymentEntity entity = agentPaymentService.queryByApplyCode(agentPaymentEntity);
|
||||||
|
String pay_status = agentPayResultResDTO.getPayStatus();
|
||||||
|
String status = agentPayResultResDTO.getStatus();
|
||||||
|
if (null != entity){
|
||||||
|
AgentPaymentEntity result = new AgentPaymentEntity();
|
||||||
|
result.setOaId(entity.getOaId());
|
||||||
|
result.setDataSourceCode(oa_data_source_code);
|
||||||
|
//更新主表
|
||||||
|
if (StrUtil.isEmpty(pay_status)) {
|
||||||
|
result.setPayResult(PayState.payStateGetValue(status));//支付申请状态 支付状态和支付申请状态用一个
|
||||||
|
} else {
|
||||||
|
result.setPayResult(PayState.payStateGetValue(pay_status));//支付状态 支付状态和支付申请状态用一个
|
||||||
|
}
|
||||||
|
agentPaymentService.updateResult(result);
|
||||||
|
//更新明细表
|
||||||
|
List<AgentPayQueryDTO> agentDetails = agentPayResultResDTO.getAgentDetails();
|
||||||
|
for (AgentPayQueryDTO d : agentDetails) {
|
||||||
|
AgentPaymentDetailEntity detail = new AgentPaymentDetailEntity();
|
||||||
|
detail.setFormmainId(entity.getOaId());
|
||||||
|
detail.setDtlAmount(d.getDtlAmount());
|
||||||
|
detail.setDtlCnapsCode(d.getDtlCnapsCode());
|
||||||
|
detail.setDtlRevName(d.getDtlRevName());
|
||||||
|
detail.setDtlSeqNum(Integer.valueOf(d.getDtlSeqNum()));
|
||||||
|
detail.setPayResult(PayState.payStateGetValue(d.getDtlStatus()));
|
||||||
|
detail.setPayDate(CBSUtil.convertTimestampToString(d.getDtlPayTime()));
|
||||||
|
detail.setDataSourceCode(oa_data_source_code);
|
||||||
|
agentPaymentDetailService.updatePayResult(detail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return agentPayResultResDTO;
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error("代发代扣详情结果查询出错{}",e);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存交易明细到OA底表
|
||||||
|
*
|
||||||
|
* @param transactionlList
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void saveTransactionDetail(List<TransactionDetailDTO> transactionlList) {
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionlList)){
|
||||||
|
//过滤已经保存过的数据
|
||||||
|
//收款档案表的数据
|
||||||
|
TransactionDetailEntity transactionDetailEntity = new TransactionDetailEntity();
|
||||||
|
transactionDetailEntity.setBankTransactionDate(DateUtil.lastWeek().toDateStr());
|
||||||
|
transactionDetailEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
List<TransactionDetailEntity> transactionDetailList = transactionDetailService.querySerialNumber(transactionDetailEntity);
|
||||||
|
//过滤已经保存的数据
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionDetailList)){
|
||||||
|
//过滤transactionlList 去除已经存在transactionDetailList中的数据,条件为transactionSerialNumber相等
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionlList)){
|
||||||
|
transactionlList = transactionlList.stream()
|
||||||
|
.filter(item -> transactionDetailList.stream()
|
||||||
|
.noneMatch(detailItem -> item.getTransactionSerialNumber().equals(detailItem.getTransactionSerialNumber())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionlList)){
|
||||||
|
//保存到OA底表
|
||||||
|
for (TransactionDetailDTO dto : transactionlList) {
|
||||||
|
TransactionDetailEntity transactionDetail = new TransactionDetailEntity();
|
||||||
|
BeanUtil.copyProperties(dto,transactionDetail);
|
||||||
|
transactionDetail.setCurrency(CurrencyEnum.getChineseNameByCode(dto.getCurrency()));
|
||||||
|
if (NumberUtil.isNumber(dto.getBankTransactionDate())){//如果是时间戳 转换成日期字符串
|
||||||
|
transactionDetail.setBankTransactionDate(CBSUtil.convertTimestampToString(dto.getBankTransactionDate()));
|
||||||
|
}
|
||||||
|
transactionDetailService.restSave(transactionDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//这个方法没用,用的是8.0批量保存方式,我没有测试
|
||||||
|
private void saveTransactionDetailTemp(List<TransactionDetailDTO> transactionDetailList) {
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionDetailList)){
|
||||||
|
//过滤已经保存过的数据
|
||||||
|
for (TransactionDetailDTO dto : transactionDetailList) {
|
||||||
|
List<FormDataDTO> dataList = new ArrayList<>();
|
||||||
|
FormDTO formDTO = new FormDTO();
|
||||||
|
formDTO.setFormCode("formmain_0233");
|
||||||
|
formDTO.setLoginName("yonyou");
|
||||||
|
formDTO.setRightId("6603635988997229999.-8611088937958683581");
|
||||||
|
String field0001=dto.getAccountNo();//我方银行账号
|
||||||
|
String field0002=dto.getAccountName();//我方户名
|
||||||
|
String field0003=dto.getOpenBank();//我方开户行
|
||||||
|
String field0004=dto.getBankType();//我方银行类型
|
||||||
|
String field0005=dto.getTransactionSerialNumber();//交易流水号
|
||||||
|
String field0006=dto.getBankTransactionDate();//交易日期
|
||||||
|
String field0007=dto.getBankSerialNumber();//银行流水号
|
||||||
|
String field0008=dto.getCurrency();//币种
|
||||||
|
String field0009=dto.getIncurredAmount();//收款金额
|
||||||
|
String field0010=dto.getPurpose();//用途
|
||||||
|
String field0011=dto.getDigest();//摘要
|
||||||
|
String field0012=dto.getOppositeAccount();//对方账号
|
||||||
|
String field0013=dto.getOppositeName();//对方户名
|
||||||
|
String field0014=dto.getOppositeOpeningBank();//对方开户行
|
||||||
|
String field0015=dto.getRemark();//备注
|
||||||
|
//fields
|
||||||
|
List<RecordFieldDTO> fields = new ArrayList<>();
|
||||||
|
fields.add(new RecordFieldDTO("field0001",field0001,field0001));
|
||||||
|
fields.add(new RecordFieldDTO("field0002",field0002,field0002));
|
||||||
|
fields.add(new RecordFieldDTO("field0003",field0003,field0003));
|
||||||
|
fields.add(new RecordFieldDTO("field0004",field0004,field0004));
|
||||||
|
fields.add(new RecordFieldDTO("field0005",field0005,field0005));
|
||||||
|
fields.add(new RecordFieldDTO("field0006",field0006,field0006));
|
||||||
|
fields.add(new RecordFieldDTO("field0007",field0007,field0007));
|
||||||
|
fields.add(new RecordFieldDTO("field0008",field0008,field0008));
|
||||||
|
fields.add(new RecordFieldDTO("field0009",field0009,field0009));
|
||||||
|
fields.add(new RecordFieldDTO("field0010",field0010,field0010));
|
||||||
|
fields.add(new RecordFieldDTO("field0011",field0011,field0011));
|
||||||
|
fields.add(new RecordFieldDTO("field0012",field0012,field0012));
|
||||||
|
fields.add(new RecordFieldDTO("field0013",field0013,field0013));
|
||||||
|
fields.add(new RecordFieldDTO("field0014",field0014,field0014));
|
||||||
|
fields.add(new RecordFieldDTO("field0015",field0015,field0015));
|
||||||
|
//masterTable
|
||||||
|
MasterTableDTO masterTableDTO = new MasterTableDTO();
|
||||||
|
masterTableDTO.setName("formmain_1284");
|
||||||
|
RecordDTO recordDTO = new RecordDTO();
|
||||||
|
recordDTO.setId(UUIDLong.longUUID());
|
||||||
|
recordDTO.setFields(fields);
|
||||||
|
masterTableDTO.setRecord(recordDTO);
|
||||||
|
//dataList
|
||||||
|
FormDataDTO formDataDTO = new FormDataDTO();
|
||||||
|
formDataDTO.setMasterTable(masterTableDTO);
|
||||||
|
dataList.add(formDataDTO);
|
||||||
|
formDTO.setDataList(dataList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -452,7 +452,6 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("执行异常错误原因:"+e);
|
|
||||||
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||||
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
|
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
|
||||||
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
|
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
|
||||||
|
@ -544,7 +543,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
map1.put("tableName",mainDb);
|
map1.put("tableName",mainDb);
|
||||||
map1.put("dataStatus", "N");
|
map1.put("dataStatus", "N");
|
||||||
map1.put("deleteStatus", "0");
|
map1.put("deleteStatus", "0");
|
||||||
map1.put("size", 50);
|
map1.put("size", 10);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -739,7 +738,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
map1.put("tableName",mainDb);
|
map1.put("tableName",mainDb);
|
||||||
//map1.put("dataStatus", "F");
|
//map1.put("dataStatus", "F");
|
||||||
map1.put("updateStatus", "0");
|
map1.put("updateStatus", "0");
|
||||||
map1.put("size", 50);
|
map1.put("size", 10);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -927,7 +926,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
map1.put("tableName",mainDb);
|
map1.put("tableName",mainDb);
|
||||||
//map1.put("dataStatus", "Y");
|
//map1.put("dataStatus", "Y");
|
||||||
map1.put("addStatus", "0");
|
map1.put("addStatus", "0");
|
||||||
map1.put("size", 50);
|
map1.put("size", 100);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -992,7 +991,6 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
|
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
|
||||||
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
|
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
|
||||||
mdmModuleSendLogEntity.setSts("Y");
|
mdmModuleSendLogEntity.setSts("Y");
|
||||||
mdmModuleSendLogEntity.setDataType("1");
|
|
||||||
mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
|
mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
|
||||||
mdmModuleSendLogEntity.setApiId(apiEntity.getId());
|
mdmModuleSendLogEntity.setApiId(apiEntity.getId());
|
||||||
//mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
|
//mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
|
||||||
|
@ -1123,12 +1121,10 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
//保存日志
|
//保存日志
|
||||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||||
objects.get(i).put("sendsanfzt123",true);
|
|
||||||
continue;
|
continue;
|
||||||
}else {
|
}else {
|
||||||
//保存日志
|
//保存日志
|
||||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||||
objects.get(i).put("sendsanfzt123",false);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1136,7 +1132,6 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
//所有下发发送完成,修改数据状态
|
//所有下发发送完成,修改数据状态
|
||||||
for (int i = 0; i < objects.size(); i++) {
|
for (int i = 0; i < objects.size(); i++) {
|
||||||
if(objects.get(i).getBoolean("sendsanfzt123")){
|
|
||||||
Map<String, Object> updateMap = new HashMap<>();
|
Map<String, Object> updateMap = new HashMap<>();
|
||||||
updateMap.put("tableName",mainDb);
|
updateMap.put("tableName",mainDb);
|
||||||
//updateMap.put("dataStatus", "Y");
|
//updateMap.put("dataStatus", "Y");
|
||||||
|
@ -1145,7 +1140,6 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
mdmModuleDao.updateMdmSTs(updateMap);
|
mdmModuleDao.updateMdmSTs(updateMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void saveMdmModuleSendLogEntity(Long mdmCode,String distributeId,String dataType,String remark,String dbname,String formmain_id, String target_app, String appId, String target_api,String apiID, String source_data, String option_type) throws Exception {
|
private void saveMdmModuleSendLogEntity(Long mdmCode,String distributeId,String dataType,String remark,String dbname,String formmain_id, String target_app, String appId, String target_api,String apiID, String source_data, String option_type) throws Exception {
|
||||||
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
|
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue