diff --git a/base-buildpackage/pom.xml b/base-buildpackage/pom.xml
index c5ae48c4..92fa0ece 100644
--- a/base-buildpackage/pom.xml
+++ b/base-buildpackage/pom.xml
@@ -37,8 +37,12 @@
true
-
-
+
+ httest
+
+ httest
+
+
kangarooDataCenterV3
diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankElecPluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankElecPluginInitializer.java
new file mode 100644
index 00000000..6c812a88
--- /dev/null
+++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/zxBank/plugin/ZxBankElecPluginInitializer.java
@@ -0,0 +1,57 @@
+package com.hzya.frame.plugin.zxBank.plugin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.base.PluginBaseEntity;
+import com.hzya.frame.seeyon.zxbank.service.IZxBankService;
+import com.hzya.frame.web.entity.JsonResultEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ZxBankElecPluginInitializer extends PluginBaseEntity {
+ Logger logger = LoggerFactory.getLogger(ZxBankElecPluginInitializer.class);
+ @Autowired
+ private IZxBankService zxBankService;
+
+ @Override
+ public void initialize() {
+ logger.info(getPluginLabel() + "執行初始化方法initialize()");
+ }
+
+ @Override
+ public void destroy() {
+ logger.info(getPluginLabel() + "執行銷毀方法destroy()");
+ }
+
+ @Override
+ public String getPluginId() {
+ return "ZxBankElecPluginInitializer";
+ }
+
+ @Override
+ public String getPluginName() {
+ return "ZxBankElecPluginInitializer插件";
+ }
+
+ @Override
+ public String getPluginLabel() {
+ return "ZxBankElecPluginInitializer";
+ }
+
+ @Override
+ public String getPluginType() {
+ return "1";
+ }
+ @Override
+ public JsonResultEntity executeBusiness(JSONObject requestJson) {
+ try {
+ logger.info("======开始执行杭泰付款单查询电子回单并下载电子回单========");
+ return zxBankService.queryArchivesElec(requestJson);
+ }catch (Exception e){
+ logger.info("======执行杭泰付款单查询电子回单并下载电子回单失败:{}========",e.getMessage());
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+}
diff --git a/base-buildpackage/src/main/resources/application-ht.yml b/base-buildpackage/src/main/resources/application-ht.yml
index 81a1c4a7..744db85b 100644
--- a/base-buildpackage/src/main/resources/application-ht.yml
+++ b/base-buildpackage/src/main/resources/application-ht.yml
@@ -6,15 +6,15 @@ logging:
encodings: UTF-8
file:
# 日志保存路径
- path: /home/webservice/zt/log
+ path: D:\yongansystem\serverV3\log\zs
spring:
datasource:
dynamic:
datasource:
master:
- url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter_ht?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://127.0.0.1:3307/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
- password: 62e4295b615a30dbf3b8ee96f41c820b
+ password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
@@ -39,7 +39,7 @@ cbs8:
OA:
data_source_code: yc_oa
zt:
- url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
+ url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
zx:
# 测试用这个 这个是银行给的
privateKey: MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgtzMo2o6THK3yLIm+83Ch/560+02l2hjjBSFGieWY/Z6gCgYIKoEcz1UBgi2hRANCAATKhwZX4P3XI8vYTKeCOLMVbanUNbaXjrIEZynshwdOzRVgzRQSiPNWo6OBBkAPvqE+2RS+5ABpS82DSlKl81z0
diff --git a/base-buildpackage/src/main/resources/application-httest.yml b/base-buildpackage/src/main/resources/application-httest.yml
new file mode 100644
index 00000000..e76f67c7
--- /dev/null
+++ b/base-buildpackage/src/main/resources/application-httest.yml
@@ -0,0 +1,46 @@
+#######################dev环境#######################
+logging:
+ #日志级别 指定目录级别
+ level:
+ root: INFO
+ encodings: UTF-8
+ file:
+ # 日志保存路径
+ path: D:\yongansystem\serverV3\log\test
+spring:
+ datasource:
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:mysql://127.0.0.1:3307/businesscenter_test?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
+ username: root
+ password: bd993088e8a7c3dc5f44441617f9b4bf
+ driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+savefile:
+ # 文件保存路径
+ path: /home/webservice/zt/file
+# path: D:\webservice\file
+# pluginpath: D:\webservice\plugin
+ pluginpath: /home/webservice/zt/plugin
+# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
+ tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
+cbs8:
+ appId: 1P4AGrpz
+ appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
+ url: https://cbs8-openapi-reprd.csuat.cmburl.cn
+ # 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
+ ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
+ # 这个私钥到时候上传到cbs,和下面到是同一对
+ #ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
+ ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
+ cbs_public_key: 0469146F06BF3B01236E84632441E826
+ #电子回单下载临时存放位置
+ elec_path: /Users/xiangerlin/Downloads/
+OA:
+ data_source_code: yc_oa
+zt:
+ url: http://127.0.0.1:10087/kangarooDataCenterV3/entranceController/externalCallInterface
+zx:
+ # 测试用这个 这个是银行给的
+ privateKey: MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgtzMo2o6THK3yLIm+83Ch/560+02l2hjjBSFGieWY/Z6gCgYIKoEcz1UBgi2hRANCAATKhwZX4P3XI8vYTKeCOLMVbanUNbaXjrIEZynshwdOzRVgzRQSiPNWo6OBBkAPvqE+2RS+5ABpS82DSlKl81z0
+ publicKey: MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEyocGV+D91yPL2EyngjizFW2p1DW2l46yBGcp7IcHTs0VYM0UEojzVqOjgQZAD76hPtkUvuQAaUvNg0pSpfNc9A==
\ No newline at end of file
diff --git a/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java b/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java
index 825925b0..e26d6d1c 100644
--- a/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java
+++ b/base-buildpackage/src/test/java/com/hzya/frame/temButtom.java
@@ -2,23 +2,34 @@ package com.hzya.frame;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
+import com.hzya.frame.seeyon.util.YzfSignUtil;
+import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
import com.hzya.frame.util.AESUtil;
+import com.hzya.frame.web.entity.BaseResult;
import org.apache.http.HttpEntity;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
+import javax.net.ssl.SSLContext;
import java.io.IOException;
+import java.lang.reflect.Method;
+import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -36,7 +47,7 @@ public class temButtom {
@Test
public void test01() {
- String a = AESUtil.encrypt("hzya@1314");
+ String a = AESUtil.encrypt("hzya1314");
System.out.println(a);
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
System.out.println(b);
@@ -50,32 +61,31 @@ public class temButtom {
// task7803207f54ff047d6008dcce31c2628f 新增成功!
// 2024-10-24 2024-10-24
- String phone ="19357235324";
- String taskid ="task8b0c7ca72439bc9b0c1c89e8866c8275";
+ String phone = "19357235324";
+ String taskid = "task8b0c7ca72439bc9b0c1c89e8866c8275";
//token
Map headers = new HashMap<>();
- String token ="https://oapi.dingtalk.com/gettoken?appkey=dingxewtjaserj292ggu&appsecret=DuRw6EEEvhGXfr6Q8wN_x4025qKjrffIGCXF9KeCKKIID-LVSsR6_8KWMei6sug1";
- String body = sendGet(token,headers);
+ String token = "https://oapi.dingtalk.com/gettoken?appkey=dingxewtjaserj292ggu&appsecret=DuRw6EEEvhGXfr6Q8wN_x4025qKjrffIGCXF9KeCKKIID-LVSsR6_8KWMei6sug1";
+ String body = sendGet(token, headers);
JSONObject tokenobject = JSONObject.parseObject(body);
//钉钉id
headers = new HashMap<>();
//https://oapi.dingtalk.com/user/get_by_mobile?access_token=9abd3996cb103ba48dd8c69fea5473e7&mobile=15700100840
- String ddid ="https://oapi.dingtalk.com/user/get_by_mobile?access_token="+tokenobject.get("access_token")+"&mobile="+phone;
- String ddidbody = sendGet(ddid,headers);
+ String ddid = "https://oapi.dingtalk.com/user/get_by_mobile?access_token=" + tokenobject.get("access_token") + "&mobile=" + phone;
+ String ddidbody = sendGet(ddid, headers);
JSONObject ddidobject = JSONObject.parseObject(ddidbody);
//人员id
headers = new HashMap<>();
//https://oapi.dingtalk.com/user/get?userid=111336474727636213&access_token=3d21a6614fb037a98542a537336e8149
- String userid ="https://oapi.dingtalk.com/user/get?userid="+ddidobject.get("userid")+"&access_token="+tokenobject.get("access_token");
- String useridbody = sendGet(userid,headers);
+ String userid = "https://oapi.dingtalk.com/user/get?userid=" + ddidobject.get("userid") + "&access_token=" + tokenobject.get("access_token");
+ String useridbody = sendGet(userid, headers);
JSONObject useridobject = JSONObject.parseObject(useridbody);
-
CloseableHttpClient httpClient = HttpClients.createDefault();
- HttpPut httpPut = new HttpPut("https://api.dingtalk.com/v1.0/todo/users/"+useridobject.get("unionid")+"/tasks/"+taskid);
+ HttpPut httpPut = new HttpPut("https://api.dingtalk.com/v1.0/todo/users/" + useridobject.get("unionid") + "/tasks/" + taskid);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000).setConnectionRequestTimeout(35000).setSocketTimeout(60000).build();
httpPut.setConfig(requestConfig);
httpPut.setHeader("Content-type", "application/json");
@@ -122,7 +132,7 @@ public class temButtom {
response = closeableHttpClient.execute(get);
HttpEntity entity = response.getEntity();
- body.append(EntityUtils.toString(entity,"UTF-8"));
+ body.append(EntityUtils.toString(entity, "UTF-8"));
} catch (Exception e) {
body.append(e.getMessage());
} finally {
@@ -143,4 +153,140 @@ public class temButtom {
}
+ @Test
+ public void test0111() {
+ //请求token
+ String accessToken = getToken();
+ //请求分页查询全量进项发票
+ String data = getdata(accessToken);
+
+
+ }
+
+ private String getdata(String accessToken) {
+ String url = "http://oapi.nanofintax.com/api/invoice_receive/fp/v1/query?accessToken="+accessToken;
+ JSONObject dayabody = new JSONObject();
+ dayabody.put("accessKey","6X3B526P5HqE6ums");
+ long timestamp = System.currentTimeMillis();
+ dayabody.put("timestamp",timestamp);
+ JSONObject queryParams = new JSONObject();
+ queryParams.put("page",1);
+ queryParams.put("size",50);
+ dayabody.put("queryParams",queryParams);
+ Map parametersMap = new HashMap<>();
+ parametersMap.put("accessKey","6X3B526P5HqE6ums");
+ parametersMap.put("timestamp",timestamp);
+
+ String a = YzfSignUtil.signRequest(parametersMap,"34e5fc32ac894a2ba2ade8c3852c7a0a");
+ dayabody.put("sign",a);
+
+ StringBuilder body = new StringBuilder();
+ SSLContext sslContext = null;
+ try {
+ sslContext = new SSLContextBuilder()
+ .loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
+ .build();
+ } catch (Exception e) {
+
+ }
+ CloseableHttpClient closeableHttpClient = HttpClients.custom()
+ .setSSLContext(sslContext)
+ .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .build();
+
+ HttpPost post = new HttpPost(url);
+ CloseableHttpResponse response = null;
+
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(6000).build();
+ post.setConfig(requestConfig);//设置请求参数【超时时间】
+ post.setHeader("Content-Type", "application/json; charset=utf-8");
+
+ try {
+ if (dayabody.toJSONString() != null && !"".equals(dayabody.toJSONString())) {
+ ByteArrayEntity entity = new ByteArrayEntity(dayabody.toJSONString().getBytes("UTF-8"));
+ entity.setContentType("application/json");
+ post.setEntity(entity);
+ }
+ response = closeableHttpClient.execute(post);
+
+ HttpEntity entity = response.getEntity();
+ body.append(EntityUtils.toString(entity, "UTF-8"));
+ } catch (Exception e) {
+ body.append(e.getMessage());
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ System.out.println("body"+body);
+
+ return body.toString();
+ }
+
+ private String getToken() {
+ String url = "http://oapi.nanofintax.com/api/getToken";
+ String bodys = "{\"accessKey\":\"6X3B526P5HqE6ums\",\"accessSecret\":\"34e5fc32ac894a2ba2ade8c3852c7a0a\"}";
+ StringBuilder body = new StringBuilder();
+ SSLContext sslContext = null;
+ try {
+ sslContext = new SSLContextBuilder()
+ .loadTrustMaterial(null, TrustAllStrategy.INSTANCE)
+ .build();
+ } catch (Exception e) {
+
+ }
+ CloseableHttpClient closeableHttpClient = HttpClients.custom()
+ .setSSLContext(sslContext)
+ .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+ .build();
+
+ HttpPost post = new HttpPost(url);
+ CloseableHttpResponse response = null;
+
+ RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(6000).build();
+ post.setConfig(requestConfig);//设置请求参数【超时时间】
+ post.setHeader("Content-Type", "application/json; charset=utf-8");
+
+ try {
+ if (bodys != null && !"".equals(bodys)) {
+ ByteArrayEntity entity = new ByteArrayEntity(bodys.getBytes("UTF-8"));
+ entity.setContentType("application/json");
+ post.setEntity(entity);
+ }
+ response = closeableHttpClient.execute(post);
+
+ HttpEntity entity = response.getEntity();
+ body.append(EntityUtils.toString(entity, "UTF-8"));
+ } catch (Exception e) {
+ body.append(e.getMessage());
+ } finally {
+ try {
+ // 关闭响应对象
+ if (response != null) {
+ response.close();
+ }
+ // 关闭响应对象
+ if (closeableHttpClient != null) {
+ closeableHttpClient.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ System.out.println("body"+body);
+ String accessToken = JSONObject.parseObject(body.toString()).getJSONObject("result").getString("accessToken");
+
+ return accessToken;
+ }
}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfObjectUtil.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfObjectUtil.java
new file mode 100644
index 00000000..85e29f99
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfObjectUtil.java
@@ -0,0 +1,81 @@
+package com.hzya.frame.seeyon.util;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * @ClassName YzfObjectUtil
+ * @Description
+ * @Author llg
+ * Date 2025/4/2 2:12 下午
+ */
+public class YzfObjectUtil {
+ /**
+ * 是否为包装类型
+ *
+ * @param clazz 类
+ * @return 是否为包装类型
+ */
+ public static boolean isPrimitiveWrapper(Class> clazz) {
+ if (null == clazz) {
+ return false;
+ }
+ return BasicType.wrapperPrimitiveMap.containsKey(clazz);
+ }
+
+ /**
+ * 是否为基本类型(包括包装类和原始类)
+ *
+ * @param clazz 类
+ * @return 是否为基本类型
+ */
+ public static boolean isBasicType(Class> clazz) {
+ if (null == clazz) {
+ return false;
+ }
+ return (clazz.isPrimitive() || isPrimitiveWrapper(clazz));
+ }
+
+
+ /**
+ * @param clazz 类
+ * @return 是否为简单值类型
+ * 判断是否是基本数据类型、String类型、other CharSequence、Number、Date
+ */
+ public static boolean isSimpleTypeOrString(Class> clazz) {
+ if(clazz == null) {
+ return false;
+ }
+ return isBasicType(clazz) || clazz.isEnum() || CharSequence.class.isAssignableFrom(clazz)
+ || Number.class.isAssignableFrom(clazz) || Date.class.isAssignableFrom(clazz);
+ }
+
+ enum BasicType {
+ BYTE, SHORT, INT, INTEGER, LONG, DOUBLE, FLOAT, BOOLEAN, CHAR, CHARACTER, STRING;
+
+ /**
+ * 包装类型为Key,原始类型为Value,例如: Integer.class =》 int.class.
+ */
+ public static final Map, Class>> wrapperPrimitiveMap = new ConcurrentHashMap<>(8);
+ /**
+ * 原始类型为Key,包装类型为Value,例如: int.class =》 Integer.class.
+ */
+ public static final Map, Class>> primitiveWrapperMap = new ConcurrentHashMap<>(8);
+
+ static {
+ wrapperPrimitiveMap.put(Boolean.class, boolean.class);
+ wrapperPrimitiveMap.put(Byte.class, byte.class);
+ wrapperPrimitiveMap.put(Character.class, char.class);
+ wrapperPrimitiveMap.put(Double.class, double.class);
+ wrapperPrimitiveMap.put(Float.class, float.class);
+ wrapperPrimitiveMap.put(Integer.class, int.class);
+ wrapperPrimitiveMap.put(Long.class, long.class);
+ wrapperPrimitiveMap.put(Short.class, short.class);
+
+ for (Map.Entry, Class>> entry : wrapperPrimitiveMap.entrySet()) {
+ primitiveWrapperMap.put(entry.getValue(), entry.getKey());
+ }
+ }
+ }
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfSHA256Util.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfSHA256Util.java
new file mode 100644
index 00000000..cd65e231
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfSHA256Util.java
@@ -0,0 +1,50 @@
+package com.hzya.frame.seeyon.util;
+import java.security.MessageDigest;
+
+/**
+ * @ClassName YzfSHA256Util
+ * @Description
+ * @Author llg
+ * Date 2025/4/2 2:11 下午
+ */
+public class YzfSHA256Util {
+
+ /**
+ * 利用java原生的摘要实现SHA256加密
+ * @param str 加密后的报文
+ * @return
+ */
+ public static String getSHA256StrJava(String str, String charsetName) {
+ MessageDigest messageDigest;
+ String encodeStr = "";
+
+ try {
+ messageDigest = MessageDigest.getInstance("SHA-256");
+ messageDigest.update(str.getBytes(charsetName));
+ encodeStr = byte2Hex(messageDigest.digest());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return encodeStr;
+ }
+
+ /**
+ * 将byte转为16进制
+ * @param bytes
+ * @return
+ */
+ private static String byte2Hex(byte[] bytes) {
+ StringBuffer stringBuffer = new StringBuffer();
+ String temp = null;
+ for (int i = 0; i < bytes.length; i++) {
+ temp = Integer.toHexString(bytes[i] & 0xFF);
+ if (temp.length() == 1) {
+ //1得到一位的进行补0操作
+ stringBuffer.append("0");
+ }
+ stringBuffer.append(temp);
+ }
+ return stringBuffer.toString();
+ }
+}
diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfSignUtil.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfSignUtil.java
new file mode 100644
index 00000000..1a37738b
--- /dev/null
+++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/YzfSignUtil.java
@@ -0,0 +1,45 @@
+package com.hzya.frame.seeyon.util;
+
+import org.apache.commons.lang.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Map;
+
+/**
+ * @ClassName YzfSignUtil
+ * @Description
+ * @Author llg
+ * Date 2025/4/2 2:14 下午
+ */
+public class YzfSignUtil {
+ private static final String CHARSET = "utf-8";
+
+ public static String signRequest(Map parametersMap, String secretkey) {
+ ArrayList list = new ArrayList<>();
+ for (Map.Entry entry : parametersMap.entrySet()) {
+ String key = entry.getKey();
+ Object val = entry.getValue();
+ if (StringUtils.isBlank(key) || val == null) {
+ continue;
+ }
+
+ if (YzfObjectUtil.isSimpleTypeOrString(val.getClass())) {
+ if (null != val && !"".equals(val)) {
+ list.add(key + "=" + val + "&");
+ }
+ }
+ }
+ int size = list.size();
+ String[] arrayToSort = list.toArray(new String[size]);
+ Arrays.sort(arrayToSort, String.CASE_INSENSITIVE_ORDER);
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < size; i++) {
+ sb.append(arrayToSort[i]);
+ }
+ String result = sb.toString();
+ result += secretkey;
+ result = YzfSHA256Util.getSHA256StrJava(result, CHARSET);
+ return result;
+ }
+}
diff --git a/pom.xml b/pom.xml
index 349fd315..2d3edc15 100644
--- a/pom.xml
+++ b/pom.xml
@@ -471,33 +471,33 @@
maven-war-plugin
-
- ${basedir}/../base-service/src/main/webapp/WEB-INF/lib
- WEB-INF/lib/
- false
-
-
- **/*.jar
-
-
-
- ${basedir}/../fw-bip/src/main/webapp/WEB-INF/lib
- WEB-INF/lib/
- false
-
-
- **/*.jar
-
-
-
- ${basedir}/../fw-ningbobank/src/main/webapp/WEB-INF/lib
- WEB-INF/lib/
- false
-
-
- **/*.jar
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+