Compare commits
1 Commits
feature-ma
...
97adb0ff47
Author | SHA1 | Date | |
---|---|---|---|
97adb0ff47 |
@@ -1,87 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2025-03-16 00:35:09
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /cpicxim-huixiabao/.vscode/fileheader.template.js
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This file is generated by VSCode extension: Fileheader Pro
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* These comments can help you write your own template with type hint
|
|
||||||
* @typedef {Object} FileheaderVariable Fileheader variables
|
|
||||||
* @property {string} birthtime file birth time. will get it from VCS or fallback to filesystem when it is not available
|
|
||||||
* @property {string} mtime file modification time. will get it from VCS or fallback to filesystem when it is not available
|
|
||||||
* @property {string} authorName if the file is tracked by VCS, it will get the author name from VCS. else it will get it from current user name
|
|
||||||
* @property {string} authorEmail if the file is tracked by VCS, it will get the author email from VCS. else it will get it from current user email
|
|
||||||
* @property {string} userName else it will get it from current user name
|
|
||||||
* @property {string} userEmail user email is from VSCode config, and fallback to VCS config
|
|
||||||
* @property {string} companyName
|
|
||||||
* @property {string} projectName name of current project
|
|
||||||
* @property {string} filePath the file path, relative to project root with POSIX path separator
|
|
||||||
* @property {string} dirPath the directory path, relative to project root with POSIX path separator
|
|
||||||
* @property {string} fileName filename with extension
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {string | number | null | undefined | Template | boolean} TemplateInterpolation NOTE: boolean or falsy value will render empty string
|
|
||||||
*
|
|
||||||
* @typedef {{ strings: TemplateStringsArray; interpolations: TemplateInterpolation[]; }} Template
|
|
||||||
* @typedef {(strings: TemplateStringsArray, ...values: any[]) => string} ITemplateFunction
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Please confirm your provider extends from globalThis.FileheaderLanguageProvider
|
|
||||||
*/
|
|
||||||
class CustomLanguageProvider extends globalThis.FileheaderLanguageProvider {
|
|
||||||
/**
|
|
||||||
* @type {string[]}
|
|
||||||
*/
|
|
||||||
languages = [
|
|
||||||
"java",
|
|
||||||
"javascript",
|
|
||||||
"typescript",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescriptreact",
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {string=} the language block comment start string.
|
|
||||||
* this is for future feature: support detect old custom template when custom template changes
|
|
||||||
*/
|
|
||||||
blockCommentStart = "/**";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {string=}
|
|
||||||
*/
|
|
||||||
blockCommentEnd = "*/";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get your template when document language matched
|
|
||||||
* @param {ITemplateFunction} tpl template function, it is a tagged function, support nested interpolation
|
|
||||||
* @param {FileheaderVariable} variables template variables
|
|
||||||
* @returns {Template}
|
|
||||||
*/
|
|
||||||
getTemplate(tpl, variables) {
|
|
||||||
// prettier-ignore
|
|
||||||
return tpl
|
|
||||||
`/**
|
|
||||||
* @Author: ${variables.authorName} <${variables.authorEmail}>
|
|
||||||
* @Date: ${variables.birthtime}
|
|
||||||
* @LastEditors: ${variables.userName}
|
|
||||||
* @LastModified: ${variables.mtime}
|
|
||||||
* @FilePath: ${variables.filePath}
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2025} by Kane All rights reserved
|
|
||||||
*/`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// export your provider classes
|
|
||||||
module.exports = [CustomLanguageProvider];
|
|
@@ -1,13 +1,4 @@
|
|||||||
/**
|
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
|
||||||
* @Date: 2023-05-26 18:40:36
|
|
||||||
* @LastEditors: Kane Wang
|
|
||||||
* @LastModified: 2025-05-07 22:02:07
|
|
||||||
* @FilePath: src/main/java/com/cpic/xim/utils/config/EncryptionParameters.java
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
|
||||||
*/
|
|
||||||
package com.cpic.xim.utils.config;
|
package com.cpic.xim.utils.config;
|
||||||
|
|
||||||
public class EncryptionParameters
|
public class EncryptionParameters
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
/**
|
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
|
||||||
* @Date: 2024-04-29 11:09:50
|
|
||||||
* @LastEditors: Kane Wang
|
|
||||||
* @LastModified: 2025-05-07 22:04:08
|
|
||||||
* @FilePath: src/main/java/com/cpic/xim/utils/http/HttpUtils.java
|
|
||||||
* @Description: 用于http的相关工具方法
|
|
||||||
*
|
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
|
||||||
*/
|
|
||||||
package com.cpic.xim.utils.http;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import org.apache.http.HttpEntity;
|
|
||||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
import org.apache.http.client.methods.HttpPost;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
|
||||||
import org.apache.http.impl.client.HttpClients;
|
|
||||||
import org.apache.http.message.BasicNameValuePair;
|
|
||||||
import org.apache.http.util.EntityUtils;
|
|
||||||
|
|
||||||
public class HttpUtils
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param url
|
|
||||||
* @param bodyMap
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String sendPost( String url, Map<String, String> bodyMap )
|
|
||||||
{
|
|
||||||
HttpPost post = new HttpPost( url );
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// 创建参数集合
|
|
||||||
List<BasicNameValuePair> list = new ArrayList<>();
|
|
||||||
// 添加参数
|
|
||||||
if ( bodyMap != null )
|
|
||||||
{
|
|
||||||
for ( String str : bodyMap.keySet() )
|
|
||||||
{
|
|
||||||
list.add( new BasicNameValuePair( str, bodyMap.get( str ) ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 把参数放入请求对象,post发送的参数list,指定格式
|
|
||||||
post.setEntity( new UrlEncodedFormEntity( list, "UTF-8" ) );
|
|
||||||
CloseableHttpClient client = HttpClients.createDefault();
|
|
||||||
// 启动执行请求,并获得返回值
|
|
||||||
CloseableHttpResponse response = client.execute( post );
|
|
||||||
// 得到返回的entity对象
|
|
||||||
HttpEntity entity = response.getEntity();
|
|
||||||
// 把实体对象转换为string
|
|
||||||
return EntityUtils.toString( entity, "UTF-8" );
|
|
||||||
}
|
|
||||||
catch ( Exception e1 )
|
|
||||||
{
|
|
||||||
e1.printStackTrace();
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,24 +1,39 @@
|
|||||||
/**
|
/*
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane
|
||||||
* @Date: 2023-05-26 18:40:36
|
|
||||||
* @LastEditors: Kane Wang
|
|
||||||
* @LastModified: 2025-05-08 18:55:36
|
|
||||||
* @FilePath: src/main/java/com/cpic/xim/utils/newcitizen/NewCitizenUitls.java
|
|
||||||
* @Description:
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
* @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.
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.utils.newcitizen;
|
package com.cpic.xim.utils.newcitizen;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.apache.http.HttpEntity;
|
||||||
import com.cpic.xim.utils.config.EncryptionParameters;
|
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||||
import com.cpic.xim.utils.http.HttpUtils;
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
import com.cpic.xim.utils.security.decode.DecryptionUtils;
|
import org.apache.http.client.methods.HttpPost;
|
||||||
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
import org.apache.http.impl.client.HttpClients;
|
||||||
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
|
// import com.cdp.product.security.decode.CdpDecryptUtil;
|
||||||
|
// import com.cdp.product.security.encode.EncryptionUtils;
|
||||||
|
// import com.cdp.product.security.sign.CdpSignUtil;
|
||||||
import com.cpic.xim.utils.security.encode.EncryptionUtils;
|
import com.cpic.xim.utils.security.encode.EncryptionUtils;
|
||||||
|
import com.cpic.xim.utils.security.decode.DecryptionUtils;
|
||||||
import com.cpic.xim.utils.security.sign.SignUtils;
|
import com.cpic.xim.utils.security.sign.SignUtils;
|
||||||
|
import com.cpic.xim.utils.config.EncryptionParameters;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.core.JsonParseException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
public class NewCitizenUitls
|
public class NewCitizenUitls
|
||||||
@@ -57,7 +72,7 @@ public class NewCitizenUitls
|
|||||||
params.put( "key", key );
|
params.put( "key", key );
|
||||||
params.put( "sign", sign );
|
params.put( "sign", sign );
|
||||||
|
|
||||||
String resultJSON = HttpUtils.sendPost( identifyURL, params );
|
String resultJSON = sendPost( identifyURL, params );
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
IdentifyResult identifyResult = null;
|
IdentifyResult identifyResult = null;
|
||||||
ResponseResult response = null;
|
ResponseResult response = null;
|
||||||
@@ -75,6 +90,39 @@ public class NewCitizenUitls
|
|||||||
|
|
||||||
return identifyResult;
|
return identifyResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String sendPost( String url, Map<String, String> bodyMap )
|
||||||
|
{
|
||||||
|
HttpPost post = new HttpPost( url );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 创建参数集合
|
||||||
|
List<BasicNameValuePair> list = new ArrayList<>();
|
||||||
|
// 添加参数
|
||||||
|
if ( bodyMap != null )
|
||||||
|
{
|
||||||
|
for ( String str : bodyMap.keySet() )
|
||||||
|
{
|
||||||
|
list.add( new BasicNameValuePair( str, bodyMap.get( str ) ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 把参数放入请求对象,post发送的参数list,指定格式
|
||||||
|
post.setEntity( new UrlEncodedFormEntity( list, "UTF-8" ) );
|
||||||
|
CloseableHttpClient client = HttpClients.createDefault();
|
||||||
|
// 启动执行请求,并获得返回值
|
||||||
|
CloseableHttpResponse response = client.execute( post );
|
||||||
|
// 得到返回的entity对象
|
||||||
|
HttpEntity entity = response.getEntity();
|
||||||
|
// 把实体对象转换为string
|
||||||
|
return EntityUtils.toString( entity, "UTF-8" );
|
||||||
|
}
|
||||||
|
catch ( Exception e1 )
|
||||||
|
{
|
||||||
|
e1.printStackTrace();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,22 +1,19 @@
|
|||||||
/**
|
/*
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane
|
||||||
* @Date: 2023-05-26 18:40:36
|
* @Date: 2023-05-25 15:17:49
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane
|
||||||
* @LastModified: 2025-05-07 14:59:15
|
* @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/web/controllers/NewCitizen/IdentifyNewCitizenRequest.java
|
||||||
* @FilePath: src/main/java/com/cpic/xim/web/controllers/NewCitizen/IdentifyNewCitizenRequest.java
|
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.web.controllers.newcitizen;
|
package com.cpic.xim.web.controllers.NewCitizen;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
public class IdentifyNewCitizenRequest
|
public class IdentifyNewCitizenRequest
|
||||||
{
|
{
|
||||||
public IdentifyNewCitizenRequest()
|
public IdentifyNewCitizenRequest() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIdCardNo()
|
public String getIdCardNo()
|
||||||
{
|
{
|
||||||
|
@@ -1,14 +1,13 @@
|
|||||||
/**
|
/*
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane
|
||||||
* @Date: 2024-04-29 11:09:50
|
* @Date: 2023-05-25 20:26:06
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane
|
||||||
* @LastModified: 2025-05-07 22:01:21
|
* @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/web/controllers/NewCitizen/IdentifyNewCitizenResult.java
|
||||||
* @FilePath: src/main/java/com/cpic/xim/web/controllers/newcitizen/IdentifyNewCitizenResponse.java
|
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.web.controllers.newcitizen;
|
package com.cpic.xim.web.controllers.NewCitizen;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
/**
|
/*
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane
|
||||||
* @Date: 2024-04-29 11:09:50
|
* @Date: 2023-05-25 12:09:27
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane
|
||||||
* @LastModified: 2025-05-07 22:00:48
|
* @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/web/controllers/NewCitizen/QueryResultController.java
|
||||||
* @FilePath: src/main/java/com/cpic/xim/web/controllers/newcitizen/QueryResultController.java
|
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.web.controllers.newcitizen;
|
|
||||||
|
package com.cpic.xim.web.controllers.NewCitizen;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@@ -1,14 +1,5 @@
|
|||||||
/**
|
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
package com.cpic.xim.web.controllers.NewCitizen;
|
||||||
* @Date: 2024-04-29 11:09:50
|
|
||||||
* @LastEditors: Kane Wang
|
|
||||||
* @LastModified: 2025-05-07 22:00:35
|
|
||||||
* @FilePath: src/main/java/com/cpic/xim/web/controllers/newcitizen/QueryResultRequest.java
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
|
||||||
*/
|
|
||||||
package com.cpic.xim.web.controllers.newcitizen;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
/**
|
/*
|
||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane
|
||||||
* @Date: 2023-05-26 18:40:36
|
* @Date: 2023-05-25 11:02:53
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane
|
||||||
* @LastModified: 2025-05-07 22:00:26
|
* @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/web/filters/CrosFilter.java
|
||||||
* @FilePath: src/main/java/com/cpic/xim/web/filters/CrosFilter.java
|
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) 2025 by Kane All rights reserved
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.cpic.xim.web.filters;
|
package com.cpic.xim.web.filters;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -24,8 +24,7 @@ public class CrosFilter implements Filter
|
|||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
||||||
throws ServletException,
|
throws ServletException, IOException
|
||||||
IOException
|
|
||||||
{
|
{
|
||||||
HttpServletRequest request = (HttpServletRequest) req;
|
HttpServletRequest request = (HttpServletRequest) req;
|
||||||
HttpServletResponse response = (HttpServletResponse) resp;
|
HttpServletResponse response = (HttpServletResponse) resp;
|
||||||
|
@@ -1,11 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||||
<web-app
|
|
||||||
version="4.0"
|
|
||||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
|
||||||
xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
|
|
||||||
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||||
|
version="3.1">
|
||||||
|
|
||||||
<display-name>Archetype Created Web Application</display-name>
|
<display-name>Archetype Created Web Application</display-name>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user