sanlin.shi 3 weeks ago
parent
commit
7c5ffffaa5

+ 5 - 4
src/main/java/cn/hanghui/outapi/platform/tenant/service/impl/RiskServer.java

@@ -1,6 +1,7 @@
 package cn.hanghui.outapi.platform.tenant.service.impl;
 
 import cn.hanghui.outapi.platform.common.utils.DESUtil;
+import cn.hanghui.outapi.platform.common.utils.Preconditions;
 import cn.hanghui.outapi.platform.tenant.entity.dto.RiskPcResp;
 import cn.hanghui.outapi.platform.tenant.entity.enums.RiskRespCodeEnum;
 import cn.hutool.http.HttpUtil;
@@ -80,7 +81,9 @@ public class RiskServer {
 
     private String getFxpfjxToken() {
         try {
-            if (redisTemplate.hasKey(CACHE_TOKEN_FXPFJX_KEY)) {
+            if (redisTemplate.hasKey(CACHE_TOKEN_FXPFJX_KEY)
+                    && Preconditions.isNotBlank(redisTemplate.opsForValue().get(CACHE_TOKEN_FXPFJX_KEY))
+                    && Preconditions.isNotBlank((String) redisTemplate.opsForValue().get(CACHE_TOKEN_FXPFJX_KEY))) {
                 return (String) redisTemplate.opsForValue().get(CACHE_TOKEN_FXPFJX_KEY);
             }
             JSONObject object = new JSONObject();
@@ -94,7 +97,7 @@ public class RiskServer {
             RiskPcResp riskPcResp = JSONObject.parseObject(resp, RiskPcResp.class);
             if (RiskRespCodeEnum.SUCCESS.getCode().equals(riskPcResp.getHeader().getCode())) {
                 String token = riskPcResp.getBody().getToken();
-                redisTemplate.opsForValue().set(CACHE_TOKEN_FXPFJX_KEY, token, 7100, TimeUnit.SECONDS);
+                redisTemplate.opsForValue().set(CACHE_TOKEN_FXPFJX_KEY, token, 6000, TimeUnit.SECONDS);
                 return token;
             }
         } catch (Exception e) {
@@ -104,6 +107,4 @@ public class RiskServer {
     }
 
 
-
-
 }

+ 3 - 1
src/main/java/cn/hanghui/outapi/platform/xinghuo/service/impl/ProofOpenApiServiceImpl.java

@@ -313,9 +313,11 @@ public class ProofOpenApiServiceImpl implements ProofOpenApiService {
 
     private ProvisionalIdentityProofSpecialCode modifySpecialCodeData(SpecialCodeApplyReq decryptContent, ProvisionalIdentityProofSpecialCode specialCode, String qrCodeNo) {
         specialCode.setUpdateTime(new Date());
+        specialCode.setQrCodeNo(qrCodeNo);
         specialCode.setStartDate(decryptContent.getStartDate());
         specialCode.setEndDate(decryptContent.getEndDate());
-        specialCode.setQrCodeNo(qrCodeNo);
+        specialCode.setIssuingTime(decryptContent.getIssuingTime());
+        specialCode.setIssuingAuthority(decryptContent.getIssuingAuthority());
         String photo = decryptContent.getPhotoBase64();
         if (Preconditions.isNotBlank(decryptContent.getPhotoBase64())) {
             try {

+ 6 - 6
src/main/resources/application-api.yml

@@ -47,14 +47,14 @@ spring:
       datasource:
         master:
           driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://127.0.0.1:3306/hanghui_outapi_platform?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
+          url: jdbc:mysql://192.168.1.4:3306/hanghui_outapi_platform?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
-          password: Nqj##117521
+          password: Nqj##361
         mysqltiprove:
           driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://127.0.0.1:3306/ti_prove?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
+          url: jdbc:mysql://192.168.1.4:3306/ti_prove?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
-          password: Nqj##117521
+          password: Nqj##361
 
 --- # redis
 spring:
@@ -64,7 +64,7 @@ spring:
     # 端口,默认为6379
     port: 6379
     # 数据库索引
-    database: 0
+    database: 2
     # 密码
     password: 117521
     # 连接超时时间
@@ -218,7 +218,7 @@ recurrent:
 
 # 巨龙 用户基本信息查询
 dragon:
-  domain: http://127.0.0.1:8904/dragonsoft
+  domain: http://192.168.1.2:8904/dragonsoft
   queryUserInfoUrl: /api/v1/dragon/query
 
 # 临证加解密

+ 1 - 1
src/main/resources/application.yml

@@ -5,7 +5,7 @@ spring:
 
 server:
   servlet:
-        context-path: ${context-path:/hanghui/outapi}
+     context-path: ${context-path:/hanghui/outapi}
 #    context-path: /hanghui/outapi
 #    context-path: /hanghui-server-platform
 #   开放ap(包含:特殊二维码服务)