Merge branches 'dev' and 'yuecheng-project' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into yuecheng-project
This commit is contained in:
commit
5de635b0cb
|
@ -12,7 +12,7 @@ spring:
|
||||||
dynamic:
|
dynamic:
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://hzya.ufyct.com: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
|
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
|
username: root
|
||||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
|
|
@ -22,7 +22,7 @@ spring:
|
||||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||||
# type: com.alibaba.druid.pool.DruidDataSource
|
# type: com.alibaba.druid.pool.DruidDataSource
|
||||||
url: jdbc:mysql://hzya.ufyct.com: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
|
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
|
username: root
|
||||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
|
|
@ -122,3 +122,5 @@ jeecg :
|
||||||
minio_name: ??
|
minio_name: ??
|
||||||
minio_pass: ??
|
minio_pass: ??
|
||||||
bucketName: ??
|
bucketName: ??
|
||||||
|
data:
|
||||||
|
use: true
|
|
@ -12,7 +12,7 @@ public class DataSourceUtilProperties {
|
||||||
public static final String MYSQLDRIVER_6 = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
public static final String MYSQLDRIVER_6 = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
||||||
public static final String MYSQLDRIVER = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
public static final String MYSQLDRIVER = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
||||||
public static final String ORACLEDRIVER = "oracle.jdbc.OracleDriver"; // oracles数据库的驱动类
|
public static final String ORACLEDRIVER = "oracle.jdbc.OracleDriver"; // oracles数据库的驱动类
|
||||||
public static final String SQL2005DRIVER = "net.sourceforge.jtds.jdbc.Driver"; // sqlserver数据库的驱动类
|
public static final String SQL2005DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; // sqlserver数据库的驱动类
|
||||||
public static final String SQL2000DRIVER = "net.sourceforge.jtds.jdbc.Driver"; // sqlserver数据库的驱动类
|
public static final String SQL2000DRIVER = "net.sourceforge.jtds.jdbc.Driver"; // sqlserver数据库的驱动类
|
||||||
public static final String dm = "dm.jdbc.driver.DmDriver"; // 达梦数据库的驱动类
|
public static final String dm = "dm.jdbc.driver.DmDriver"; // 达梦数据库的驱动类
|
||||||
|
|
||||||
|
|
47
pom.xml
47
pom.xml
|
@ -23,8 +23,8 @@
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<junit.version>4.12</junit.version>
|
<junit.version>4.12</junit.version>
|
||||||
<fastjson.version>2.0.33</fastjson.version>
|
<fastjson.version>2.0.33</fastjson.version>
|
||||||
<spring-boot-starter-web.version>2.7.4</spring-boot-starter-web.version>
|
<spring-boot-starter-web.version>2.7.18</spring-boot-starter-web.version>
|
||||||
<spring-boot-starter-tomcat.version>2.7.4</spring-boot-starter-tomcat.version>
|
<spring-boot-starter-tomcat.version>2.7.18</spring-boot-starter-tomcat.version>
|
||||||
<p6spy.version>3.9.1</p6spy.version>
|
<p6spy.version>3.9.1</p6spy.version>
|
||||||
<gson.version>2.8.5</gson.version>
|
<gson.version>2.8.5</gson.version>
|
||||||
<zxing.version>3.3.0</zxing.version>
|
<zxing.version>3.3.0</zxing.version>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<!-- <mysql-connector-j.version>8.0.33</mysql-connector-j.version>-->
|
<!-- <mysql-connector-j.version>8.0.33</mysql-connector-j.version>-->
|
||||||
<mysql-connector-java>5.1.49</mysql-connector-java>
|
<mysql-connector-java>5.1.49</mysql-connector-java>
|
||||||
<pagehelper-spring-boot-starter.version>1.4.6</pagehelper-spring-boot-starter.version>
|
<pagehelper-spring-boot-starter.version>1.4.6</pagehelper-spring-boot-starter.version>
|
||||||
<spring-boot-starter-cache.version>2.7.4</spring-boot-starter-cache.version>
|
<spring-boot-starter-cache.version>2.7.18</spring-boot-starter-cache.version>
|
||||||
<sa.token.version>1.30.0</sa.token.version>
|
<sa.token.version>1.30.0</sa.token.version>
|
||||||
<lang3.version>3.13.0</lang3.version>
|
<lang3.version>3.13.0</lang3.version>
|
||||||
<commons.io.version>2.6</commons.io.version>
|
<commons.io.version>2.6</commons.io.version>
|
||||||
|
@ -53,9 +53,9 @@
|
||||||
<ojdbc6.version>11.2.0.4</ojdbc6.version>
|
<ojdbc6.version>11.2.0.4</ojdbc6.version>
|
||||||
<dynamic-datasource-spring-boot-starter.version>3.5.2</dynamic-datasource-spring-boot-starter.version>
|
<dynamic-datasource-spring-boot-starter.version>3.5.2</dynamic-datasource-spring-boot-starter.version>
|
||||||
<druid-spring-boot-starter.version>1.2.18</druid-spring-boot-starter.version>
|
<druid-spring-boot-starter.version>1.2.18</druid-spring-boot-starter.version>
|
||||||
<spring-boot-starter-test.version>2.7.4</spring-boot-starter-test.version>
|
<spring-boot-starter-test.version>2.7.18</spring-boot-starter-test.version>
|
||||||
<spring-boot.version>2.7.4</spring-boot.version>
|
<spring-boot.version>2.7.18</spring-boot.version>
|
||||||
<spring-boot-starter-aop.version>2.7.4</spring-boot-starter-aop.version>
|
<spring-boot-starter-aop.version>2.7.18</spring-boot-starter-aop.version>
|
||||||
<unit.version>4.12</unit.version>
|
<unit.version>4.12</unit.version>
|
||||||
<quartz.version>2.3.0</quartz.version>
|
<quartz.version>2.3.0</quartz.version>
|
||||||
<org.springframework.version>5.3.23</org.springframework.version>
|
<org.springframework.version>5.3.23</org.springframework.version>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.7.4</version>
|
<version>2.7.18</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
<!-- lookup parent from repository -->
|
<!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
@ -275,6 +275,11 @@
|
||||||
<version>${lombok.version}</version>
|
<version>${lombok.version}</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
|
<version>6.4.0.jre8</version>
|
||||||
|
</dependency>
|
||||||
<!--sqlserver-->
|
<!--sqlserver-->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
||||||
|
@ -403,7 +408,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>2.7.4</version>
|
<version>2.7.18</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||||
|
@ -411,6 +416,32 @@
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<!--设置maven-war-plugins插件,否则外部依赖无法打进war包-->
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.18.1</version>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<webResources>
|
||||||
|
<resource>
|
||||||
|
<directory>${basedir}/../service/src/main/resources/lib</directory>
|
||||||
|
<targetPath>WEB-INF/lib/</targetPath>
|
||||||
|
<filtering>false</filtering>
|
||||||
|
<includes>
|
||||||
|
<!-- 匹配所有jar包 -->
|
||||||
|
<include>**/*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<!--加载src/main/java下的xml-->
|
<!--加载src/main/java下的xml-->
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
<artifactId>pubbaseapp_nccloud_rtLevel</artifactId>
|
<artifactId>pubbaseapp_nccloud_rtLevel</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/pubbaseapp_nccloud_rtLevel-1.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/pubbaseapp_nccloud_rtLevel-1.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.hzya.bipyonyoulog</groupId>
|
<groupId>com.hzya.bipyonyoulog</groupId>
|
||||||
<artifactId>yonyoulog</artifactId>
|
<artifactId>yonyoulog</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/yonyoulog.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/yonyoulog.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<artifactId>bcprov</artifactId>
|
<artifactId>bcprov</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/bcprov-jdk15on-1.70.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/bcprov-jdk15on-1.70.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -49,7 +49,14 @@
|
||||||
<artifactId>DataApiSdk</artifactId>
|
<artifactId>DataApiSdk</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/DataApiSdk-jar-with-dependencies.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/DataApiSdk-jar-with-dependencies.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.hzya.openBasicSDK</groupId>
|
||||||
|
<artifactId>openBasicSDK</artifactId>
|
||||||
|
<version>1</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/resources/lib/openBasicSDK-2.1.230630.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -442,11 +442,11 @@ where id = #{id}
|
||||||
<when test="item.filedType == '2'.toString()">
|
<when test="item.filedType == '2'.toString()">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="item.dataType == '1'.toString()">
|
<when test="item.dataType == '1'.toString()">
|
||||||
MODIFY COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
|
MODIFY COLUMN ${item.enName} decimal(${item.filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{item.chName},
|
#{item.chName},
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
add COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
|
add COLUMN ${item.enName} decimal(${item.filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{item.chName},
|
#{item.chName},
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
|
@ -505,14 +505,14 @@ where id = #{id}
|
||||||
<when test="filedType == '2'.toString()">
|
<when test="filedType == '2'.toString()">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="dataType == '1'.toString()">
|
<when test="dataType == '1'.toString()">
|
||||||
add COLUMN ${enName} decimal(${filedLength}) DEFAULT NULL COMMENT
|
add COLUMN ${enName} decimal(${filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{chName}
|
#{chName}
|
||||||
</when>
|
</when>
|
||||||
<when test="dataType == '3'.toString()">
|
<when test="dataType == '3'.toString()">
|
||||||
drop COLUMN ${enName}
|
drop COLUMN ${enName}
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
MODIFY COLUMN ${enName} decimal(${filedLength}) DEFAULT NULL COMMENT
|
MODIFY COLUMN ${enName} decimal(${filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{chName}
|
#{chName}
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
|
@ -566,13 +566,13 @@ where id = #{id}
|
||||||
<when test="filedType == '2'.toString()">
|
<when test="filedType == '2'.toString()">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="dataType == '1'.toString()">
|
<when test="dataType == '1'.toString()">
|
||||||
add ${enName} decimal(${filedLength}) DEFAULT NULL
|
add ${enName} decimal(${filedLength},8) DEFAULT NULL
|
||||||
</when>
|
</when>
|
||||||
<when test="dataType == '3'.toString()">
|
<when test="dataType == '3'.toString()">
|
||||||
drop ${enName}
|
drop ${enName}
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
MODIFY ${enName} decimal(${filedLength}) DEFAULT NULL
|
MODIFY ${enName} decimal(${filedLength},8) DEFAULT NULL
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</when>
|
</when>
|
||||||
|
|
|
@ -1482,6 +1482,11 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
||||||
}
|
}
|
||||||
entity.setUpdate();
|
entity.setUpdate();
|
||||||
entity.setDataType("2");
|
entity.setDataType("2");
|
||||||
|
try {
|
||||||
|
mdmModuleDao.alterTableField(entity);
|
||||||
|
} catch (Exception e){
|
||||||
|
throw new BaseSystemException("表字段类型,修改失败,请联系管理员");
|
||||||
|
}
|
||||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities = new ArrayList<>();
|
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities = new ArrayList<>();
|
||||||
mdmModuleDbFiledsEntities.add(entity);
|
mdmModuleDbFiledsEntities.add(entity);
|
||||||
mdmServiceCache.saveOrUpdateMdmModuleDbFileds(entity.getMdmId(), mdmModuleDbFiledsEntities);
|
mdmServiceCache.saveOrUpdateMdmModuleDbFileds(entity.getMdmId(), mdmModuleDbFiledsEntities);
|
||||||
|
@ -1505,11 +1510,11 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
//try {
|
||||||
mdmModuleDao.alterTableField(entity);
|
// mdmModuleDao.alterTableField(entity);
|
||||||
} catch (Exception e){
|
//} catch (Exception e){
|
||||||
throw new BaseSystemException("表字段类型,修改失败,请联系管理员");
|
// throw new BaseSystemException("表字段类型,修改失败,请联系管理员");
|
||||||
}
|
//}
|
||||||
return BaseResult.getSuccessMessageEntity("修改字段成功");
|
return BaseResult.getSuccessMessageEntity("修改字段成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@ update mdm_module_db_fileds set
|
||||||
<if test="queryType != null and queryType != ''"> query_type = #{queryType},</if>
|
<if test="queryType != null and queryType != ''"> query_type = #{queryType},</if>
|
||||||
<if test="listType != null and listType != ''"> list_type = #{listType},</if>
|
<if test="listType != null and listType != ''"> list_type = #{listType},</if>
|
||||||
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
|
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
|
||||||
<if test="filedLength != null and filedLength != ''"> filed_length = #{filedLength},</if>
|
filed_length = #{filedLength},
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</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="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_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(mdm_module_distribute_tripartite: table)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:38
|
||||||
|
*/
|
||||||
|
public interface IMdmModuleDistributeTripartiteDao extends IBaseDao<MdmModuleDistributeTripartiteEntity, String> {
|
||||||
|
|
||||||
|
MdmModuleDistributeTripartiteEntity queryOneTripartite(MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:38
|
||||||
|
*/
|
||||||
|
@Repository(value = "MdmModuleDistributeTripartiteDaoImpl")
|
||||||
|
public class MdmModuleDistributeTripartiteDaoImpl extends MybatisGenericDao<MdmModuleDistributeTripartiteEntity, String> implements IMdmModuleDistributeTripartiteDao{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MdmModuleDistributeTripartiteEntity queryOneTripartite(MdmModuleDistributeTripartiteEntity entity) {
|
||||||
|
MdmModuleDistributeTripartiteEntity o = (MdmModuleDistributeTripartiteEntity) super.selectOne(getSqlIdPrifx() + "queryOneTripartite", entity);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:39
|
||||||
|
*/
|
||||||
|
public class MdmModuleDistributeTripartiteEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/** 公司id */
|
||||||
|
private String companyId;
|
||||||
|
/** 主数据id */
|
||||||
|
private String mdmId;
|
||||||
|
/** 数据id */
|
||||||
|
private String dataId;
|
||||||
|
/** 应用id */
|
||||||
|
private String appId;
|
||||||
|
/** 三方id */
|
||||||
|
private String tripartiteId;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(String companyId) {
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMdmId() {
|
||||||
|
return mdmId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMdmId(String mdmId) {
|
||||||
|
this.mdmId = mdmId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataId() {
|
||||||
|
return dataId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataId(String dataId) {
|
||||||
|
this.dataId = dataId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppId() {
|
||||||
|
return appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(String appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTripartiteId() {
|
||||||
|
return tripartiteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTripartiteId(String tripartiteId) {
|
||||||
|
this.tripartiteId = tripartiteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,290 @@
|
||||||
|
<?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.mdm.mdmModuleDistributeTripartite.dao.impl.MdmModuleDistributeTripartiteDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-MdmModuleDistributeTripartiteEntity-result" type="com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
<result property="id" column="id" 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="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="dataId" column="data_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="tripartiteId" column="tripartite_id" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "MdmModuleDistributeTripartiteEntity_Base_Column_List">
|
||||||
|
id
|
||||||
|
,sorts
|
||||||
|
,create_user_id
|
||||||
|
,create_time
|
||||||
|
,modify_user_id
|
||||||
|
,modify_time
|
||||||
|
,sts
|
||||||
|
,org_id
|
||||||
|
,company_id
|
||||||
|
,mdm_id
|
||||||
|
,data_id
|
||||||
|
,app_id
|
||||||
|
,tripartite_id
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </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="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </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.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select count(1) from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </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="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </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-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </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="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id like concat('%',#{dataId},'%') </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id like concat('%',#{tripartiteId},'%') </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="MdmModuleDistributeTripartiteentity_list_or" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> or id = #{id} </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="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> or data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> or tripartite_id = #{tripartiteId} </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.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_module_distribute_tripartite(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''"> id , </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="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> data_id , </if>
|
||||||
|
<if test="appId != null and appId != ''"> app_id , </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> tripartite_id , </if>
|
||||||
|
<if test="sts == null ">sts,</if>
|
||||||
|
</trim>
|
||||||
|
)values(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''"> #{id} ,</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="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||||
|
<if test="dataId != null and dataId != ''"> #{dataId} ,</if>
|
||||||
|
<if test="appId != null and appId != ''"> #{appId} ,</if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> #{tripartiteId} ,</if>
|
||||||
|
<if test="sts == null ">'Y',</if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增 -->
|
||||||
|
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_module_distribute_tripartite(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, mdm_id, data_id, app_id, tripartite_id, sts)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.mdmId},#{entity.dataId},#{entity.appId},#{entity.tripartiteId}, 'Y')
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增或者修改-->
|
||||||
|
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_module_distribute_tripartite(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, mdm_id, data_id, app_id, tripartite_id)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.mdmId},#{entity.dataId},#{entity.appId},#{entity.tripartiteId})
|
||||||
|
</foreach>
|
||||||
|
on duplicate key update
|
||||||
|
create_user_id = values(create_user_id),
|
||||||
|
create_time = values(create_time),
|
||||||
|
modify_user_id = values(modify_user_id),
|
||||||
|
modify_time = values(modify_time),
|
||||||
|
sts = values(sts),
|
||||||
|
org_id = values(org_id),
|
||||||
|
company_id = values(company_id),
|
||||||
|
mdm_id = values(mdm_id),
|
||||||
|
data_id = values(data_id),
|
||||||
|
app_id = values(app_id),
|
||||||
|
tripartite_id = values(tripartite_id)</insert>
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
update mdm_module_distribute_tripartite set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||||
|
<if test="dataId != null and dataId != ''"> data_id = #{dataId},</if>
|
||||||
|
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> tripartite_id = #{tripartiteId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
update mdm_module_distribute_tripartite 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.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
update mdm_module_distribute_tripartite 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="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="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
<!--通过主键删除-->
|
||||||
|
<delete id="entity_delete">
|
||||||
|
delete from mdm_module_distribute_tripartite where id = #{id}
|
||||||
|
</delete>
|
||||||
|
<select id="queryOneTripartite" databaseId="mysql" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </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="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
order by sorts desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryOneTripartite" databaseId="oracle" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
SELECT * FROM (
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </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="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
order by sorts desc
|
||||||
|
) WHERE ROWNUM = 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:39
|
||||||
|
*/
|
||||||
|
public interface IMdmModuleDistributeTripartiteService extends IBaseService<MdmModuleDistributeTripartiteEntity, String>{
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.service.IMdmModuleDistributeTripartiteService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:39
|
||||||
|
*/
|
||||||
|
@Service(value = "mdmModuleDistributeTripartiteService")
|
||||||
|
public class MdmModuleDistributeTripartiteServiceImpl extends BaseService<MdmModuleDistributeTripartiteEntity, String> implements IMdmModuleDistributeTripartiteService {
|
||||||
|
|
||||||
|
private IMdmModuleDistributeTripartiteDao mdmModuleDistributeTripartiteDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setMdmModuleDistributeTripartiteDao(IMdmModuleDistributeTripartiteDao dao) {
|
||||||
|
this.mdmModuleDistributeTripartiteDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,8 @@ import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleOptionLog.dao.IMdmModuleOptionLogDao;
|
import com.hzya.frame.mdm.mdmModuleOptionLog.dao.IMdmModuleOptionLogDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity;
|
import com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
||||||
|
@ -86,7 +88,8 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
private ISysApplicationScriptDao sysApplicationScriptDao;
|
private ISysApplicationScriptDao sysApplicationScriptDao;
|
||||||
@Resource
|
@Resource
|
||||||
private IMdmModuleDao mdmModuleDao;
|
private IMdmModuleDao mdmModuleDao;
|
||||||
|
@Resource
|
||||||
|
private IMdmModuleDistributeTripartiteDao mdmModuleDistributeTripartiteDao;
|
||||||
@Resource
|
@Resource
|
||||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -1811,13 +1814,29 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
parameterJson.put("body", apiEntity.getBodyIn());
|
parameterJson.put("body", apiEntity.getBodyIn());
|
||||||
parameterJson.put("query", apiEntity.getQueryIn());
|
parameterJson.put("query", apiEntity.getQueryIn());
|
||||||
parameterJson.put("data", object);
|
parameterJson.put("data", object);
|
||||||
|
|
||||||
|
if (!"1".equals(type)) {//删除或者修改情况,查询三方id,有就设置,没有就设置空
|
||||||
|
//1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setSts("Y");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
|
||||||
|
String tripartiteId = "";
|
||||||
|
if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
|
||||||
|
tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
|
||||||
|
}
|
||||||
|
parameterJson.put("tripartiteId", tripartiteId);
|
||||||
|
}
|
||||||
|
|
||||||
/** head */
|
/** head */
|
||||||
Map<String, String> header = null;
|
Map<String, String> header = null;
|
||||||
/** query */
|
/** query */
|
||||||
String querys = null;
|
String querys = null;
|
||||||
/** body */
|
/** body */
|
||||||
String bodys = object.toJSONString();
|
String bodys = object.toJSONString();
|
||||||
if (scriptEntity != null && scriptEntity.getId() != null) {
|
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getScriptData() != null ) {
|
||||||
groovy.put("code", scriptEntity.getScriptCode());
|
groovy.put("code", scriptEntity.getScriptCode());
|
||||||
groovy.put("className", scriptEntity.getClassName());
|
groovy.put("className", scriptEntity.getClassName());
|
||||||
groovy.put("name", scriptEntity.getScriptName());
|
groovy.put("name", scriptEntity.getScriptName());
|
||||||
|
@ -1885,6 +1904,32 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
//组装数据发送
|
//组装数据发送
|
||||||
JsonResultEntity jsonResultEntity = sendData(apiEntity, headers, bodys, querys);
|
JsonResultEntity jsonResultEntity = sendData(apiEntity, headers, bodys, querys);
|
||||||
if (jsonResultEntity.isFlag()) {
|
if (jsonResultEntity.isFlag()) {
|
||||||
|
|
||||||
|
if ("1".equals(type)) {//保存三方返回id
|
||||||
|
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
|
||||||
|
JSONObject backScriptJson = new JSONObject();
|
||||||
|
backScriptJson.put("data", jsonResultEntity.getAttribute());
|
||||||
|
groovy.put("code", scriptEntity.getScriptCode()+"back");
|
||||||
|
groovy.put("className", scriptEntity.getClassName()+"back");
|
||||||
|
groovy.put("name", scriptEntity.getScriptName()+"back");
|
||||||
|
groovy.put("methodStr", scriptEntity.getBackScriptData());
|
||||||
|
groovy.put("parameterJson", backScriptJson);
|
||||||
|
JSONObject groovyStr = new JSONObject();
|
||||||
|
groovyStr.put("jsonStr", groovy);
|
||||||
|
try {
|
||||||
|
Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setCreate();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setTripartiteId(str.toString());
|
||||||
|
mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(),mdmModuleDistributeEntity.getId(),"1", "发送成功", dbname, object.getString("id"), sysApplicationEntity.getName(),sysApplicationEntity.getId(), apiEntity.getApiName(),apiEntity.getId(), object.toJSONString(), type);
|
saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(),mdmModuleDistributeEntity.getId(),"1", "发送成功", dbname, object.getString("id"), sysApplicationEntity.getName(),sysApplicationEntity.getId(), apiEntity.getApiName(),apiEntity.getId(), object.toJSONString(), type);
|
||||||
return BaseResult.getSuccessMessageEntity("发送成功");
|
return BaseResult.getSuccessMessageEntity("发送成功");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.hzya.frame.ningboBankTreasury.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
|
||||||
|
public class NingboBankTreasuryEntity extends BaseEntity {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.hzya.frame.ningboBankTreasury.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
public interface INingboBankTreasuryService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 单笔查证接口
|
||||||
|
* @Date 4:45 下午 2024/7/9
|
||||||
|
* @param jsonObject
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
**/
|
||||||
|
Object sendNbBank(JSONObject jsonObject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 此方法获取初始化参数,拼接请求参数
|
||||||
|
* @author laborer
|
||||||
|
* @date 2024/5/27 0027 11:38
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
SysExtensionApiEntity doChangeData(SysExtensionApiEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
package com.hzya.frame.ningboBankTreasury.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.dps.service.impl.PayMentServiceImpl;
|
||||||
|
import com.hzya.frame.ningboBankTreasury.service.INingboBankTreasuryService;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||||
|
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import com.nbcb.sdk.OpenSDK;
|
||||||
|
import com.nbcb.sdk.aes.exception.SDKException;
|
||||||
|
import com.nbcb.sdk.aes.param.ConfigParam;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@Service(value = "ningboBankTreasuryServiceImpl")
|
||||||
|
public class NingboBankTreasuryServiceImpl implements INingboBankTreasuryService {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(NingboBankTreasuryServiceImpl.class);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param jsonObject
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 单笔查证接口
|
||||||
|
* @Date 4:45 下午 2024/7/9
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public Object sendNbBank(JSONObject jsonObject) {
|
||||||
|
JSONObject returnJson = new JSONObject();
|
||||||
|
JSONObject entity = getstrObj("jsonStr", jsonObject);
|
||||||
|
String dataJson = entity.getString("Data");
|
||||||
|
String appKey = entity.getString("appKey");
|
||||||
|
String privateKey = entity.getString("privateKey");
|
||||||
|
String publicUrl = entity.getString("publicUrl");
|
||||||
|
String publicKey = entity.getString("publicKey");
|
||||||
|
String productID = entity.getString("productID");
|
||||||
|
String serviceID = entity.getString("serviceID");
|
||||||
|
//初始化宁波银行OpenSDK
|
||||||
|
try {
|
||||||
|
ConfigParam configParam = new ConfigParam(privateKey,publicUrl,appKey,publicKey,10000,20000);
|
||||||
|
OpenSDK.dynamicInit(configParam,true);
|
||||||
|
} catch (SDKException e) {
|
||||||
|
logger.error("初始化宁波银行OpenSDK错误:{}",e.getMessage());
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","初始化宁波银行OpenSDK错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
//发送数据
|
||||||
|
try {
|
||||||
|
String returnData = OpenSDK.send(productID,serviceID,dataJson.replace(" ",""));
|
||||||
|
if(returnData == null || "".equals(returnData)){
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","发送宁波银行OpenSDK返回错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
returnJson = JSONObject.parseObject(returnData);
|
||||||
|
JSONObject retData = returnJson.getJSONObject("Data");
|
||||||
|
String retCode = retData.getString("retCode");
|
||||||
|
String retMsg = retData.getString("retMsg");
|
||||||
|
returnJson.put("retCode",retCode);
|
||||||
|
returnJson.put("retMsg",retMsg);
|
||||||
|
return returnJson;
|
||||||
|
} catch (Exception e) {
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","发送宁波银行OpenSDK返回转换Json错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","发送宁波银行OpenSDK错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
* @content 此方法获取初始化参数,拼接请求参数
|
||||||
|
* @author laborer
|
||||||
|
* @date 2024/5/27 0027 11:38
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysExtensionApiEntity doChangeData(SysExtensionApiEntity entity) {
|
||||||
|
try {
|
||||||
|
if(entity == null ){
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
Map<String, String> returnHeaders = new HashMap<>();
|
||||||
|
JSONObject returnDataData = new JSONObject();
|
||||||
|
JSONObject returnData = new JSONObject();
|
||||||
|
Map<String, String> headers = entity.getHeaders();
|
||||||
|
String bodys = entity.getBodys();
|
||||||
|
JSONObject data = JSONObject.parseObject(bodys);
|
||||||
|
|
||||||
|
//先处理转发请求header
|
||||||
|
returnHeaders.put("yatl",headers.get("yatl"));
|
||||||
|
returnHeaders.put("yadj",headers.get("yadj"));
|
||||||
|
|
||||||
|
returnDataData.put("appKey",headers.get("appKey"));
|
||||||
|
returnDataData.put("privateKey",headers.get("privateKey"));
|
||||||
|
returnDataData.put("publicUrl",headers.get("publicUrl"));
|
||||||
|
returnDataData.put("publicKey",headers.get("publicKey"));
|
||||||
|
returnDataData.put("productID",headers.get("productID"));
|
||||||
|
returnDataData.put("serviceID",headers.get("serviceID"));
|
||||||
|
data.put("custId",headers.get("custId"));
|
||||||
|
returnData.put("Data",data);
|
||||||
|
returnDataData.put("Data",returnData);
|
||||||
|
entity.setHeaders(returnHeaders);
|
||||||
|
entity.setBodys(returnDataData.toJSONString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
//发送内部处理方法错误
|
||||||
|
logger.error("宁波银行内部转换接口错误:{}",e.getMessage());
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public JSONObject getstrObj(String key, JSONObject object) {
|
||||||
|
if (checkStr(object.getString(key)) ) {
|
||||||
|
return object.getJSONObject(key);
|
||||||
|
}
|
||||||
|
return new JSONObject();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param str
|
||||||
|
* @return void
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 校验字符串
|
||||||
|
* @Date 11:41 上午 2022/12/7
|
||||||
|
**/
|
||||||
|
protected Boolean checkStr(String str) {
|
||||||
|
Boolean flag = true;
|
||||||
|
if (str == null || "".equals(str)) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,6 +22,8 @@ public class SysApplicationScriptEntity extends BaseEntity {
|
||||||
private String className;
|
private String className;
|
||||||
/** 脚本内容 */
|
/** 脚本内容 */
|
||||||
private String scriptData;
|
private String scriptData;
|
||||||
|
/** 返回脚本内容 */
|
||||||
|
private String backScriptData;
|
||||||
/** 描述 */
|
/** 描述 */
|
||||||
private String scriptRemark;
|
private String scriptRemark;
|
||||||
/** 发布日期 */
|
/** 发布日期 */
|
||||||
|
@ -112,5 +114,12 @@ public class SysApplicationScriptEntity extends BaseEntity {
|
||||||
this.companyId = companyId;
|
this.companyId = companyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBackScriptData() {
|
||||||
|
return backScriptData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBackScriptData(String backScriptData) {
|
||||||
|
this.backScriptData = backScriptData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<result property="scriptVersion" column="script_version" jdbcType="VARCHAR"/>
|
<result property="scriptVersion" column="script_version" jdbcType="VARCHAR"/>
|
||||||
<result property="className" column="class_name" jdbcType="VARCHAR"/>
|
<result property="className" column="class_name" jdbcType="VARCHAR"/>
|
||||||
<result property="scriptData" column="script_data" jdbcType="VARCHAR"/>
|
<result property="scriptData" column="script_data" jdbcType="VARCHAR"/>
|
||||||
|
<result property="backScriptData" column="back_script_data" jdbcType="VARCHAR"/>
|
||||||
<result property="scriptRemark" column="script_remark" jdbcType="VARCHAR"/>
|
<result property="scriptRemark" column="script_remark" jdbcType="VARCHAR"/>
|
||||||
<result property="releaseDate" column="release_date" jdbcType="TIMESTAMP"/>
|
<result property="releaseDate" column="release_date" jdbcType="TIMESTAMP"/>
|
||||||
<result property="scriptStatus" column="script_status" jdbcType="VARCHAR"/>
|
<result property="scriptStatus" column="script_status" jdbcType="VARCHAR"/>
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
,script_version
|
,script_version
|
||||||
,class_name
|
,class_name
|
||||||
,script_data
|
,script_data
|
||||||
|
,back_script_data
|
||||||
,script_remark
|
,script_remark
|
||||||
,release_date
|
,release_date
|
||||||
,script_status
|
,script_status
|
||||||
|
@ -62,6 +64,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||||
|
@ -90,6 +93,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||||
|
@ -120,6 +124,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version like concat('%',#{scriptVersion},'%') </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version like concat('%',#{scriptVersion},'%') </if>
|
||||||
<if test="className != null and className != ''"> and class_name like concat('%',#{className},'%') </if>
|
<if test="className != null and className != ''"> and class_name like concat('%',#{className},'%') </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data like concat('%',#{scriptData},'%') </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data like concat('%',#{scriptData},'%') </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data like concat('%',#{backScriptData},'%') </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark like concat('%',#{scriptRemark},'%') </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark like concat('%',#{scriptRemark},'%') </if>
|
||||||
<if test="releaseDate != null"> and release_date like concat('%',#{releaseDate},'%') </if>
|
<if test="releaseDate != null"> and release_date like concat('%',#{releaseDate},'%') </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status like concat('%',#{scriptStatus},'%') </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status like concat('%',#{scriptStatus},'%') </if>
|
||||||
|
@ -150,6 +155,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> or script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> or script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> or class_name = #{className} </if>
|
<if test="className != null and className != ''"> or class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> or script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> or script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> or back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> or script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> or script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> or release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> or release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> or script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> or script_status = #{scriptStatus} </if>
|
||||||
|
@ -178,6 +184,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> script_version , </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> script_version , </if>
|
||||||
class_name ,
|
class_name ,
|
||||||
<if test="scriptData != null and scriptData != ''"> script_data , </if>
|
<if test="scriptData != null and scriptData != ''"> script_data , </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> back_script_data , </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> script_remark , </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> script_remark , </if>
|
||||||
<if test="releaseDate != null"> release_date , </if>
|
<if test="releaseDate != null"> release_date , </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> script_status , </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> script_status , </if>
|
||||||
|
@ -200,6 +207,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> #{scriptVersion} ,</if>
|
<if test="scriptVersion != null and scriptVersion != ''"> #{scriptVersion} ,</if>
|
||||||
CONCAT('g','_',LAST_INSERT_ID()) ,
|
CONCAT('g','_',LAST_INSERT_ID()) ,
|
||||||
<if test="scriptData != null and scriptData != ''"> #{scriptData} ,</if>
|
<if test="scriptData != null and scriptData != ''"> #{scriptData} ,</if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> #{backScriptData} ,</if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> #{scriptRemark} ,</if>
|
<if test="scriptRemark != null and scriptRemark != ''"> #{scriptRemark} ,</if>
|
||||||
<if test="releaseDate != null"> #{releaseDate} ,</if>
|
<if test="releaseDate != null"> #{releaseDate} ,</if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> #{scriptStatus} ,</if>
|
<if test="scriptStatus != null and scriptStatus != ''"> #{scriptStatus} ,</if>
|
||||||
|
@ -217,18 +225,18 @@
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 批量新增 -->
|
<!-- 批量新增 -->
|
||||||
<insert id="entityInsertBatch" >
|
<insert id="entityInsertBatch" >
|
||||||
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data,back_script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.backScriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 批量新增或者修改-->
|
<!-- 批量新增或者修改-->
|
||||||
<insert id="entityInsertOrUpdateBatch" >
|
<insert id="entityInsertOrUpdateBatch" >
|
||||||
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data,back_script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.backScriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||||
</foreach>
|
</foreach>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
app_id = values(app_id),
|
app_id = values(app_id),
|
||||||
|
@ -237,6 +245,7 @@
|
||||||
script_version = values(script_version),
|
script_version = values(script_version),
|
||||||
class_name = values(class_name),
|
class_name = values(class_name),
|
||||||
script_data = values(script_data),
|
script_data = values(script_data),
|
||||||
|
back_script_data = values(back_script_data),
|
||||||
script_remark = values(script_remark),
|
script_remark = values(script_remark),
|
||||||
release_date = values(release_date),
|
release_date = values(release_date),
|
||||||
script_status = values(script_status),
|
script_status = values(script_status),
|
||||||
|
@ -257,6 +266,7 @@ update sys_application_script set
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> script_version = #{scriptVersion},</if>
|
<if test="scriptVersion != null and scriptVersion != ''"> script_version = #{scriptVersion},</if>
|
||||||
<if test="className != null and className != ''"> class_name = #{className},</if>
|
<if test="className != null and className != ''"> class_name = #{className},</if>
|
||||||
<if test="scriptData != null and scriptData != ''"> script_data = #{scriptData},</if>
|
<if test="scriptData != null and scriptData != ''"> script_data = #{scriptData},</if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> back_script_data = #{backScriptData},</if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> script_remark = #{scriptRemark},</if>
|
<if test="scriptRemark != null and scriptRemark != ''"> script_remark = #{scriptRemark},</if>
|
||||||
<if test="releaseDate != null"> release_date = #{releaseDate},</if>
|
<if test="releaseDate != null"> release_date = #{releaseDate},</if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> script_status = #{scriptStatus},</if>
|
<if test="scriptStatus != null and scriptStatus != ''"> script_status = #{scriptStatus},</if>
|
||||||
|
@ -286,6 +296,7 @@ update sys_application_script set sts= 'N' ,modify_time = #{modify_time},modify
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||||
|
|
|
@ -587,6 +587,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
sysApplicationDatabaseDao.logicRemoveMultiCondition(detailEntity);
|
sysApplicationDatabaseDao.logicRemoveMultiCondition(detailEntity);
|
||||||
SysApplicationDatabaseEntity databaseEntity = entity.getDatabaseEntity();
|
SysApplicationDatabaseEntity databaseEntity = entity.getDatabaseEntity();
|
||||||
if (databaseEntity != null) {
|
if (databaseEntity != null) {
|
||||||
|
databaseEntity.setAppId(entity.getId());
|
||||||
databaseEntity.setPassword(AESUtil.encrypt(databaseEntity.getPassword()));
|
databaseEntity.setPassword(AESUtil.encrypt(databaseEntity.getPassword()));
|
||||||
databaseEntity.setSts("Y");
|
databaseEntity.setSts("Y");
|
||||||
databaseEntity.setSts("Y");
|
databaseEntity.setSts("Y");
|
||||||
|
|
|
@ -289,7 +289,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
<if test="sts == null ">sts,</if>
|
||||||
</trim>
|
</trim>
|
||||||
)values(
|
)values(
|
||||||
|
@ -326,7 +325,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||||
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
||||||
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
||||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from integration_task_living_details a WHERE a.sts = 'Y' ),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
<if test="sts == null ">'Y',</if>
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
|
@ -368,7 +366,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
<if test="sts == null ">sts,</if>
|
||||||
</trim>
|
</trim>
|
||||||
)values(
|
)values(
|
||||||
|
@ -405,7 +402,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||||
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
||||||
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
||||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from integration_task_living_details a WHERE a.sts = 'Y' ),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
<if test="sts == null ">'Y',</if>
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
|
|
|
@ -228,7 +228,7 @@ a.id
|
||||||
from sys_person a
|
from sys_person a
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="id != null and id != ''">and a.id like concat('%',#{id},'%')</if>
|
<if test="id != null and id != ''">and a.id like concat('%',#{id},'%')</if>
|
||||||
<if test="organId != null and organId != ''">and a.organ_id like concat('%',#{organId},'%')</if>
|
<if test="organId != null and organId != ''">and a.organ_id = #{organId}</if>
|
||||||
<if test="personCode != null and personCode != ''">and a.person_code like concat('%',#{personCode},'%')</if>
|
<if test="personCode != null and personCode != ''">and a.person_code like concat('%',#{personCode},'%')</if>
|
||||||
<if test="personName != null and personName != ''">and a.person_name like concat('%',#{personName},'%')</if>
|
<if test="personName != null and personName != ''">and a.person_name like concat('%',#{personName},'%')</if>
|
||||||
<if test="sex != null and sex != ''">and a.sex like concat('%',#{sex},'%')</if>
|
<if test="sex != null and sex != ''">and a.sex like concat('%',#{sex},'%')</if>
|
||||||
|
|
Binary file not shown.
|
@ -10,6 +10,7 @@ import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingE
|
||||||
import com.hzya.frame.web.quartz.QuartzJobFactoryUtils;
|
import com.hzya.frame.web.quartz.QuartzJobFactoryUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
|
@ -34,13 +35,17 @@ public class MyApplicationListener implements ApplicationListener<ApplicationRea
|
||||||
private IIntegrationTaskLivingDao iIntegrationTaskLivingDao;
|
private IIntegrationTaskLivingDao iIntegrationTaskLivingDao;
|
||||||
@Resource
|
@Resource
|
||||||
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
|
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
|
||||||
|
@Value("${data.use}")
|
||||||
|
private boolean dataUse;
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
||||||
initTask();
|
initTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initTask() {
|
private void initTask() {
|
||||||
|
if(!dataUse){
|
||||||
|
return;
|
||||||
|
}
|
||||||
//查询所有任务,添加到任务执行计划中
|
//查询所有任务,添加到任务执行计划中
|
||||||
IntegrationTaskEntity queryEntity = new IntegrationTaskEntity();
|
IntegrationTaskEntity queryEntity = new IntegrationTaskEntity();
|
||||||
//任务状态1、启用
|
//任务状态1、启用
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.hzya.frame.web.action.ApplicationContextUtil;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -36,25 +37,27 @@ public class InitCommandLineRunner implements ApplicationListener<ApplicationRea
|
||||||
Logger logger = LoggerFactory.getLogger(InitCommandLineRunner.class);
|
Logger logger = LoggerFactory.getLogger(InitCommandLineRunner.class);
|
||||||
@Resource
|
@Resource
|
||||||
private ApplicationCache applicationCache;
|
private ApplicationCache applicationCache;
|
||||||
|
@Value("${data.use}")
|
||||||
|
private boolean dataUse;
|
||||||
@Resource
|
@Resource
|
||||||
private InterfaceCache interfaceCache;
|
private InterfaceCache interfaceCache;
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(ApplicationReadyEvent event) {
|
public void onApplicationEvent(ApplicationReadyEvent event) {
|
||||||
logger.info("初始化ApplicationCache Map start <<<<<<<<<<<<<<<<<<<<<<<<");
|
if(dataUse){
|
||||||
applicationCache.reloadData("1");
|
logger.info("初始化ApplicationCache Map start <<<<<<<<<<<<<<<<<<<<<<<<");
|
||||||
applicationCache.reloadData("2");
|
applicationCache.reloadData("1");
|
||||||
applicationCache.reloadData("3");
|
applicationCache.reloadData("2");
|
||||||
applicationCache.reloadData("4");
|
applicationCache.reloadData("3");
|
||||||
|
applicationCache.reloadData("4");
|
||||||
interfaceCache.reloadData("1");
|
|
||||||
interfaceCache.reloadData("2");
|
|
||||||
interfaceCache.reloadData("3");
|
|
||||||
interfaceCache.reloadData("4");
|
|
||||||
interfaceCache.reloadData("5");
|
|
||||||
interfaceCache.reloadData("6");
|
|
||||||
logger.info("初始化ApplicationCache Map END <<<<<<<<<<<<<<<<<<<<<<<<");
|
|
||||||
|
|
||||||
|
interfaceCache.reloadData("1");
|
||||||
|
interfaceCache.reloadData("2");
|
||||||
|
interfaceCache.reloadData("3");
|
||||||
|
interfaceCache.reloadData("4");
|
||||||
|
interfaceCache.reloadData("5");
|
||||||
|
interfaceCache.reloadData("6");
|
||||||
|
logger.info("初始化ApplicationCache Map END <<<<<<<<<<<<<<<<<<<<<<<<");
|
||||||
|
}
|
||||||
String path = InitCommandLineRunner.class.getClassLoader().getResource("").getPath();
|
String path = InitCommandLineRunner.class.getClassLoader().getResource("").getPath();
|
||||||
;
|
;
|
||||||
logger.info("cfgHomeClassURL:" + path);
|
logger.info("cfgHomeClassURL:" + path);
|
||||||
|
|
Loading…
Reference in New Issue