diff --git a/code/backend/NewCitizenIdentify/pom.xml b/code/backend/NewCitizenIdentify/pom.xml
index ead865a..3cf3b5a 100644
--- a/code/backend/NewCitizenIdentify/pom.xml
+++ b/code/backend/NewCitizenIdentify/pom.xml
@@ -13,12 +13,20 @@
UTF-8
8
8
- 5.3.24
+ 6.2.4
+ 2.24.3
+ 2.18.3
-
+
+ org.slf4j
+ slf4j-simple
+ 2.0.17
+ test
+
+
junit
junit
@@ -48,49 +56,64 @@
${spring.version}
-
+
+
+
+ jakarta.servlet
+ jakarta.servlet-api
+ 6.1.0
+ provided
-
+
- commons-fileupload
- commons-fileupload
- 1.5
+ org.apache.logging.log4j
+ log4j-core
+ ${log4j.version}
+
+
+ org.apache.logging.log4j
+ log4j-slf4j2-impl
+ ${log4j.version}
+
+
+ org.apache.logging.log4j
+ log4j-api
+ ${log4j.version}
- commons-io
- commons-io
- 2.11.0
+ org.apache.directory.studio
+ org.apache.commons.codec
+ 1.8
-
+
com.fasterxml.jackson.core
jackson-databind
- 2.14.2
+ ${jackson.version}
-
com.fasterxml.jackson.core
jackson-core
- 2.13.4
+ ${jackson.version}
-
com.fasterxml.jackson.core
jackson-annotations
- 2.13.4
+ ${jackson.version}
- com.oracle
- ojdbc8
- 19.3.0.0.0
+ com.mysql
+ mysql-connector-j
+ 9.2.0
@@ -113,9 +136,9 @@
- org.apache.commons
- commons-lang3
- 3.7
+ org.apache.commons
+ commons-lang3
+ 3.7
diff --git a/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/utils/newcitizen/NewCitizenUitls.java b/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/utils/newcitizen/NewCitizenUitls.java
index 0abf5f8..7641ff2 100644
--- a/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/utils/newcitizen/NewCitizenUitls.java
+++ b/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/utils/newcitizen/NewCitizenUitls.java
@@ -1,11 +1,15 @@
/*
* @Author: Kane
+ *
* @Date: 2023-05-25 15:26:09
+ *
* @LastEditors: Kane
+ *
* @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/utils/newcitizen/NewCitizenUitls.java
+ *
* @Description: 新市民认证相关的工具方法
*
- * Copyright (c) ${2022} by Kane, All Rights Reserved.
+ * Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
package com.cpic.xim.utils.newcitizen;
@@ -35,20 +39,22 @@ import com.fasterxml.jackson.databind.ObjectMapper;
public class NewCitizenUitls
{
// 请求地址
- private static String identifyURL = "https://api.xmcic.cn:51888/government/economic/352";
+ private static String identifyURL = "https://api.xmcic.cn:8443/government/economic/352";
/**
* 新市民验证
+ *
* @param idCardNo 身份证号码
- * @param name 姓名
+ * @param name 姓名
* @return
* @throws Exception
*/
- public static IdentifyResult identifyNewCitizen( String idCardNo, String name ) throws Exception
+ public static IdentifyResult identifyNewCitizen( String idCardNo, String name )
+ throws Exception
{
String secretKey = EncryptionParameters.getSecretKey();
- String key = EncryptionParameters.getKey();
- String pushURL = "http://222.76.244.118:11101/NewCitizen/save_score.do";
+ String key = EncryptionParameters.getKey();
+ String pushURL = "http://222.76.244.118:11101/NewCitizen/save_score.do";
Map param = new HashMap();
@@ -57,20 +63,20 @@ public class NewCitizenUitls
param.put( "name", EncryptionUtils.aesEncrypt( name, secretKey ) );
param.put( "pushurl", EncryptionUtils.aesEncrypt( pushURL, secretKey ) );
param.put( "timestamp",
- EncryptionUtils.aesEncrypt( System.currentTimeMillis() + "", secretKey ) );
+ EncryptionUtils.aesEncrypt( System.currentTimeMillis() + "", secretKey ) );
- String sign = SignUtils.sign( param );
+ String sign = SignUtils.sign( param );
Map params = new HashMap<>();
params.putAll( param );
params.put( "key", key );
params.put( "sign", sign );
- String resultJSON = sendPost( identifyURL, params );
- ObjectMapper mapper = new ObjectMapper();
+ String resultJSON = sendPost( identifyURL, params );
+ ObjectMapper mapper = new ObjectMapper();
IdentifyResult identifyResult = null;
- ResponseResult response = null;
-
+ ResponseResult response = null;
+
response = mapper.readValue( resultJSON, ResponseResult.class );
// 请求结果解密,应为一个json
@@ -123,7 +129,8 @@ public class NewCitizenUitls
class ResponseResult
{
public ResponseResult()
- {}
+ {
+ }
public String getCode()
{
@@ -178,4 +185,3 @@ class ResponseResult
private String seqNo;
}
-
diff --git a/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/controllers/NewCitizen/QueryResultController.java b/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/controllers/NewCitizen/QueryResultController.java
index 7cb99d3..7135235 100644
--- a/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/controllers/NewCitizen/QueryResultController.java
+++ b/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/controllers/NewCitizen/QueryResultController.java
@@ -10,7 +10,7 @@
package com.cpic.xim.web.controllers.NewCitizen;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
diff --git a/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/filters/CrosFilter.java b/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/filters/CrosFilter.java
index d218312..593e014 100644
--- a/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/filters/CrosFilter.java
+++ b/code/backend/NewCitizenIdentify/src/main/java/com/cpic/xim/web/filters/CrosFilter.java
@@ -11,13 +11,13 @@
package com.cpic.xim.web.filters;
import java.io.IOException;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.http.HttpMethod;
public class CrosFilter implements Filter
diff --git a/code/backend/NewCitizenIdentify/src/main/webapp/WEB-INF/classes/spring.xml b/code/backend/NewCitizenIdentify/src/main/webapp/WEB-INF/classes/spring.xml
index a349f68..595cc04 100644
--- a/code/backend/NewCitizenIdentify/src/main/webapp/WEB-INF/classes/spring.xml
+++ b/code/backend/NewCitizenIdentify/src/main/webapp/WEB-INF/classes/spring.xml
@@ -17,21 +17,20 @@
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
-
-
+
-
+
-
-
+ -->
\ No newline at end of file