Merge branch 'dev' of http://hzya.ufyct.com:9015/root/kangarooDataCenterV3 into yuecheng-project
This commit is contained in:
commit
89a1182f26
|
@ -122,3 +122,5 @@ jeecg :
|
|||
minio_name: ??
|
||||
minio_pass: ??
|
||||
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 = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
||||
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 dm = "dm.jdbc.driver.DmDriver"; // 达梦数据库的驱动类
|
||||
|
||||
|
|
47
pom.xml
47
pom.xml
|
@ -23,8 +23,8 @@
|
|||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<junit.version>4.12</junit.version>
|
||||
<fastjson.version>2.0.33</fastjson.version>
|
||||
<spring-boot-starter-web.version>2.7.4</spring-boot-starter-web.version>
|
||||
<spring-boot-starter-tomcat.version>2.7.4</spring-boot-starter-tomcat.version>
|
||||
<spring-boot-starter-web.version>2.7.18</spring-boot-starter-web.version>
|
||||
<spring-boot-starter-tomcat.version>2.7.18</spring-boot-starter-tomcat.version>
|
||||
<p6spy.version>3.9.1</p6spy.version>
|
||||
<gson.version>2.8.5</gson.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-java>5.1.49</mysql-connector-java>
|
||||
<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>
|
||||
<lang3.version>3.13.0</lang3.version>
|
||||
<commons.io.version>2.6</commons.io.version>
|
||||
|
@ -53,9 +53,9 @@
|
|||
<ojdbc6.version>11.2.0.4</ojdbc6.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>
|
||||
<spring-boot-starter-test.version>2.7.4</spring-boot-starter-test.version>
|
||||
<spring-boot.version>2.7.4</spring-boot.version>
|
||||
<spring-boot-starter-aop.version>2.7.4</spring-boot-starter-aop.version>
|
||||
<spring-boot-starter-test.version>2.7.18</spring-boot-starter-test.version>
|
||||
<spring-boot.version>2.7.18</spring-boot.version>
|
||||
<spring-boot-starter-aop.version>2.7.18</spring-boot-starter-aop.version>
|
||||
<unit.version>4.12</unit.version>
|
||||
<quartz.version>2.3.0</quartz.version>
|
||||
<org.springframework.version>5.3.23</org.springframework.version>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.4</version>
|
||||
<version>2.7.18</version>
|
||||
<relativePath/>
|
||||
<!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
@ -275,6 +275,11 @@
|
|||
<version>${lombok.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>6.4.0.jre8</version>
|
||||
</dependency>
|
||||
<!--sqlserver-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
||||
|
@ -403,7 +408,7 @@
|
|||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.7.4</version>
|
||||
<version>2.7.18</version>
|
||||
<configuration>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
|
@ -411,6 +416,32 @@
|
|||
<skip>true</skip>
|
||||
</configuration>
|
||||
</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>
|
||||
<!--加载src/main/java下的xml-->
|
||||
<resources>
|
||||
|
|
|
@ -26,14 +26,14 @@
|
|||
<artifactId>pubbaseapp_nccloud_rtLevel</artifactId>
|
||||
<version>1</version>
|
||||
<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>
|
||||
<groupId>com.hzya.bipyonyoulog</groupId>
|
||||
<artifactId>yonyoulog</artifactId>
|
||||
<version>1</version>
|
||||
<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>
|
||||
|
@ -41,7 +41,7 @@
|
|||
<artifactId>bcprov</artifactId>
|
||||
<version>1</version>
|
||||
<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>
|
||||
|
@ -49,7 +49,14 @@
|
|||
<artifactId>DataApiSdk</artifactId>
|
||||
<version>1</version>
|
||||
<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>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -587,6 +587,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
sysApplicationDatabaseDao.logicRemoveMultiCondition(detailEntity);
|
||||
SysApplicationDatabaseEntity databaseEntity = entity.getDatabaseEntity();
|
||||
if (databaseEntity != null) {
|
||||
databaseEntity.setAppId(entity.getId());
|
||||
databaseEntity.setPassword(AESUtil.encrypt(databaseEntity.getPassword()));
|
||||
databaseEntity.setSts("Y");
|
||||
databaseEntity.setSts("Y");
|
||||
|
|
|
@ -289,7 +289,6 @@
|
|||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -326,7 +325,6 @@
|
|||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||
<if test="def4 != null and def4 != ''"> #{def4} ,</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>
|
||||
</trim>
|
||||
)
|
||||
|
@ -368,7 +366,6 @@
|
|||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -405,7 +402,6 @@
|
|||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||
<if test="def4 != null and def4 != ''"> #{def4} ,</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>
|
||||
</trim>
|
||||
)
|
||||
|
|
|
@ -228,7 +228,7 @@ a.id
|
|||
from sys_person a
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<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="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>
|
||||
|
|
Binary file not shown.
|
@ -10,6 +10,7 @@ import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingE
|
|||
import com.hzya.frame.web.quartz.QuartzJobFactoryUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.core.annotation.Order;
|
||||
|
@ -34,13 +35,17 @@ public class MyApplicationListener implements ApplicationListener<ApplicationRea
|
|||
private IIntegrationTaskLivingDao iIntegrationTaskLivingDao;
|
||||
@Resource
|
||||
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
|
||||
|
||||
@Value("${data.use}")
|
||||
private boolean dataUse;
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
||||
initTask();
|
||||
}
|
||||
|
||||
private void initTask() {
|
||||
if(!dataUse){
|
||||
return;
|
||||
}
|
||||
//查询所有任务,添加到任务执行计划中
|
||||
IntegrationTaskEntity queryEntity = new IntegrationTaskEntity();
|
||||
//任务状态1、启用
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.hzya.frame.web.action.ApplicationContextUtil;
|
|||
import org.apache.commons.io.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -36,11 +37,13 @@ public class InitCommandLineRunner implements ApplicationListener<ApplicationRea
|
|||
Logger logger = LoggerFactory.getLogger(InitCommandLineRunner.class);
|
||||
@Resource
|
||||
private ApplicationCache applicationCache;
|
||||
|
||||
@Value("${data.use}")
|
||||
private boolean dataUse;
|
||||
@Resource
|
||||
private InterfaceCache interfaceCache;
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationReadyEvent event) {
|
||||
if(dataUse){
|
||||
logger.info("初始化ApplicationCache Map start <<<<<<<<<<<<<<<<<<<<<<<<");
|
||||
applicationCache.reloadData("1");
|
||||
applicationCache.reloadData("2");
|
||||
|
@ -54,7 +57,7 @@ public class InitCommandLineRunner implements ApplicationListener<ApplicationRea
|
|||
interfaceCache.reloadData("5");
|
||||
interfaceCache.reloadData("6");
|
||||
logger.info("初始化ApplicationCache Map END <<<<<<<<<<<<<<<<<<<<<<<<");
|
||||
|
||||
}
|
||||
String path = InitCommandLineRunner.class.getClassLoader().getResource("").getPath();
|
||||
;
|
||||
logger.info("cfgHomeClassURL:" + path);
|
||||
|
|
Loading…
Reference in New Issue