Commit 7727f186 authored by Allen Chen's avatar Allen Chen

commit

parent 5461f4dd
...@@ -124,3 +124,8 @@ This generated password is for development use only. Your security configuration ...@@ -124,3 +124,8 @@ This generated password is for development use only. Your security configuration
2026-03-25 21:21:44 [main] INFO org.ta.pddserver.utils.WorldexUtil - WORLDEX REQ:{"mobile_phone_no":"01036196059","name":"REN SUPING","customs_clearance_code":"P210015618116"} 2026-03-25 21:21:44 [main] INFO org.ta.pddserver.utils.WorldexUtil - WORLDEX REQ:{"mobile_phone_no":"01036196059","name":"REN SUPING","customs_clearance_code":"P210015618116"}
2026-03-25 21:21:45 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariCP - Shutdown initiated... 2026-03-25 21:21:45 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariCP - Shutdown initiated...
2026-03-25 21:21:45 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariCP - Shutdown completed. 2026-03-25 21:21:45 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource - HikariCP - Shutdown completed.
2026-03-29 21:33:17 [main] INFO o.t.p.PddServerApplicationTests - Starting PddServerApplicationTests using Java 25 with PID 15868 (started by ChenH in E:\HJ\multiplesourcesecurity\PddServer)
2026-03-29 21:33:17 [main] INFO o.t.p.PddServerApplicationTests - No active profile set, falling back to 1 default profile: "default"
2026-03-29 21:33:21 [main] INFO o.t.p.serviceutil.WaybillOperator - 初始化 WaybillOperator,获取当前面单池状态
2026-03-29 21:33:21 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariCP - Starting...
2026-03-29 21:33:43 [main] WARN o.s.w.c.s.GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pddLocalController': Injection of resource dependencies failed
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>org.springframework.boot</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-security</artifactId> <!-- <artifactId>spring-boot-starter-security</artifactId>-->
</dependency> <!-- </dependency>-->
<!-- mysql --> <!-- mysql -->
<dependency> <dependency>
......
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.ta.pddserver.model.enums.IdentityErrorType; import org.ta.pddserver.model.enums.IdentityErrorType;
...@@ -21,6 +22,9 @@ public class UniPassUtil { ...@@ -21,6 +22,9 @@ public class UniPassUtil {
* @param custPsno 邮编 * @param custPsno 邮编
* @return 结果信息 * @return 结果信息
*/ */
private static RestTemplate restTemplate = null;
public static UniPassPersonalClearanceCheckResult queryUniPassPersonalClearanceInfo(String persEcm, String pltxNm, String cralTelNo, String custPsno) { public static UniPassPersonalClearanceCheckResult queryUniPassPersonalClearanceInfo(String persEcm, String pltxNm, String cralTelNo, String custPsno) {
String url = String.format("https://unipass.customs.go.kr:38010/ext/rest/persEcmQry/retrievePersEcm?crkyCn=g240g274x016o063l080g030v2&persEcm=%s&pltxNm=%s&cralTelno=%s&custPsno=%s", persEcm, pltxNm, cralTelNo, custPsno); String url = String.format("https://unipass.customs.go.kr:38010/ext/rest/persEcmQry/retrievePersEcm?crkyCn=g240g274x016o063l080g030v2&persEcm=%s&pltxNm=%s&cralTelno=%s&custPsno=%s", persEcm, pltxNm, cralTelNo, custPsno);
log.info("url:" + url); log.info("url:" + url);
...@@ -70,12 +74,24 @@ public class UniPassUtil { ...@@ -70,12 +74,24 @@ public class UniPassUtil {
* @return 结果信息 * @return 结果信息
*/ */
public static IdentityErrorType queryUniPassPersonalClearanceInfo(String persEcm, String pltxNm, String cralTelNo) { public static IdentityErrorType queryUniPassPersonalClearanceInfo(String persEcm, String pltxNm, String cralTelNo) {
if (restTemplate == null) {
// HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory();
// httpRequestFactory.setConnectionRequestTimeout(2*1000);
// httpRequestFactory.setConnectTimeout(2*1000);
// httpRequestFactory.setReadTimeout(2*1000);
restTemplate = new RestTemplate();
}
String url = String.format("https://unipass.customs.go.kr:38010/ext/rest/persEcmQry/retrievePersEcm?crkyCn=g240g274x016o063l080g030v2&persEcm=%s&pltxNm=%s&cralTelno=%s", persEcm, pltxNm, cralTelNo); String url = String.format("https://unipass.customs.go.kr:38010/ext/rest/persEcmQry/retrievePersEcm?crkyCn=g240g274x016o063l080g030v2&persEcm=%s&pltxNm=%s&cralTelno=%s", persEcm, pltxNm, cralTelNo);
log.info("url:" + url); log.info("url:" + url);
// UniPassPersonalClearanceCheckResult result = new UniPassPersonalClearanceCheckResult(); // UniPassPersonalClearanceCheckResult result = new UniPassPersonalClearanceCheckResult();
// result.setSuccess(false); // result.setSuccess(false);
try { try {
ResponseEntity<String> resp = new RestTemplate().getForEntity(url, String.class); ResponseEntity<String> resp = restTemplate.getForEntity(url, String.class);
int retry = 0;
// while (!resp.getStatusCode().is2xxSuccessful() & retry < 5) {
// retry++;
// resp = new RestTemplate().getForEntity(url, String.class);
// }
// result.setMsg("查询验证失败!"); // result.setMsg("查询验证失败!");
if (resp.getStatusCode().is2xxSuccessful()) { if (resp.getStatusCode().is2xxSuccessful()) {
XmlMapper xmlMapper = new XmlMapper(); XmlMapper xmlMapper = new XmlMapper();
......
...@@ -11,12 +11,12 @@ spring: ...@@ -11,12 +11,12 @@ spring:
# url: jdbc:mysql://192.168.2.222:3306/pdd_api?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 # url: jdbc:mysql://192.168.2.222:3306/pdd_api?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
# username: root # username: root
# password: root # password: root
# url: jdbc:mysql://lyhj-mysql.mysql.rds.aliyuncs.com:3306/pdd_prod?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 url: jdbc:mysql://lyhj-mysql.mysql.rds.aliyuncs.com:3306/pdd_prod?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
# username: pdd
# password: pdd123
url: jdbc:mysql://rm-j6cv8n7zx12x0sqreuo.mysql.rds.aliyuncs.com:3306/pdd_prod?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
username: pdd username: pdd
password: pdd123 password: pdd123
# url: jdbc:mysql://rm-j6cv8n7zx12x0sqreuo.mysql.rds.aliyuncs.com:3306/pdd_prod?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
# username: pdd
# password: pdd123
hikari: hikari:
minimum-idle: 5 # 最小空闲连接数 minimum-idle: 5 # 最小空闲连接数
maximum-pool-size: 10 # 最大活跃连接数 maximum-pool-size: 10 # 最大活跃连接数
...@@ -42,15 +42,13 @@ logging: ...@@ -42,15 +42,13 @@ logging:
max-history: 30 max-history: 30
level: level:
org: org:
springframework:
security: info
ta: ta:
pddserver: debug pddserver: info
mybatis-plus: mybatis-plus:
configuration: configuration:
map-underscore-to-camel-case: false map-underscore-to-camel-case: false
pdd: pdd:
jyt: 0 jyt: 0
gd: 0 gd: 1
lotto: 0 lotto: 0
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment