Compare commits
52 Commits
Author | SHA1 | Date |
---|---|---|
|
a14706e2a3 | |
|
bd9c7b166d | |
|
a0ab2e87ba | |
|
3796a24b94 | |
|
97840df6a1 | |
|
adb4a566d4 | |
|
257e7c2235 | |
|
bfd18dce39 | |
|
70c6f8adf3 | |
|
6e3a47706a | |
|
4c40538ae1 | |
|
234a2e4efb | |
|
d2c824e64d | |
|
d9feee5a28 | |
|
6b0232e12d | |
|
f9b2ebaa7f | |
|
ffb86f43fa | |
|
f73d39fe1c | |
|
5a63afd7d8 | |
|
21007598a9 | |
|
c943cd82fb | |
|
ed5d7fff69 | |
|
1d979524f3 | |
|
23d06b59bb | |
|
5eea8dfb96 | |
|
90386c59a5 | |
|
aa591dc1ff | |
|
ae266436d9 | |
|
62cf866111 | |
|
351a7e7a7a | |
|
5f6648144c | |
|
f582a9601c | |
|
c398ecde8b | |
|
0baa4e0bf3 | |
|
3bddc46c9a | |
|
5ff781e133 | |
|
cff92f2399 | |
|
a778197694 | |
|
61b0cdfaee | |
|
fa2583176e | |
|
165e548056 | |
|
d9405aad90 | |
|
2874005465 | |
|
6e0b588959 | |
|
55aa4c4a92 | |
|
44fb1eaca1 | |
|
f0db5772a2 | |
|
482f0533c4 | |
|
6e6d219719 | |
|
0e471d20a3 | |
|
f33447e4f2 | |
|
cb58463319 |
|
@ -49,13 +49,10 @@ $RECYCLE.BIN/
|
||||||
*.msix
|
*.msix
|
||||||
*.msm
|
*.msm
|
||||||
*.msp
|
*.msp
|
||||||
*.iml
|
|
||||||
|
|
||||||
# Windows shortcuts
|
# Windows shortcuts
|
||||||
*.lnk
|
*.lnk
|
||||||
/.idea/
|
./idea/
|
||||||
/log/
|
|
||||||
/file/
|
|
||||||
/buildpackage/src/main/resources/banner.txt
|
/buildpackage/src/main/resources/banner.txt
|
||||||
/webapp/target/
|
/webapp/target/
|
||||||
/service/target/
|
/service/target/
|
||||||
|
@ -63,3 +60,9 @@ $RECYCLE.BIN/
|
||||||
/common/target/
|
/common/target/
|
||||||
/buildpackage/target/
|
/buildpackage/target/
|
||||||
/webapp/target/
|
/webapp/target/
|
||||||
|
/base-buildpackage/target/
|
||||||
|
/base-common/target/
|
||||||
|
/base-core/target/
|
||||||
|
/base-webapp/target/classes/com/hzya/frame/
|
||||||
|
/fw-weixin/target/
|
||||||
|
/E:/yongansystem/log/2024-10-15/
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?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>
|
|
@ -0,0 +1,386 @@
|
||||||
|
package com.hzya.frame.plugin.BackUpDatabase.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
import com.jcraft.jsch.Channel;
|
||||||
|
import com.jcraft.jsch.ChannelSftp;
|
||||||
|
import com.jcraft.jsch.JSch;
|
||||||
|
import com.jcraft.jsch.Session;
|
||||||
|
import com.jcraft.jsch.SftpATTRS;
|
||||||
|
import com.jcraft.jsch.SftpException;
|
||||||
|
import org.apache.commons.net.ftp.FTPClient;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主数据模版(MdmModule)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-18 10:33:32
|
||||||
|
*/
|
||||||
|
public class BackUpDatabaseInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(BackUpDatabaseInitializer.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "BackUpDatabasePlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "数据库备份下发";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "BackUpDatabasePlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Value("${database.filePase:}")
|
||||||
|
private String filePase;//文件保存路径
|
||||||
|
|
||||||
|
@Value("${database.fileName:data.sql}")
|
||||||
|
private String fileName;//文件保存名称
|
||||||
|
|
||||||
|
@Value("${database.databaseName:}")
|
||||||
|
private String databaseName;//库名
|
||||||
|
|
||||||
|
@Value("${database.host:}")
|
||||||
|
private String host;//地址
|
||||||
|
|
||||||
|
@Value("${database.port:}")
|
||||||
|
private String port;//端口
|
||||||
|
|
||||||
|
@Value("${database.username:}")
|
||||||
|
private String username;//用户名
|
||||||
|
|
||||||
|
@Value("${database.password:}")
|
||||||
|
private String password;//密码
|
||||||
|
|
||||||
|
|
||||||
|
@Value("${sftp.host:}")
|
||||||
|
private String sftpHost;
|
||||||
|
|
||||||
|
@Value("${sftp.port:}")
|
||||||
|
private Integer sftpPort;
|
||||||
|
|
||||||
|
@Value("${sftp.username:}")
|
||||||
|
private String sftpUsername;
|
||||||
|
|
||||||
|
@Value("${sftp.password:}")
|
||||||
|
private String sftpPassword;
|
||||||
|
|
||||||
|
@Value("${sftp.filePase:}")
|
||||||
|
private String sftpFilePase;
|
||||||
|
|
||||||
|
|
||||||
|
private ChannelSftp sftp = null;
|
||||||
|
private Session sshSession = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||||
|
try {
|
||||||
|
if(filePase == null || "".equals(filePase)
|
||||||
|
|| databaseName == null || "".equals(databaseName)
|
||||||
|
|| fileName == null || "".equals(fileName)
|
||||||
|
|| host == null || "".equals(host)
|
||||||
|
|| port == null || "".equals(port)
|
||||||
|
|| username == null || "".equals(username)
|
||||||
|
|| password == null || "".equals(password)
|
||||||
|
){
|
||||||
|
return BaseResult.getSuccessMessageEntity("系统参数未配置不执行,数据库备份");
|
||||||
|
}
|
||||||
|
//查找是否存在当天数据库
|
||||||
|
//格式化日期
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String data = sdf.format(new Date());
|
||||||
|
//当天路径
|
||||||
|
String nowDatabasePase = filePase + File.separator + data;
|
||||||
|
//不判断文件是否存在,直接执行
|
||||||
|
if(!backFile(nowDatabasePase)){
|
||||||
|
return BaseResult.getFailureMessageEntity("备份失败");
|
||||||
|
}
|
||||||
|
//判断是否有sftp配置,有的备份,没有的不备份
|
||||||
|
if(sftpHost != null && !"".equals(sftpHost)
|
||||||
|
&& sftpPort != null && !"".equals(sftpPort)
|
||||||
|
&& sftpUsername != null && !"".equals(sftpUsername)
|
||||||
|
&& sftpPassword != null && !"".equals(sftpPassword)
|
||||||
|
&& sftpFilePase != null && !"".equals(sftpFilePase)
|
||||||
|
){
|
||||||
|
String sftpnowDatabasePase = sftpFilePase + File.separator + data;
|
||||||
|
if(!sendFile(nowDatabasePase,sftpnowDatabasePase)){
|
||||||
|
return BaseResult.getFailureMessageEntity("备份失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info("执行成功");
|
||||||
|
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("执行失败{}", e.getMessage());
|
||||||
|
return BaseResult.getFailureMessageEntity("备份失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean backFile(String nowDatabasePase) {
|
||||||
|
try {
|
||||||
|
// 构建 mysqldump 命令
|
||||||
|
ProcessBuilder processBuilder = new ProcessBuilder(
|
||||||
|
"mysqldump",
|
||||||
|
"--ssl-mode=DISABLED",
|
||||||
|
"-h", host,
|
||||||
|
"-u", username,
|
||||||
|
"-p" + password,
|
||||||
|
"-P" + port,
|
||||||
|
databaseName);
|
||||||
|
// 启动进程并获取输入流
|
||||||
|
Process process = processBuilder.start();
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||||
|
File f = creatFile(nowDatabasePase,fileName);
|
||||||
|
// 将备份内容写入文件
|
||||||
|
FileWriter writer = new FileWriter(f);
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine())!= null) {
|
||||||
|
writer.write(line + "\n");
|
||||||
|
}
|
||||||
|
// 关闭资源
|
||||||
|
reader.close();
|
||||||
|
writer.close();
|
||||||
|
process.waitFor();
|
||||||
|
logger.info("文件备份成功路径:"+nowDatabasePase+ File.separator +fileName);
|
||||||
|
return true;
|
||||||
|
} catch (IOException | InterruptedException e) {
|
||||||
|
logger.info("文件备份失败:"+e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 创建目录及文件
|
||||||
|
* @Date 8:59 上午 2024/10/22
|
||||||
|
* @param filePath
|
||||||
|
* @param fileName
|
||||||
|
* @return java.io.File
|
||||||
|
**/
|
||||||
|
public File creatFile(String filePath, String fileName) {
|
||||||
|
File folder = new File(filePath);
|
||||||
|
//文件夹路径不存在
|
||||||
|
if (!folder.exists()) {
|
||||||
|
boolean mkdirs = folder.mkdirs();
|
||||||
|
}
|
||||||
|
// 如果文件不存在就创建
|
||||||
|
File file = new File(filePath + File.separator + fileName);
|
||||||
|
if (!file.exists()) {
|
||||||
|
try {
|
||||||
|
file.createNewFile();
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error("创建备份文件失败:"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean sendFile(String localFilePath,String remoteFileName) {
|
||||||
|
try {
|
||||||
|
connect();
|
||||||
|
uploadFile(remoteFileName,fileName,localFilePath,fileName);
|
||||||
|
disconnect();
|
||||||
|
return true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("sftp文件上传失败:"+e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void connect() {
|
||||||
|
try {
|
||||||
|
JSch jsch = new JSch();
|
||||||
|
jsch.getSession(sftpUsername, sftpHost, sftpPort);
|
||||||
|
sshSession = jsch.getSession(sftpUsername, sftpHost, sftpPort);
|
||||||
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("Session created.");
|
||||||
|
}
|
||||||
|
sshSession.setPassword(sftpPassword);
|
||||||
|
Properties sshConfig = new Properties();
|
||||||
|
sshConfig.put("StrictHostKeyChecking", "no");
|
||||||
|
sshSession.setConfig(sshConfig);
|
||||||
|
sshSession.connect();
|
||||||
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("Session connected.");
|
||||||
|
}
|
||||||
|
Channel channel = sshSession.openChannel("sftp");
|
||||||
|
channel.connect();
|
||||||
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("Opening Channel.");
|
||||||
|
}
|
||||||
|
sftp = (ChannelSftp) channel;
|
||||||
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("Connected to " + host + ".");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭连接
|
||||||
|
*/
|
||||||
|
public void disconnect() {
|
||||||
|
if (this.sftp != null) {
|
||||||
|
if (this.sftp.isConnected()) {
|
||||||
|
this.sftp.disconnect();
|
||||||
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("sftp is closed already");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.sshSession != null) {
|
||||||
|
if (this.sshSession.isConnected()) {
|
||||||
|
this.sshSession.disconnect();
|
||||||
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("sshSession is closed already");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传单个文件
|
||||||
|
*
|
||||||
|
* @param remotePath:远程保存目录
|
||||||
|
* @param remoteFileName:保存文件名
|
||||||
|
* @param localPath:本地上传目录(以路径符号结束)
|
||||||
|
* @param localFileName:上传的文件名
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean uploadFile(String remotePath, String remoteFileName, String localPath, String localFileName) {
|
||||||
|
FileInputStream in = null;
|
||||||
|
try {
|
||||||
|
createDir(remotePath);
|
||||||
|
File file = new File(localPath + File.separator + localFileName);
|
||||||
|
in = new FileInputStream(file);
|
||||||
|
sftp.put(in, remoteFileName, 65536);
|
||||||
|
return true;
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
} catch (SftpException e) {
|
||||||
|
} finally {
|
||||||
|
if (in != null) {
|
||||||
|
try {
|
||||||
|
in.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建目录
|
||||||
|
*
|
||||||
|
* @param createpath
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean createDir(String createpath) {
|
||||||
|
try {
|
||||||
|
if (isDirExist(createpath)) {
|
||||||
|
this.sftp.cd(createpath);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
String pathArry[] = createpath.split("/");
|
||||||
|
StringBuffer filePath = new StringBuffer("/");
|
||||||
|
for (String path : pathArry) {
|
||||||
|
if (path.equals("")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
filePath.append(path + "/");
|
||||||
|
if (isDirExist(filePath.toString())) {
|
||||||
|
sftp.cd(filePath.toString());
|
||||||
|
} else {
|
||||||
|
// 建立目录
|
||||||
|
sftp.mkdir(filePath.toString());
|
||||||
|
// 进入并设置为当前目录
|
||||||
|
sftp.cd(filePath.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
this.sftp.cd(createpath);
|
||||||
|
return true;
|
||||||
|
} catch (SftpException e) {
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断目录是否存在
|
||||||
|
*
|
||||||
|
* @param directory
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean isDirExist(String directory) {
|
||||||
|
boolean isDirExistFlag = false;
|
||||||
|
try {
|
||||||
|
SftpATTRS sftpATTRS = sftp.lstat(directory);
|
||||||
|
isDirExistFlag = true;
|
||||||
|
return sftpATTRS.isDir();
|
||||||
|
} catch (Exception e) {
|
||||||
|
if (e.getMessage().toLowerCase().equals("no such file")) {
|
||||||
|
isDirExistFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return isDirExistFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 如果目录不存在就创建目录
|
||||||
|
*
|
||||||
|
* @param path
|
||||||
|
*/
|
||||||
|
public void mkdirs(String path) {
|
||||||
|
File f = new File(path);
|
||||||
|
|
||||||
|
String fs = f.getParent();
|
||||||
|
|
||||||
|
f = new File(fs);
|
||||||
|
|
||||||
|
if (!f.exists()) {
|
||||||
|
f.mkdirs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.plugin.masterData.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户档案(mdm_customer: table)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-21 13:52:35
|
||||||
|
*/
|
||||||
|
public interface IMdmDao extends IBaseDao<MdmEntity, String> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.plugin.masterData.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
|
||||||
|
import com.hzya.frame.plugin.masterData.dao.IMdmDao;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
/**
|
||||||
|
* 客户档案(MdmCustomer)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-21 13:52:35
|
||||||
|
*/
|
||||||
|
public class MdmDaoImpl extends MybatisGenericDao<MdmEntity, String> implements IMdmDao {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,186 @@
|
||||||
|
package com.hzya.frame.plugin.masterData.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
/**
|
||||||
|
* 客户档案(MdmCustomer)实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-21 13:52:35
|
||||||
|
*/
|
||||||
|
public class MdmEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/** 单据规则 */
|
||||||
|
private String documentRule;
|
||||||
|
/** 单据规则流水号 */
|
||||||
|
private Long documentRuleNum;
|
||||||
|
/** 数据状态 Y正常 N删除 F修改 */
|
||||||
|
private String dataStatus;
|
||||||
|
/** 新增数据状态 0待下发 1已下发 */
|
||||||
|
private String addStatus;
|
||||||
|
/** 修改数据状态 0待下发 1已下发 */
|
||||||
|
private String updateStatus;
|
||||||
|
/** 删除数据状态 0待下发 1已下发 */
|
||||||
|
private String deleteStatus;
|
||||||
|
/** 公司id */
|
||||||
|
private String companyId;
|
||||||
|
/** 客户编码 */
|
||||||
|
private String code;
|
||||||
|
/** 客户类型 */
|
||||||
|
private String custprop;
|
||||||
|
/** 客户状态 */
|
||||||
|
private String custstate;
|
||||||
|
/** 启用状态 */
|
||||||
|
private String enablestate;
|
||||||
|
/** 客户名称 */
|
||||||
|
private String name;
|
||||||
|
/** 国家/地区 */
|
||||||
|
private String pkCountry;
|
||||||
|
/** 客户基本分类 */
|
||||||
|
private String pkCustclass;
|
||||||
|
/** 所属集团 */
|
||||||
|
private String pkGroup;
|
||||||
|
/** 所属组织 */
|
||||||
|
private String pkOrg;
|
||||||
|
/** 纳税人登记号 */
|
||||||
|
private String taxpayerid;
|
||||||
|
|
||||||
|
|
||||||
|
public String getDocumentRule() {
|
||||||
|
return documentRule;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentRule(String documentRule) {
|
||||||
|
this.documentRule = documentRule;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDocumentRuleNum() {
|
||||||
|
return documentRuleNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentRuleNum(Long documentRuleNum) {
|
||||||
|
this.documentRuleNum = documentRuleNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataStatus() {
|
||||||
|
return dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataStatus(String dataStatus) {
|
||||||
|
this.dataStatus = dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddStatus() {
|
||||||
|
return addStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddStatus(String addStatus) {
|
||||||
|
this.addStatus = addStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateStatus() {
|
||||||
|
return updateStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateStatus(String updateStatus) {
|
||||||
|
this.updateStatus = updateStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeleteStatus() {
|
||||||
|
return deleteStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteStatus(String deleteStatus) {
|
||||||
|
this.deleteStatus = deleteStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(String companyId) {
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustprop() {
|
||||||
|
return custprop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustprop(String custprop) {
|
||||||
|
this.custprop = custprop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCuststate() {
|
||||||
|
return custstate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCuststate(String custstate) {
|
||||||
|
this.custstate = custstate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnablestate() {
|
||||||
|
return enablestate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnablestate(String enablestate) {
|
||||||
|
this.enablestate = enablestate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkCountry() {
|
||||||
|
return pkCountry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkCountry(String pkCountry) {
|
||||||
|
this.pkCountry = pkCountry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkCustclass() {
|
||||||
|
return pkCustclass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkCustclass(String pkCustclass) {
|
||||||
|
this.pkCustclass = pkCustclass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkGroup() {
|
||||||
|
return pkGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkGroup(String pkGroup) {
|
||||||
|
this.pkGroup = pkGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkOrg() {
|
||||||
|
return pkOrg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkOrg(String pkOrg) {
|
||||||
|
this.pkOrg = pkOrg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaxpayerid() {
|
||||||
|
return taxpayerid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaxpayerid(String taxpayerid) {
|
||||||
|
this.taxpayerid = taxpayerid;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,375 @@
|
||||||
|
<?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.masterData.dao.impl.MdmDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-MdmCustomerEntity-result" type="com.hzya.frame.plugin.masterData.entity.MdmEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
||||||
|
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
||||||
|
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="deleteStatus" column="delete_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||||
|
<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="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custprop" column="custprop" jdbcType="VARCHAR"/>
|
||||||
|
<result property="custstate" column="custstate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pkCountry" column="pk_country" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pkCustclass" column="pk_custclass" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pkGroup" column="pk_group" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
|
||||||
|
<result property="taxpayerid" column="taxpayerid" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "MdmCustomerEntity_Base_Column_List">
|
||||||
|
id
|
||||||
|
,document_rule
|
||||||
|
,document_rule_num
|
||||||
|
,data_status
|
||||||
|
,add_status
|
||||||
|
,update_status
|
||||||
|
,delete_status
|
||||||
|
,sorts
|
||||||
|
,create_user_id
|
||||||
|
,create_time
|
||||||
|
,modify_user_id
|
||||||
|
,modify_time
|
||||||
|
,sts
|
||||||
|
,org_id
|
||||||
|
,company_id
|
||||||
|
,code
|
||||||
|
,custprop
|
||||||
|
,custstate
|
||||||
|
,enablestate
|
||||||
|
,name
|
||||||
|
,pk_country
|
||||||
|
,pk_custclass
|
||||||
|
,pk_group
|
||||||
|
,pk_org
|
||||||
|
,taxpayerid
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||||
|
from mdm_customer
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||||
|
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </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="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||||
|
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||||
|
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||||
|
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </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.plugin.masterData.entity.MdmEntity">
|
||||||
|
select count(1) from mdm_customer
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||||
|
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </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="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||||
|
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||||
|
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||||
|
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </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-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||||
|
from mdm_customer
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||||
|
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
|
||||||
|
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </if>
|
||||||
|
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </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="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||||
|
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||||
|
<if test="custprop != null and custprop != ''"> and custprop like concat('%',#{custprop},'%') </if>
|
||||||
|
<if test="custstate != null and custstate != ''"> and custstate like concat('%',#{custstate},'%') </if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> and pk_country like concat('%',#{pkCountry},'%') </if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass like concat('%',#{pkCustclass},'%') </if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> and pk_group like concat('%',#{pkGroup},'%') </if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org like concat('%',#{pkOrg},'%') </if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid like concat('%',#{taxpayerid},'%') </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="MdmCustomerentity_list_or" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||||
|
from mdm_customer
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||||
|
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
|
||||||
|
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </if>
|
||||||
|
<if test="sorts != null"> or sorts = #{sorts} </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="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||||
|
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||||
|
<if test="custprop != null and custprop != ''"> or custprop = #{custprop} </if>
|
||||||
|
<if test="custstate != null and custstate != ''"> or custstate = #{custstate} </if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
|
||||||
|
<if test="name != null and name != ''"> or name = #{name} </if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> or pk_country = #{pkCountry} </if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> or pk_custclass = #{pkCustclass} </if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> or pk_group = #{pkGroup} </if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> or pk_org = #{pkOrg} </if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> or taxpayerid = #{taxpayerid} </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.plugin.masterData.entity.MdmEntity" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_customer(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''"> id , </if>
|
||||||
|
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
|
||||||
|
<if test="documentRuleNum != null"> document_rule_num , </if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> add_status , </if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </if>
|
||||||
|
<if test="sorts != null"> sorts , </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="org_id != null and org_id != ''"> org_id , </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||||
|
<if test="code != null and code != ''"> code , </if>
|
||||||
|
<if test="custprop != null and custprop != ''"> custprop , </if>
|
||||||
|
<if test="custstate != null and custstate != ''"> custstate , </if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
|
||||||
|
<if test="name != null and name != ''"> name , </if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> pk_country , </if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass , </if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> pk_group , </if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> pk_org , </if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid , </if>
|
||||||
|
<if test="sts == null ">sts,</if>
|
||||||
|
</trim>
|
||||||
|
)values(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''"> #{id} ,</if>
|
||||||
|
<if test="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
|
||||||
|
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</if>
|
||||||
|
<if test="sorts != null"> #{sorts} ,</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="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||||
|
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||||
|
<if test="code != null and code != ''"> #{code} ,</if>
|
||||||
|
<if test="custprop != null and custprop != ''"> #{custprop} ,</if>
|
||||||
|
<if test="custstate != null and custstate != ''"> #{custstate} ,</if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
|
||||||
|
<if test="name != null and name != ''"> #{name} ,</if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> #{pkCountry} ,</if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> #{pkCustclass} ,</if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> #{pkGroup} ,</if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> #{pkOrg} ,</if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> #{taxpayerid} ,</if>
|
||||||
|
<if test="sts == null ">'Y',</if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增 -->
|
||||||
|
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid, sts)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid}, 'Y')
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增或者修改-->
|
||||||
|
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid})
|
||||||
|
</foreach>
|
||||||
|
on duplicate key update
|
||||||
|
document_rule = values(document_rule),
|
||||||
|
document_rule_num = values(document_rule_num),
|
||||||
|
data_status = values(data_status),
|
||||||
|
add_status = values(add_status),
|
||||||
|
update_status = values(update_status),
|
||||||
|
delete_status = values(delete_status),
|
||||||
|
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),
|
||||||
|
org_id = values(org_id),
|
||||||
|
company_id = values(company_id),
|
||||||
|
code = values(code),
|
||||||
|
custprop = values(custprop),
|
||||||
|
custstate = values(custstate),
|
||||||
|
enablestate = values(enablestate),
|
||||||
|
name = values(name),
|
||||||
|
pk_country = values(pk_country),
|
||||||
|
pk_custclass = values(pk_custclass),
|
||||||
|
pk_group = values(pk_group),
|
||||||
|
pk_org = values(pk_org),
|
||||||
|
taxpayerid = values(taxpayerid)</insert>
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity" >
|
||||||
|
update mdm_customer set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
|
||||||
|
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</if>
|
||||||
|
<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="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||||
|
<if test="code != null and code != ''"> code = #{code},</if>
|
||||||
|
<if test="custprop != null and custprop != ''"> custprop = #{custprop},</if>
|
||||||
|
<if test="custstate != null and custstate != ''"> custstate = #{custstate},</if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
|
||||||
|
<if test="name != null and name != ''"> name = #{name},</if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> pk_country = #{pkCountry},</if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass = #{pkCustclass},</if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> pk_group = #{pkGroup},</if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> pk_org = #{pkOrg},</if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid = #{taxpayerid},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity" >
|
||||||
|
update mdm_customer 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.plugin.masterData.entity.MdmEntity" >
|
||||||
|
update mdm_customer 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="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||||
|
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||||
|
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||||
|
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||||
|
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||||
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||||
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||||
|
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||||
|
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||||
|
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||||
|
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||||
|
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||||
|
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||||
|
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||||
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||||
|
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
<!--通过主键删除-->
|
||||||
|
<delete id="entity_delete">
|
||||||
|
delete from mdm_customer where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.hzya.frame.plugin.masterData.plugin;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.sysnew.comparison.masterData.service.IMasterDataService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主数据同步
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-21 13:52:35
|
||||||
|
*/
|
||||||
|
public class MdmPluginInitializer extends PluginBaseEntity{
|
||||||
|
Logger logger = LoggerFactory.getLogger(MdmPluginInitializer.class);
|
||||||
|
@Autowired
|
||||||
|
private IMasterDataService masterDataService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "MdmCustomerPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "MdmCustomerPlugin插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "MdmCustomerPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||||
|
try {
|
||||||
|
logger.info("======开始执行主数据信息同步========");
|
||||||
|
return masterDataService.queryArchives(requestJson);
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("======执行主数据同步失败:{}========",e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.plugin.masterData.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
/**
|
||||||
|
* 客户档案(MdmCustomer)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-21 13:52:35
|
||||||
|
*/
|
||||||
|
public interface IMdmService extends IBaseService<MdmEntity, String>{
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.hzya.frame.plugin.masterData.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
|
||||||
|
import com.hzya.frame.plugin.masterData.dao.IMdmDao;
|
||||||
|
import com.hzya.frame.plugin.masterData.service.IMdmService;
|
||||||
|
import com.hzya.frame.plugin.masterData.service.IMdmService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
/**
|
||||||
|
* 客户档案(MdmCustomer)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-06-21 13:52:35
|
||||||
|
*/
|
||||||
|
public class MdmServiceImpl extends BaseService<MdmEntity, String> implements IMdmService {
|
||||||
|
|
||||||
|
private IMdmDao mdmCustomerDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setMdmCustomerDao(IMdmDao dao) {
|
||||||
|
this.mdmCustomerDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
}
|
|
@ -452,6 +452,7 @@ 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);
|
||||||
|
@ -543,7 +544,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", 10);
|
map1.put("size", 50);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -704,7 +705,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
continue;
|
continue;
|
||||||
}else {
|
}else {
|
||||||
//保存日志
|
//保存日志
|
||||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3");
|
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(),"3");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -738,7 +739,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", 10);
|
map1.put("size", 50);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -885,7 +886,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
continue;
|
continue;
|
||||||
}else {
|
}else {
|
||||||
//保存日志
|
//保存日志
|
||||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2");
|
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(),"2");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -926,7 +927,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", 100);
|
map1.put("size", 50);
|
||||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||||
objects = toLowerCaseKeys(objects);
|
objects = toLowerCaseKeys(objects);
|
||||||
|
|
||||||
|
@ -991,6 +992,7 @@ 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());
|
||||||
|
@ -1121,10 +1123,12 @@ 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","转发失败",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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1132,6 +1136,7 @@ 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");
|
||||||
|
@ -1140,6 +1145,7 @@ 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();
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.plugin.sysMessageManageLogBack.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
public class SysESBMessageManageLogEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.hzya.frame.plugin.sysMessageManageLogBack.plugin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息管理日志(SysMessageManageLog)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-03-08 10:22:00
|
||||||
|
*/
|
||||||
|
public class SysMessageManageLogPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(SysMessageManageLogPluginInitializer.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "SysMessageManageLogPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "ESB消息日志备份";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "ESB消息日志备份";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
try {
|
||||||
|
logger.info("执行成功");
|
||||||
|
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.hzya.frame.plugin.sysMessageManageLogBack.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.plugin.sysMessageManageLogBack.entity.SysESBMessageManageLogEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息管理日志(SysMessageManageLog)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-03-08 10:22:00
|
||||||
|
*/
|
||||||
|
public interface ISysESBMessageManageLogService extends IBaseService<SysESBMessageManageLogEntity, String> {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.plugin.sysMessageManageLogBack.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.plugin.sysMessageManageLogBack.entity.SysESBMessageManageLogEntity;
|
||||||
|
import com.hzya.frame.plugin.sysMessageManageLogBack.service.ISysESBMessageManageLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息管理日志(SysMessageManageLog)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-03-08 10:22:00
|
||||||
|
*/
|
||||||
|
public class SysESBMessageManageLogServiceImpl extends BaseService<SysESBMessageManageLogEntity, String> implements ISysESBMessageManageLogService {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
#######################澳星环境#######################
|
||||||
|
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
|
|
@ -0,0 +1,42 @@
|
||||||
|
#######################dev环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: warn
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: /home/webservice/zt/log
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: /home/webservice/zt/file
|
||||||
|
# path: D:\webservice\file
|
||||||
|
# pluginpath: D:\webservice\plugin
|
||||||
|
pluginpath: /home/webservice/zt/plugin
|
||||||
|
# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
|
||||||
|
tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
|
||||||
|
cbs8:
|
||||||
|
appId: 1P4AGrpz
|
||||||
|
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||||
|
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||||
|
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||||
|
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||||
|
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||||
|
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||||
|
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||||
|
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||||
|
#电子回单下载临时存放位置
|
||||||
|
elec_path: /Users/xiangerlin/Downloads/
|
||||||
|
OA:
|
||||||
|
data_source_code: yc_oa
|
||||||
|
zt:
|
||||||
|
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -0,0 +1,27 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: D:\yongansystem\kangarooDataCenter\v3\logs
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
# url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
# username: root
|
||||||
|
# password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||||
|
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: D:\yongansystem\kangarooDataCenter\v3\logs
|
||||||
|
zt:
|
||||||
|
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -0,0 +1,82 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: /Users/apple/Desktop/log/local
|
||||||
|
spring:
|
||||||
|
data:
|
||||||
|
mongodb:
|
||||||
|
# host: 192.168.2.237
|
||||||
|
# port: 27017
|
||||||
|
# database: businesscenter
|
||||||
|
# auto-index-creation: true
|
||||||
|
# password: hzya1314
|
||||||
|
# username: hzya
|
||||||
|
flyway:
|
||||||
|
# 启动flyway migration, 默认为true
|
||||||
|
enabled: false
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
druid:
|
||||||
|
filters: stat,log4j2
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||||
|
# username: hzyazt
|
||||||
|
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||||
|
# type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
||||||
|
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||||
|
# username: hzyazt
|
||||||
|
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: /Users/apple/Desktop/log/local
|
||||||
|
tomcatpath: /Users/apple/Desktop/log/local
|
||||||
|
pluginpath: /Users/apple/Desktop/log/local
|
||||||
|
zt:
|
||||||
|
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||||
|
cbs8:
|
||||||
|
appId: 1P4AGrpz
|
||||||
|
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||||
|
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||||
|
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||||
|
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||||
|
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||||
|
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||||
|
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||||
|
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||||
|
#电子回单下载临时存放位置
|
||||||
|
elec_path: /Users/xiangerlin/Downloads/
|
||||||
|
OA:
|
||||||
|
data_source_code: yc_oa
|
||||||
|
server:
|
||||||
|
port: 10086
|
||||||
|
|
||||||
|
# mysqldump -d mylm -hhzya.ufyct.com -p9096 -uroot -phzya1314 >%dirName%\table_view.sql
|
||||||
|
|
||||||
|
|
||||||
|
database:
|
||||||
|
databaseName: businesscenter
|
||||||
|
host: 192.168.2.237
|
||||||
|
port: 3306
|
||||||
|
username: root
|
||||||
|
password: hzya@1314
|
||||||
|
filePase: /Users/apple/Desktop/log
|
||||||
|
fileName: data.sql
|
||||||
|
#sftp:
|
||||||
|
# host: 192.168.2.237
|
||||||
|
# port: 9091
|
||||||
|
# username: cs237
|
||||||
|
# password: hzya@1314
|
||||||
|
# filePase: /databaseBack
|
|
@ -0,0 +1,23 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: /Users/apple/Desktop/log/local
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: /Users/apple/Desktop/log/local
|
||||||
|
zt:
|
||||||
|
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -0,0 +1,23 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: /Users/xiangerlin/work/app/logs/dev
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: /Users/xiangerlin/work/app/file/dev
|
||||||
|
pluginpath: /Users/xiangerlin/work/app/file/dev
|
||||||
|
tomcatpath: /Users/xiangerlin/work/app/file/dev
|
|
@ -0,0 +1,90 @@
|
||||||
|
#logging:
|
||||||
|
# #日志级别 指定目录级别
|
||||||
|
# level:
|
||||||
|
# root: info
|
||||||
|
# encodings: UTF-8
|
||||||
|
# file:
|
||||||
|
# # 日志保存路径
|
||||||
|
# path: /zt/log
|
||||||
|
#spring:
|
||||||
|
# flyway:
|
||||||
|
# # 启动flyway migration, 默认为true
|
||||||
|
# enabled: false
|
||||||
|
# datasource:
|
||||||
|
# dynamic:
|
||||||
|
# druid:
|
||||||
|
# filters: stat,log4j2
|
||||||
|
# datasource:
|
||||||
|
# master:
|
||||||
|
# url: jdbc:dm://10.75.51.82:5238?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||||
|
# username: businesscenter
|
||||||
|
# password: 6842568689469adad597d144ee104063
|
||||||
|
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||||
|
#savefile:
|
||||||
|
# # 文件保存路径
|
||||||
|
# path: /zt/file
|
||||||
|
#公司mysql
|
||||||
|
#ax:
|
||||||
|
# url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||||
|
#logging:
|
||||||
|
# #日志级别 指定目录级别warn
|
||||||
|
# level:
|
||||||
|
# root: info
|
||||||
|
# encodings: UTF-8
|
||||||
|
# file:
|
||||||
|
# # 日志保存路径
|
||||||
|
# path: /home/webservice/zt/log
|
||||||
|
#spring:
|
||||||
|
# datasource:
|
||||||
|
# dynamic:
|
||||||
|
# datasource:
|
||||||
|
# master:
|
||||||
|
# url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
# username: root
|
||||||
|
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
#savefile:
|
||||||
|
# # 文件保存路径
|
||||||
|
# path: /home/webservice/zt/file
|
||||||
|
|
||||||
|
|
||||||
|
#公司服务器达梦
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: /zt/log
|
||||||
|
spring:
|
||||||
|
flyway:
|
||||||
|
# 启动flyway migration, 默认为true
|
||||||
|
enabled: false
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
druid:
|
||||||
|
filters: stat,log4j2
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:dm://ufidahz.com.cn:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||||
|
username: hzyazt
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: dm.jdbc.driver.DmDriver
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: /zt/file
|
||||||
|
cbs8:
|
||||||
|
appId: 1P4AGrpz
|
||||||
|
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||||
|
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||||
|
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||||
|
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||||
|
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||||
|
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||||
|
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||||
|
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||||
|
#电子回单下载临时存放位置
|
||||||
|
elec_path: /zt/elecfile
|
||||||
|
OA:
|
||||||
|
data_source_code: yc_oa
|
|
@ -0,0 +1,21 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: /Users/xiangerlin/work/app/logs/ydc
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: /Users/xiangerlin/work/app/logs/ydc
|
|
@ -0,0 +1,31 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: /Users/xiangerlin/work/app/logs/yuecheng
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: /Users/xiangerlin/work/app/logs/yuecheng
|
||||||
|
cbs8:
|
||||||
|
appId: 1P4AGrpz
|
||||||
|
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||||
|
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||||
|
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||||
|
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||||
|
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||||
|
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||||
|
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||||
|
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
|
|
@ -0,0 +1,23 @@
|
||||||
|
#######################本地环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: E:\yongansystem\log
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: E:\yongansystem\log
|
||||||
|
zt:
|
||||||
|
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -0,0 +1,39 @@
|
||||||
|
#######################zqtlocal环境#######################
|
||||||
|
logging:
|
||||||
|
#日志级别 指定目录级别
|
||||||
|
level:
|
||||||
|
root: info
|
||||||
|
encodings: UTF-8
|
||||||
|
file:
|
||||||
|
# 日志保存路径
|
||||||
|
path: D:/local/logs/
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
|
username: root
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
savefile:
|
||||||
|
# 文件保存路径
|
||||||
|
path: D:/local/upload/
|
||||||
|
pluginpath : D:/local/plugin/
|
||||||
|
tomcatpath: E:\apache-tomcat-9.0.27\webapps\kangarooDataCenterV3\WEB-INF\classes\
|
||||||
|
cbs8:
|
||||||
|
appId: 1P4AGrpz
|
||||||
|
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||||
|
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||||
|
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||||
|
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||||
|
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||||
|
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||||
|
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||||
|
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||||
|
#电子回单下载临时存放位置
|
||||||
|
elec_path: /Users/xiangerlin/Downloads/
|
||||||
|
OA:
|
||||||
|
data_source_code: yc_oa
|
||||||
|
zt:
|
||||||
|
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,5 +1,5 @@
|
||||||
server:
|
server:
|
||||||
port: 9999
|
port: 10086
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /kangarooDataCenterV3
|
context-path: /kangarooDataCenterV3
|
||||||
localIP: 127.0.0.1
|
localIP: 127.0.0.1
|
||||||
|
@ -36,8 +36,7 @@ spring:
|
||||||
# use-suffix-pattern: true
|
# use-suffix-pattern: true
|
||||||
profiles:
|
profiles:
|
||||||
# active: @profileActive@
|
# active: @profileActive@
|
||||||
active: lets
|
active: @profile.active@
|
||||||
# active: @profile.active@
|
|
||||||
# active: dev
|
# active: dev
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
|
@ -52,10 +51,10 @@ spring:
|
||||||
primary: master #设置默认的数据源或者数据源组,默认值即为master
|
primary: master #设置默认的数据源或者数据源组,默认值即为master
|
||||||
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
||||||
druid:
|
druid:
|
||||||
initial-size: 50 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时
|
initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时
|
||||||
min-idle: 100 # 最小连接池数量
|
min-idle: 10 # 最小连接池数量
|
||||||
maxActive: 1200 # 最大连接池数量
|
maxActive: 200 # 最大连接池数量
|
||||||
maxWait: 600000000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置
|
maxWait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置
|
||||||
timeBetweenEvictionRunsMillis: 60000 # 关闭空闲连接的检测时间间隔.Destroy线程会检测连接的间隔时间,如果连接空闲时间大于等于minEvictableIdleTimeMillis则关闭物理连接。
|
timeBetweenEvictionRunsMillis: 60000 # 关闭空闲连接的检测时间间隔.Destroy线程会检测连接的间隔时间,如果连接空闲时间大于等于minEvictableIdleTimeMillis则关闭物理连接。
|
||||||
minEvictableIdleTimeMillis: 300000 # 连接的最小生存时间.连接保持空闲而不被驱逐的最小时间
|
minEvictableIdleTimeMillis: 300000 # 连接的最小生存时间.连接保持空闲而不被驱逐的最小时间
|
||||||
validationQuery: SELECT 1 FROM DUAL # 验证数据库服务可用性的sql.用来检测连接是否有效的sql 因数据库方言而差, 例如 oracle 应该写成 SELECT 1 FROM DUAL
|
validationQuery: SELECT 1 FROM DUAL # 验证数据库服务可用性的sql.用来检测连接是否有效的sql 因数据库方言而差, 例如 oracle 应该写成 SELECT 1 FROM DUAL
|
||||||
|
@ -66,13 +65,12 @@ spring:
|
||||||
maxPoolPreparedStatementPerConnectionSize: 20 #设置PSCache值
|
maxPoolPreparedStatementPerConnectionSize: 20 #设置PSCache值
|
||||||
connectionErrorRetryAttempts: 3 # 连接出错后再尝试连接三次
|
connectionErrorRetryAttempts: 3 # 连接出错后再尝试连接三次
|
||||||
breakAfterAcquireFailure: true # 数据库服务宕机自动重连机制
|
breakAfterAcquireFailure: true # 数据库服务宕机自动重连机制
|
||||||
timeBetweenConnectErrorMillis: 3000000 # 连接出错后重试时间间隔
|
timeBetweenConnectErrorMillis: 300000 # 连接出错后重试时间间隔
|
||||||
asyncInit: true # 异步初始化策略
|
asyncInit: true # 异步初始化策略
|
||||||
remove-abandoned: true # 是否自动回收超时连接
|
remove-abandoned: true # 是否自动回收超时连接
|
||||||
remove-abandoned-timeout: 18000 # 超时时间(以秒数为单位)
|
remove-abandoned-timeout: 1800 # 超时时间(以秒数为单位)
|
||||||
transaction-query-timeout: 60000 # 事务超时时间
|
transaction-query-timeout: 6000 # 事务超时时间
|
||||||
filters: stat,log4j2
|
filters: stat,wall,log4j2
|
||||||
# filters: stat,wall,log4j2 去掉wall,批次查询druid判断为sql注入,所以不需要这个插件
|
|
||||||
useGlobalDataSourceStat: true #合并多个DruidDataSource的监控数据
|
useGlobalDataSourceStat: true #合并多个DruidDataSource的监控数据
|
||||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||||
batch:
|
batch:
|
||||||
|
@ -95,7 +93,7 @@ mybatis-plus:
|
||||||
db-config:
|
db-config:
|
||||||
id-type: auto # 主键策略
|
id-type: auto # 主键策略
|
||||||
zt:
|
zt:
|
||||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||||
#JimuReport[minidao配置]
|
#JimuReport[minidao配置]
|
||||||
minidao :
|
minidao :
|
||||||
base-package: org.jeecg.modules.jmreport.desreport.dao*
|
base-package: org.jeecg.modules.jmreport.desreport.dao*
|
||||||
|
@ -128,3 +126,17 @@ jeecg :
|
||||||
bucketName: ??
|
bucketName: ??
|
||||||
data:
|
data:
|
||||||
use: true
|
use: true
|
||||||
|
database:
|
||||||
|
databaseName:
|
||||||
|
host:
|
||||||
|
port:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
filePase:
|
||||||
|
fileName:
|
||||||
|
sftp:
|
||||||
|
host:
|
||||||
|
port:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
filePase:
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<plugin>
|
||||||
|
<id>BackUpDatabasePlugin</id>
|
||||||
|
<name>BackUpDatabasePlugin插件</name>
|
||||||
|
<category>20241021</category>
|
||||||
|
</plugin>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="backUpDatabaseInitializer" class="com.hzya.frame.plugin.BackUpDatabase.plugin.BackUpDatabaseInitializer" />
|
||||||
|
</beans>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<plugin>
|
<plugin>
|
||||||
<id>SoSalePlugin</id>
|
<id>MdmPlugin</id>
|
||||||
<name>SoSalePlugin插件</name>
|
<name>MdmPlugin插件</name>
|
||||||
<category>90000001</category>
|
<category>90000001</category>
|
||||||
</plugin>
|
</plugin>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="mdmCustomerDao" class="com.hzya.frame.plugin.masterData.dao.impl.MdmDaoImpl" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="mdmCustomerInitializer" class="com.hzya.frame.plugin.masterData.plugin.MdmPluginInitializer" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="mdmCustomerService" class="com.hzya.frame.plugin.masterData.service.impl.MdmServiceImpl" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<plugin>
|
||||||
|
<id>MdmModulePlugin</id>
|
||||||
|
<name>MdmModulePlugin插件</name>
|
||||||
|
<category>90000001</category>
|
||||||
|
</plugin>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="mdmModuleInitializer" class="com.hzya.frame.plugin.mdmDistribute.plugin.MdmModulePluginInitializer" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<plugin>
|
||||||
|
<id>SysMessageManageLogPlugin</id>
|
||||||
|
<name>SysMessageManageLogPlugin插件</name>
|
||||||
|
<category>202403080010</category>
|
||||||
|
</plugin>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
</beans>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="sysMessageManageLogInitializer" class="com.hzya.frame.plugin.sysMessageManageLogBack.plugin.SysMessageManageLogPluginInitializer" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="sysESBMessageManageLogService" class="com.hzya.frame.plugin.sysMessageManageLogBack.service.impl.SysESBMessageManageLogServiceImpl" />
|
||||||
|
</beans>
|
|
@ -160,15 +160,14 @@
|
||||||
<appender-ref ref="INFO_FILE"/>
|
<appender-ref ref="INFO_FILE"/>
|
||||||
<appender-ref ref="WARN_FILE"/>
|
<appender-ref ref="WARN_FILE"/>
|
||||||
<appender-ref ref="ERROR_FILE"/>
|
<appender-ref ref="ERROR_FILE"/>
|
||||||
<!-- <appender-ref ref="ALL_FILE"/>-->
|
<appender-ref ref="ALL_FILE"/>
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
<!-- ERROR 级别-->
|
<!-- ERROR 级别-->
|
||||||
<!-- <root level="ERROR">-->
|
<root level="ERROR">
|
||||||
<!-- <!– 按照每天生成日志文档 –>-->
|
<!-- 按照每天生成日志文档 -->
|
||||||
<!-- <appender-ref ref="INFO_FILE"/>-->
|
<appender-ref ref="INFO_FILE"/>
|
||||||
<!-- <appender-ref ref="WARN_FILE"/>-->
|
<appender-ref ref="WARN_FILE"/>
|
||||||
<!-- <appender-ref ref="ERROR_FILE"/>-->
|
<appender-ref ref="ERROR_FILE"/>
|
||||||
<!-- <appender-ref ref="ALL_FILE"/>-->
|
<appender-ref ref="ALL_FILE"/>
|
||||||
<!-- </root>-->
|
</root>
|
||||||
</configuration>
|
</configuration>
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<settings>
|
<settings>
|
||||||
<setting name="cacheEnabled" value="false" />
|
<setting name="cacheEnabled" value="true" />
|
||||||
<setting name="lazyLoadingEnabled" value="true" />
|
<setting name="lazyLoadingEnabled" value="true" />
|
||||||
<!--<setting name="aggressiveLazyLoading" value="false" />-->
|
<!--<setting name="aggressiveLazyLoading" value="false" />-->
|
||||||
<setting name="multipleResultSetsEnabled" value="true" />
|
<setting name="multipleResultSetsEnabled" value="true" />
|
|
@ -0,0 +1,146 @@
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -8,8 +8,9 @@
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>base-common</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
<version>${revision}</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.hzya.frame.beanutil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Content
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2022-11-28 10:27
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class BeanUtil {
|
||||||
|
|
||||||
|
public static String getBean(){
|
||||||
|
return "232";
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue