Browse Source

Merge remote-tracking branch 'origin/release-checkinto-241113' into release-checkinto-241113

GITZYY 4 months ago
parent
commit
2e4bb5e8d3
64 changed files with 1080 additions and 468 deletions
  1. 4 0
      egress-gateway-service-domain/pom.xml
  2. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongChuangJinFuCreditService.java
  3. 12 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangDaChangShaCreditService.java
  4. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangKeBuShuCreditService.java
  5. 12 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangKeV2CreditService.java
  6. 16 9
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongYiDaCreditService.java
  7. 21 13
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongkedaiCreditService.java
  8. 29 17
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongshengCreditService.java
  9. 21 17
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongxiziCreditService.java
  10. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RunMeiXinYiRongCreditService.java
  11. 18 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RxkCreditService.java
  12. 14 3
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanDongBangBangDaiCreditService.java
  13. 18 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanXiHengShengDaiCreditService.java
  14. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanXiMingDePuHuiCreditService.java
  15. 15 9
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShangHaiHanGeCreditService.java
  16. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShangHaiJuHuiRongCreditService.java
  17. 18 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenLuoJinFuCreditService.java
  18. 20 12
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenYangHengXinCreditService.java
  19. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenYangXinYiRongCreditService.java
  20. 14 3
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShiYueCreditService.java
  21. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShuRongCreditService.java
  22. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SiChuangRuiCreditService.java
  23. 15 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SouYuJinFuCreditService.java
  24. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SuZhouJianYiRongCreditService.java
  25. 15 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SuzhouchangshuoCreditService.java
  26. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TangShanRongYangCreditService.java
  27. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TianJingJiaYiCreditService.java
  28. 15 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TianShuiShuYiRongCreditService.java
  29. 18 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TuoBaoRongCreditService.java
  30. 18 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WeiFangHuaShenCreditService.java
  31. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WeiFangYouYiCreditService.java
  32. 15 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WenZhouGaoShenCreditService.java
  33. 14 3
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WenZhouYueShangXiangCreditService.java
  34. 14 3
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WuHanDongYuanCreditService.java
  35. 15 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WuHanJingChengCreditService.java
  36. 41 9
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiaMenYiJieZhuDaiCreditService.java
  37. 22 9
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiangKeDaCreditService.java
  38. 19 11
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiangRongCreditService.java
  39. 45 31
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiaoMeiYiRongCreditService.java
  40. 15 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinChuangYinHuiCreditService.java
  41. 11 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinJiangWanHeCreditService.java
  42. 15 5
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinZheChangZhiCreditService.java
  43. 18 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XingChiCreditService.java
  44. 23 8
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinkedaiCreditService.java
  45. 19 14
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinluCreditService.java
  46. 20 15
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinyidaiCreditService.java
  47. 18 6
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XuzhoufuliCreditService.java
  48. 14 3
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XuzhoufuliV2CreditService.java
  49. 66 51
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XveYiRongCreditService.java
  50. 18 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YangZhouWanKeCreditService.java
  51. 39 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiBangDaiCreditService.java
  52. 15 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiLianRongCreditService.java
  53. 24 19
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiQiHuaCreditService.java
  54. 3 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiRongCreditService.java
  55. 10 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiRongWangCreditService.java
  56. 3 2
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiZhanShiShuZhiPingTaiCreditService.java
  57. 18 4
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YijieCreditService.java
  58. 41 18
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YinHuaCreditService.java
  59. 15 9
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YourongCreditService.java
  60. 12 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YuRongFuCreditService.java
  61. 12 8
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YukuaihuaCreditService.java
  62. 1 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YunHaiLianDongCreditService.java
  63. 1 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ZhaoZhuangXinYiRongCreditService.java
  64. 19 10
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ZhongXinQiFuCreditService.java

+ 4 - 0
egress-gateway-service-domain/pom.xml

@@ -37,6 +37,10 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongChuangJinFuCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -39,7 +49,7 @@ public class RongChuangJinFuCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongChuangJinFuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 12 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangDaChangShaCreditService.java

@@ -1,10 +1,21 @@
 package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
+import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -55,7 +66,7 @@ public class RongXiangDaChangShaCreditService implements LoanDockingApi {
      * }
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongXiangDaChangShaCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangKeBuShuCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -59,7 +69,7 @@ public class RongXiangKeBuShuCreditService implements LoanDockingApi {
      * }
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongXiangKeBuShuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 12 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangKeV2CreditService.java

@@ -1,10 +1,21 @@
 package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
+import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
@@ -55,7 +66,7 @@ public class RongXiangKeV2CreditService implements LoanDockingApi {
      * }
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongXiangKeV2CreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 16 - 9
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongYiDaCreditService.java

@@ -2,15 +2,21 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
-import com.hrsk.cloud.eg.infrastructure.utils.DateUtil;
-import com.hrsk.cloud.eg.infrastructure.utils.Md5Util;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.DateUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -57,7 +63,7 @@ public class RongYiDaCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongYiDaCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
@@ -75,9 +81,10 @@ public class RongYiDaCreditService implements LoanDockingApi {
             requestParam.setMerchantNo(config.getString("merchantNo"));
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck RongYiDaCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
-            String response = null;
+            HttpApiResponse response = null;
             try {
-                response = httpRestTemplate.restTemplate().postForObject(url, requestParam, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(requestParam),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("融易达准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 21 - 13
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongkedaiCreditService.java

@@ -2,13 +2,21 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.google.common.net.HttpHeaders;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
@@ -40,7 +48,7 @@ public class RongkedaiCreditService implements LoanDockingApi {
      *  {"url":"http://47.106.81.101:8811"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongkedaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -49,25 +57,25 @@ public class RongkedaiCreditService implements LoanDockingApi {
             Object deserialize = HessianUtils.deserialize(requestConfig);
             JSONObject config = JSONObject.parseObject(deserialize.toString());
             log.info("融客贷对接参数:{}", JSONObject.toJSONString(config));
-            HttpHeaders headers = new HttpHeaders();
-            headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+
             MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>();
             params.add("mobile", userInfo.getUserMobileMD5());
             String url = config.getString("url") + qualityCheckPath;
             log.info("credit qualityCheck RongkedaiCreditService request userId:{}, url:{}, params:{}",userInfo.getUserId(), url, JSON.toJSONString(params));
-            ResponseEntity<String> response = null;
+            HttpApiResponse response = null;
             try{
-                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response=httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("融客贷准入异常,异常信息:{}", e.getMessage(), e);
             }
             log.info("credit qualityCheck RongkedaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
-            if (response == null || response.getStatusCode()!= HttpStatus.OK) {
+            if (response == null || response.getHttpCode()!= 200) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            return JSON.parseObject(response.getBody()).getInteger("code") ==0 ? DataVo.success(0, "融客贷撞库成功", product.getPlanId())
-                    : DataVo.fail("撞库失败", product.getPlanId());
+            JSONObject jsonObject=JSONObject.parseObject(response.getData().toString());
+            return jsonObject.getInteger("code") ==0 ? DataVo.success(0, "融客贷撞库成功", product.getPlanId())
+                    : DataVo.fail(1,"撞库失败", product.getPlanId());
 
         } catch (Exception e) {
             log.error("融客贷撞库失败", e);

+ 29 - 17
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongshengCreditService.java

@@ -2,14 +2,19 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
-import com.hrsk.cloud.eg.infrastructure.utils.RedisUtil;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -44,8 +49,7 @@ public class RongshengCreditService implements LoanDockingApi {
     private final static String RedisKey = "Rongsheng:api:%s";
 
 
-    @Resource
-    private RedisUtil redisUtil;
+
 
     @Data
     private static class CheckInfo {
@@ -64,7 +68,7 @@ public class RongshengCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongshengCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -84,9 +88,10 @@ public class RongshengCreditService implements LoanDockingApi {
             checkInfo.setChannelCode(config.getString("channelSource"));
             String url = config.getString("url") + checkPath;
             log.info("credit qualityCheck RongshengCreditService request md5Phone:{}, url:{}, CheckInfo:{}", md5Phone, url, checkInfo);
-            Result response = null;
+            HttpApiResponse response = null;
             try {
-                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+                HttpApiRequest request2=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(checkInfo),"post",url));
+                response =httpClientFunc.apply(request2);
             } catch (Exception e) {
                 log.error("荣晟准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -94,18 +99,25 @@ public class RongshengCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
+            JSONObject jsonObject=JSONObject.parseObject(response.getData().toString());
+            if (0 == jsonObject.getInteger("code")
+                    && StringUtils.isNotBlank(jsonObject.getString("applyId"))
+                    && StringUtils.isNotBlank(jsonObject.getString("key"))) {
 
-            if (0 == response.getCode()
-                    && StringUtils.isNotBlank(response.getData().getString("applyId"))
-                    && StringUtils.isNotBlank(response.getData().getString("key"))) {
-                String applyId = response.getData().getString("applyId");
-                String key = response.getData().getString("key");
+                String applyId = jsonObject.getString("applyId");
+                String key = jsonObject.getString("key");
                 String userRedisKey = String.format(RedisKey, md5Phone);
-                redisUtil.set(userRedisKey, applyId + "_" + key, 300, TimeUnit.SECONDS);
+
+                RedisSetDto redisSetDto=new RedisSetDto();
+                redisSetDto.setKey(userRedisKey);
+                redisSetDto.setValue(applyId + "_" + key);
+                redisSetDto.setTime(300);
+                redisSetDto.setTimeUnit(TimeUnit.SECONDS);
+                redisSetFunction.apply(redisSetDto);
                 return DataVo.success(0, "荣晟撞库成功", product.getPlanId());
             }
 
-            return DataVo.fail(response.getMsg(), product.getPlanId());
+            return DataVo.fail(jsonObject.getString("msg"), product.getPlanId());
 
         } catch (Exception e) {
             log.error("荣晟撞库失败", e);

+ 21 - 17
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongxiziCreditService.java

@@ -1,20 +1,24 @@
 package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Hex;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
+
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
@@ -57,7 +61,7 @@ public class RongxiziCreditService implements LoanDockingApi {
      * {"token":"UWDSdzJHCq3KnrLwuBaPBBGX8Hs0oEY3","vender_name":"birong","appid":"20076","appkey":"05xduuQdn6r46giJji91aXDlzEeOT5Be"}
      */
     @Override
-        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RongxiziCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -68,23 +72,23 @@ public class RongxiziCreditService implements LoanDockingApi {
             log.info("荣西子对接参数:{}", JSONObject.toJSONString(config));
             String url = qualityCheckPath;
             log.info("credit qualityCheck RongxiziCreditService request userId:{}, url:{}",userInfo.getUserId(), url);
-            HttpHeaders headers = new HttpHeaders();
-            headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+
             Map map = new HashMap();
             map.put("token",config.getString("token"));
             map.put("tel",userInfo.getUserMobileMD5());
-            HttpEntity<String> requestBody = new HttpEntity<String>(JSONObject.toJSONString(map), headers);
-            String res = null;
+
+            HttpApiResponse response = null;
             try{
-                ResponseEntity<String> responseEntity = httpRestTemplate.restTemplate().postForEntity(url, requestBody, String.class);
-                res = responseEntity.getBody();
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(map),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
+
             }catch (Exception e){
                 log.error("荣西子准入异常,异常信息:{}", e.getMessage(), e);
             }
-            if (res == null) {
+            if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            JSONObject result = JSONObject.parseObject(res);
+            JSONObject result = JSONObject.parseObject(response.getData().toString());
             log.info("credit qualityCheck RongxiziCreditService response userId:{}, result:{}",userInfo.getUserId(), JSONObject.toJSONString(result));
             if (result.getInteger("code") == 200) {
                 if (result.getJSONObject("data").getInteger("state") == 0 ) {

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RunMeiXinYiRongCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -34,7 +44,7 @@ public class RunMeiXinYiRongCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit RunMeiXinYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 18 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RxkCreditService.java

@@ -2,13 +2,19 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -61,7 +67,7 @@ public class RxkCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction) {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction) {
         log.info("credit RxkCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
         try {
             byte[] requestConfig = configInfo.getRequestConfig();
@@ -80,9 +86,10 @@ public class RxkCreditService implements LoanDockingApi {
                 url = config.getString("domain")+CHECK_URL;
             }
             log.info("credit qualityCheck RxkCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            Result response = null;
+            HttpApiResponse response = null;
             try {
-                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("融享客准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -90,10 +97,11 @@ public class RxkCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
+            JSONObject jsonObject=JSONObject.parseObject(response.getData().toString());
             return
-                    Objects.equals(1, response.getCode())
-                            && Objects.equals(true, response.isSuccess())
-                            && Objects.equals(false, response.getData().getBoolean("phoneMd5Exist")) ?
+                    Objects.equals(1, jsonObject.getInteger("code"))
+                            && Objects.equals(true,jsonObject.getBoolean("isSuccess"))
+                            && Objects.equals(false, jsonObject.getBoolean("phoneMd5Exist")) ?
                             DataVo.success(0, "融享客撞库成功", product.getPlanId())
                             : DataVo.fail("融享客-"+product.getPlanName()+"撞库失败", product.getPlanId());
 

+ 14 - 3
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanDongBangBangDaiCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -35,7 +45,7 @@ public class ShanDongBangBangDaiCreditService implements LoanDockingApi {
     }
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShanDongBangBangDaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -49,9 +59,10 @@ public class ShanDongBangBangDaiCreditService implements LoanDockingApi {
             String checkUrl = config.getString("checkUrl");
             String url=checkUrl+"?company="+config.getString("checkCompany")+"&mobile_md5="+checkInfo.getMobile_md5();
             log.info("credit qualityCheck ShanDongBangBangDaiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().getForObject(url, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(null,"get",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("山东帮帮代准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 18 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanXiHengShengDaiCreditService.java

@@ -2,15 +2,24 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
+
 import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
@@ -57,7 +66,7 @@ public class ShanXiHengShengDaiCreditService implements LoanDockingApi {
     }
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShanXiHengShengDaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -74,12 +83,10 @@ public class ShanXiHengShengDaiCreditService implements LoanDockingApi {
             params.add("md5mobile", phoneMd5);
             params.add("brand", config.getString("brand"));
             log.info("credit qualityCheck ShanXiHengShengDaiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class).getBody();
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("山西恒昇准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -87,7 +94,8 @@ public class ShanXiHengShengDaiCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            if (response.equals("1")) {
+
+            if (response.getData().equals("1")) {
                 return DataVo.success(0, "山西恒昇撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "山西恒昇撞库失败,请联系系统管理员", product.getPlanId());

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanXiMingDePuHuiCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -49,7 +59,7 @@ public class ShanXiMingDePuHuiCreditService implements LoanDockingApi {
     }
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShanXiMingDePuHuiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           

+ 15 - 9
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShangHaiHanGeCreditService.java

@@ -1,15 +1,23 @@
 package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
 import org.springframework.stereotype.Component;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
@@ -36,7 +44,7 @@ public class ShangHaiHanGeCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
           
             byte[] requestConfig = configInfo.getRequestConfig();
@@ -48,12 +56,10 @@ public class ShangHaiHanGeCreditService implements LoanDockingApi {
             log.info("上海晗各开始撞库,请求地址:{},md5:{}", url, phoneMd5);
             MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>();
             params.add("MobilePhone", phoneMd5);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class).getBody();
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("上海晗各准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShangHaiJuHuiRongCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -31,7 +41,7 @@ public class ShangHaiJuHuiRongCreditService implements LoanDockingApi {
     }
 
     @Override
-        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShangHaiJuHuiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 

+ 18 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenLuoJinFuCreditService.java

@@ -2,14 +2,24 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.http.HttpResponse;
-import org.apache.http.util.EntityUtils;
+
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
@@ -40,7 +50,7 @@ public class ShenLuoJinFuCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
           
             byte[] requestConfig = configInfo.getRequestConfig();
@@ -58,13 +68,10 @@ public class ShenLuoJinFuCreditService implements LoanDockingApi {
             }
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck ShenLuoJinFuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            JSONObject response = null;
+            HttpApiResponse response = null;
             try{
-                Map<String, String> head = new HashMap<>();
-                head.put("Content-Type", "application/x-www-form-urlencoded");
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, requestData);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(requestData),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("盛略金服准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -72,7 +79,8 @@ public class ShenLuoJinFuCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (response.getInteger("code")==1) {
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if (result.getInteger("code")==1) {
                 return DataVo.success(0, "盛略金服撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "盛略金服撞库失败,请联系系统管理员", product.getPlanId());

+ 20 - 12
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenYangHengXinCreditService.java

@@ -3,11 +3,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.http.HttpResponse;
-import org.apache.http.util.EntityUtils;
 import org.springframework.stereotype.Service;
 
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
@@ -40,7 +49,7 @@ public class ShenYangHengXinCreditService implements LoanDockingApi {
 
 
     @Override
-        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShenYangHengXinCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -52,22 +61,21 @@ public class ShenYangHengXinCreditService implements LoanDockingApi {
             Map<String, String> requestData = new HashMap<>();
             requestData.put("mobile", phoneMd5);
             String url = config.getString("checkUrl");
-            JSONObject jsonObject = new JSONObject();
+
             log.info("credit qualityCheck ShenYangHengXinCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
-            Map<String, String> header = new HashMap<>();
-            header.put("Content-Type", "application/x-www-form-urlencoded");
-            String res = "";
+
+            HttpApiResponse response = null;
             try{
-                HttpResponse response = httpRestTemplate.restTemplate().postForObject(url, null, null, header, null, requestData);
-                res = EntityUtils.toString(response.getEntity());
-                jsonObject = JSON.parseObject(res);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(requestData),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("沈阳恒信准入异常,异常信息:{}", e.getMessage(), e);
             }
-            log.info("credit qualityCheck ShenYangHengXinCreditService response userId:{}, result:{}",userInfo.getUserId(), jsonObject);
-            if (jsonObject == null) {
+            log.info("credit qualityCheck ShenYangHengXinCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
+            JSONObject jsonObject=JSONObject.parseObject(response.getData().toString());
             if (jsonObject.getString("code").equals("0")) {
                 return DataVo.success(0, "沈阳恒信撞库成功", product.getPlanId());
             } else {

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenYangXinYiRongCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -37,7 +47,7 @@ public class ShenYangXinYiRongCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShenYangXinYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 14 - 3
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShiYueCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -51,7 +61,7 @@ public class ShiYueCreditService implements LoanDockingApi {
      *
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShiYueCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -68,9 +78,10 @@ public class ShiYueCreditService implements LoanDockingApi {
             map.put("sign",sign);
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck ShiYueCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, map);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().postForObject(url,map, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(map),"post",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("司跃准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShuRongCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -42,7 +52,7 @@ public class ShuRongCreditService implements LoanDockingApi {
     }
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ShuRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SiChuangRuiCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -51,7 +61,7 @@ public class SiChuangRuiCreditService implements LoanDockingApi {
      * }
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit SiChuangRuiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 15 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SouYuJinFuCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -40,7 +50,7 @@ public class SouYuJinFuCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit SouYuJinFuCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
@@ -52,9 +62,10 @@ public class SouYuJinFuCreditService implements LoanDockingApi {
             checkInfo.setPhone((userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5()));
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck SouYuJinFuCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            String response = null;
-            try {
-                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("授渔金服准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SuZhouJianYiRongCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -41,7 +51,7 @@ public class SuZhouJianYiRongCreditService implements LoanDockingApi {
 
     }
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit SuZhouJianYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 

+ 15 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SuzhouchangshuoCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -56,7 +66,7 @@ public class SuzhouchangshuoCreditService implements LoanDockingApi {
      * @return
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit SuzhouchangshuoCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -80,9 +90,10 @@ public class SuzhouchangshuoCreditService implements LoanDockingApi {
             checkData.setTel(phoneMd5);
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck SuzhouchangshuoCreditService request userId:{}, url:{}, checkData:{}",userInfo.getUserId(), url, checkData);
-            String response = null;
-            try{
-                response =httpRestTemplate.restTemplate().postForObject(url,checkData, String.class);
+            HttpApiResponse response = null;
+            try {
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkData),"post",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("苏州昌硕准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TangShanRongYangCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -31,7 +41,7 @@ public class TangShanRongYangCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit TangShanRongYangCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TianJingJiaYiCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -44,7 +54,7 @@ public class TianJingJiaYiCreditService implements LoanDockingApi {
      * @return
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit TianJingJiaYiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 

+ 15 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TianShuiShuYiRongCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
@@ -27,7 +37,7 @@ public class TianShuiShuYiRongCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit TianShuiShuYiRongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
@@ -40,9 +50,10 @@ public class TianShuiShuYiRongCreditService implements LoanDockingApi {
             String company = config.getString("company");
             String url = checkUrl + "?company=" + company + "&mobile_md5=" + phoneMd5;
             log.info("credit qualityCheck TianShuiShuYiRongCreditService request userId:{}, url:{}, phoneMd5:{}", userInfo.getUserId(), url, phoneMd5);
-            String response = null;
-            try {
-                response = httpRestTemplate.restTemplate().getForObject(url, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(null,"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("天水速易融准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 18 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TuoBaoRongCreditService.java

@@ -2,13 +2,19 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -49,7 +55,7 @@ public class TuoBaoRongCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit TuoBaoRongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -68,9 +74,10 @@ public class TuoBaoRongCreditService implements LoanDockingApi {
 
             String url = config.getString("url") + checkPath;
             log.info("credit qualityCheck TuoBaoRongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            JSONObject response = null;
-            try {
-                response = httpRestTemplate.restTemplate().postForObject(url, param, JSONObject.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(param),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("拓宝荣准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -78,8 +85,9 @@ public class TuoBaoRongCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            return Objects.equals("200", response.getString("code")) ? DataVo.success(0, "拓宝荣撞库成功", product.getPlanId())
-                    : DataVo.fail(response.getString("msg"), product.getPlanId());
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            return Objects.equals("200", result.getString("code")) ? DataVo.success(0, "拓宝荣撞库成功", product.getPlanId())
+                    : DataVo.fail(result.getString("msg"), product.getPlanId());
 
         } catch (Exception e) {
             log.error("拓宝荣撞库失败", e);

+ 18 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WeiFangHuaShenCreditService.java

@@ -2,14 +2,24 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.http.HttpResponse;
-import org.apache.http.util.EntityUtils;
+
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -48,7 +58,7 @@ public class WeiFangHuaShenCreditService implements LoanDockingApi {
      * @return
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit WeiFangHuaShenCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -66,13 +76,10 @@ public class WeiFangHuaShenCreditService implements LoanDockingApi {
             requestData.put("md5_phone", String.valueOf(checkInfo.getMd5_phone()));
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck WeiFangHuaShenCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            JSONObject response = null;
+            HttpApiResponse response = null;
             try{
-                Map<String, String> head = new HashMap<>();
-                head.put("Content-Type", "application/x-www-form-urlencoded");
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, requestData);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(requestData),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("潍坊华盛准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -80,7 +87,8 @@ public class WeiFangHuaShenCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (response.getInteger("code")==0) {
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if (result.getInteger("code")==0) {
                 return DataVo.success(0, "潍坊华盛撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "潍坊华盛撞库失败,请联系系统管理员", product.getPlanId());

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WeiFangYouYiCreditService.java

@@ -1,10 +1,20 @@
 package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -42,7 +52,7 @@ public class WeiFangYouYiCreditService implements LoanDockingApi {
      *
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit WeiFangYouYiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 15 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WenZhouGaoShenCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -39,7 +49,7 @@ public class WenZhouGaoShenCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit WenZhouGaoShenCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
 
@@ -56,9 +66,10 @@ public class WenZhouGaoShenCreditService implements LoanDockingApi {
             checkInfo.setSign(Md5Util.encoderByMd5(sign).toUpperCase());
             String url = config.getString("post")+config.getString("tenantCode")+"/"+config.getString("check");
             log.info("credit qualityCheck WenZhouGaoShenCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            String response = null;
-            try {
-                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("温州高升准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 14 - 3
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WenZhouYueShangXiangCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -41,7 +51,7 @@ public class WenZhouYueShangXiangCreditService  implements LoanDockingApi {
      * @return
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit WenZhouYueShangXiangCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -54,9 +64,10 @@ public class WenZhouYueShangXiangCreditService  implements LoanDockingApi {
             checkData.setTel(phoneMd5);
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck WenZhouYueShangXiangCreditService request userId:{}, url:{}, checkData:{}",userInfo.getUserId(), url, checkData);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().postForObject(url,checkData, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkData),"post",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("温州悦尚祥准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 14 - 3
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WuHanDongYuanCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
@@ -23,7 +33,7 @@ public class WuHanDongYuanCreditService implements LoanDockingApi {
         return ServerCodeEnums.WuHanDongYuan;
     }
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit WuHanDongYuanCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -34,9 +44,10 @@ public class WuHanDongYuanCreditService implements LoanDockingApi {
             String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck WuHanDongYuanCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().postForObject(url,phoneMd5, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(phoneMd5),"post",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("武汉东远准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 15 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WuHanJingChengCreditService.java

@@ -4,9 +4,19 @@ import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 
 
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -34,7 +44,7 @@ public class WuHanJingChengCreditService implements LoanDockingApi {
 
 
     @Override
-        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit WuHanJingChengCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
@@ -48,9 +58,10 @@ public class WuHanJingChengCreditService implements LoanDockingApi {
             String url = config.getString("checkUrl");
             String checkUrl = url + "/" + config.getString("company") + "/" + config.getString("source");
             log.info("credit qualityCheck WuHanJingChengCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
-            String response = null;
-            try {
-                response = httpRestTemplate.restTemplate().postForObject(checkUrl, checkInfo, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",checkUrl));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("武汉锦城准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 41 - 9
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiaMenYiJieZhuDaiCreditService.java

@@ -2,10 +2,23 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.KeyValueObject;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.ValueObjectTypeEnum;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -17,7 +30,9 @@ import javax.crypto.Cipher;
 import javax.crypto.spec.IvParameterSpec;
 import javax.crypto.spec.SecretKeySpec;
 import java.security.MessageDigest;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -51,7 +66,7 @@ public class XiaMenYiJieZhuDaiCreditService implements LoanDockingApi {
      *
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XiaMenYiJieZhuDaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -70,15 +85,32 @@ public class XiaMenYiJieZhuDaiCreditService implements LoanDockingApi {
             String sign = generateHash(appid, t, k);
 
             log.info("credit qualityCheck XiaMenYiJieZhuDaiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                Map<String, String> head = new HashMap<>();
-                head.put("Content-Type", "application/json");
-                head.put("appid",appid);
-                head.put("t", t);
-                head.put("sign", sign);
-                String httpResponse = httpRestTemplate.restTemplate().postForObject(url,  head, String.class,JSONObject.toJSONString(checkInfo));
-                log.info("credit qualityCheck XiaMenYiJieZhuDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), httpResponse);
+                List<KeyValueObject> header = new ArrayList<>();
+                KeyValueObject keyValueObject0 = new KeyValueObject();
+                keyValueObject0.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject0.setKey("Content-Type");
+                keyValueObject0.setValue("application/json");
+                KeyValueObject keyValueObject = new KeyValueObject();
+                keyValueObject.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject.setKey("appid");
+                keyValueObject.setValue(appid);
+                KeyValueObject keyValueObject2 = new KeyValueObject();
+                keyValueObject2.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject2.setKey("t");
+                keyValueObject2.setValue(t);
+                KeyValueObject keyValueObject3 = new KeyValueObject();
+                keyValueObject3.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject3.setKey("sign");
+                keyValueObject3.setValue(sign);
+                header.add(keyValueObject0);
+                header.add(keyValueObject);
+                header.add(keyValueObject2);
+                header.add(keyValueObject3);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(checkInfo),"post",url, header));
+                response =httpClientFunc.apply(request);
+                log.info("credit qualityCheck XiaMenYiJieZhuDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
             }catch (Exception e){
                 log.error("厦门易捷助代准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 22 - 9
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiangKeDaCreditService.java

@@ -2,15 +2,27 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.tomcat.util.http.fileupload.IOUtils;
+
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -25,6 +37,7 @@ import java.security.spec.PKCS8EncodedKeySpec;
 import java.security.spec.X509EncodedKeySpec;
 
 
+
 /**
  * @Descrption
  * @Author: zhangyy
@@ -56,7 +69,7 @@ public class XiangKeDaCreditService implements LoanDockingApi {
      * @param product
      * @return {"url":"http://apitest.shlyxxjs.com","key":"fluxZhudai*_key","tenantId":"1405729496904110081","trafficPlatformId":"13872425018351111"}
      */
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction) {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction) {
         try {
             // 同业买量数据适配
             if(userInfo.getUserMobile() == null && userInfo.getUserMobileMD5() != null){
@@ -75,10 +88,10 @@ public class XiangKeDaCreditService implements LoanDockingApi {
             dto.setCustomerPhone(Md5Util.encoderByMd5(param));
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck XiangKeDaCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, JSON.toJSONString(dto));
-            String response = null;
-            try {
-//                + MSDSUtils.MD5.EncoderByMd5(param)
-                response = httpRestTemplate.restTemplate().postForObject(url, dto, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(dto),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("【{}】-享客达惠准入异常,异常信息:{}", product.getPlanName(), e.getMessage(), e);
             }
@@ -86,11 +99,11 @@ public class XiangKeDaCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            JSONObject res = JSONObject.parseObject(response);
-            if (res.getInteger("code") == 0 && res.getBoolean("data")) {
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if (result.getInteger("code") == 0 && result.getBoolean("data")) {
                 return DataVo.success(0, "【" + product.getPlanName() + "】-享客达撞库成功", product.getPlanId());
             } else {
-                return DataVo.fail(res.getString("msg"), product.getPlanId());
+                return DataVo.fail(result.getString("msg"), product.getPlanId());
             }
         } catch (Exception e) {
             log.error("【{}】-享客达撞库失败", product.getPlanName(), e);

+ 19 - 11
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiangRongCreditService.java

@@ -2,13 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -55,7 +62,7 @@ public class XiangRongCreditService implements LoanDockingApi {
      * @return {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit xiangrongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
 
@@ -68,19 +75,20 @@ public class XiangRongCreditService implements LoanDockingApi {
             checkInfo.setFile_id(config.getString("fileId"));
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck xiangrongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            String response = null;
-            try {
-                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
                 log.info("fanhui");
             } catch (Exception e) {
                 log.error("宁波享融准入异常,异常信息:{}", e.getMessage(), e);
             }
             log.info("credit qualityCheck xiangrongCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
-            JSONObject jsonObject = JSON.parseObject(response);
-            if (jsonObject == null) {
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (jsonObject.get("code").equals("0")) {
+            if (result.get("code").equals("0")) {
                 return DataVo.success(0, "宁波享融撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "宁波享融撞库失败,请联系系统管理员", product.getPlanId());

+ 45 - 31
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XiaoMeiYiRongCreditService.java

@@ -2,22 +2,34 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.KeyValueObject;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.ValueObjectTypeEnum;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
+
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @Author Liu Tao
@@ -44,7 +56,7 @@ public class XiaoMeiYiRongCreditService implements LoanDockingApi {
         private String telMD5;
     }
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XiaoMeiYiRongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
 
@@ -60,39 +72,41 @@ public class XiaoMeiYiRongCreditService implements LoanDockingApi {
             requestDate.setEncryptType(1);
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck XiaoMeiYiRongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, requestDate);
-            JsonNode jsonNode = null;
+          //  JsonNode jsonNode = null;
+            HttpApiResponse response = null;
             try {
 
-                HttpHeaders headers = new HttpHeaders();
-                headers.set("Content-Type","application/json");
-                headers.set("User-Agent","Apifox/1.0.0 (https://apifox.com)");
-                HttpEntity<String> requestEntity = new HttpEntity<>(JSONObject.toJSONString(checkInfo), headers);
-                httpRestTemplate.restTemplate().postForEntity(url, checkInfo, String.class);
-
-//                okhttp3.OkHttpClient client = new OkHttpClient().newBuilder()
-//                        .build();
-//                okhttp3.MediaType mediaType = MediaType.parse("application/json");
-//                RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(requestDate));
-//                Request request = new Request.Builder()
-//                        .url(url)
-//                        .method("POST", body)
-//                        .addHeader("", )
-//                        .addHeader("Content-Type", "application/json")
-//                        .build();
-//                Response execute = client.newCall(request).execute();
-                String responseBody = requestEntity.getBody();
-                log.info("小美易融 =======================>{}",JSONObject.parseObject(responseBody));
-                ObjectMapper objectMapper = new ObjectMapper();
-                // 解析JSON字符串
-                jsonNode = objectMapper.readTree(responseBody);
+                //HttpHeaders headers = new HttpHeaders();
+                List<KeyValueObject> header = new ArrayList<>();
+                KeyValueObject keyValueObject0 = new KeyValueObject();
+                keyValueObject0.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject0.setKey("Content-Type");
+                keyValueObject0.setValue("application/json");
+                KeyValueObject keyValueObject = new KeyValueObject();
+                keyValueObject.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject.setKey("User-Agent");
+                keyValueObject.setValue("Apifox/1.0.0 (https://apifox.com)");
+                header.add(keyValueObject0);
+                header.add(keyValueObject);
+//                HttpEntity<String> requestEntity = new HttpEntity<>(JSONObject.toJSONString(checkInfo), headers);
+//                httpRestTemplate.restTemplate().postForEntity(url, checkInfo, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(checkInfo),"post",url, header));
+                response =httpClientFunc.apply(request);
+
+//                String responseBody = requestEntity.getBody();
+                log.info("小美易融 =======================>{}",response);
+//                ObjectMapper objectMapper = new ObjectMapper();
+//                // 解析JSON字符串
+//                jsonNode = objectMapper.readTree(responseBody);
             } catch (Exception e) {
                 log.error("小美易融准入异常,异常信息:{}", e.getMessage(), e);
             }
-            log.info("credit qualityCheck XiaoMeiYiRongCreditService response userId:{}, result:{}", userInfo.getUserId(), jsonNode);
-            if (jsonNode == null) {
+            log.info("credit qualityCheck XiaoMeiYiRongCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (jsonNode.get("code").intValue()==0) {
+            JSONObject jsonObject=JSONObject.parseObject(response.getData().toString());
+            if (jsonObject.getInteger("code")==0) {
                 return DataVo.success(0, "小美易融撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "小美易融撞库失败,请联系系统管理员", product.getPlanId());

+ 15 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinChuangYinHuiCreditService.java

@@ -1,10 +1,20 @@
 package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -34,11 +44,11 @@ public class XinChuangYinHuiCreditService implements LoanDockingApi {
     }
 
     @Override
-    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfoCmd) {
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction) {
         try {
             log.info("credit XinChuangYinHuiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
-            byte[] requestConfig = configInfoCmd.getRequestConfig();
+            byte[] requestConfig = configInfo.getRequestConfig();
             Object deserialize = HessianUtils.deserialize(requestConfig);
             JSONObject config = JSONObject.parseObject(deserialize.toString());
             log.info("信创对接参数:{}", JSON.toJSONString(config));
@@ -49,9 +59,10 @@ public class XinChuangYinHuiCreditService implements LoanDockingApi {
             json.put("city", userInfo.getCompanyCity());
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck XinChuangYinHuiCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
-            String response = null;
+            HttpApiResponse response = null;
             try {
-                response = httpRestTemplate.restTemplate().postForObject(url, json, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(json),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("信创准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 11 - 1
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinJiangWanHeCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -35,7 +45,7 @@ public class XinJiangWanHeCreditService implements LoanDockingApi {
     }
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XinJiangWanHeCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           

+ 15 - 5
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinZheChangZhiCreditService.java

@@ -2,15 +2,24 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
-
+import com.hrsk.cloud.eg.client.vo.DataVo;
 import javax.annotation.Resource;
 import javax.crypto.Cipher;
 import javax.crypto.SecretKey;
@@ -46,7 +55,7 @@ public class XinZheChangZhiCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XingZheChangZhiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
@@ -68,9 +77,10 @@ public class XinZheChangZhiCreditService implements LoanDockingApi {
             String appid=config.getString("appid");
             url=url+"?appid="+appid+"&sign="+sign;
             log.info("credit qualityCheck XingZheChangZhiCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
-            String response = null;
-            try {
-                response = httpRestTemplate.restTemplate().postForObject(url, requestParam, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("行者常至准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 18 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XingChiCreditService.java

@@ -2,13 +2,23 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.http.HttpResponse;
-import org.apache.http.util.EntityUtils;
+
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -38,7 +48,7 @@ public class XingChiCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XingChiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -50,13 +60,10 @@ public class XingChiCreditService implements LoanDockingApi {
             String url = config.getString("checkUrl");
             String checkurl = url+"?mobileMD5="+phoneMd5;
             log.info("credit qualityCheck XingChiCreditService request userId:{}, url:{}, checkData:{}",userInfo.getUserId(), url,checkurl);
-            JSONObject response = null;
+            HttpApiResponse response = null;
             try{
-                Map<String, String> head = new HashMap<>();
-                head.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().getForObject(url, null, null, head, null);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(null,"post",checkurl, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("星驰准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -64,7 +71,8 @@ public class XingChiCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (response.getString("code").equals("200")) {
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if (result.getString("code").equals("200")) {
                 return DataVo.success(0, "星驰撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "星驰撞库失败,请联系系统管理员", product.getPlanId());

+ 23 - 8
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinkedaiCreditService.java

@@ -2,10 +2,21 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
@@ -36,7 +47,7 @@ public class XinkedaiCreditService implements LoanDockingApi {
      *  {"url":"http://121.40.173.17:8811"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XingkedaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 
@@ -44,25 +55,29 @@ public class XinkedaiCreditService implements LoanDockingApi {
             Object deserialize = HessianUtils.deserialize(requestConfig);
             JSONObject config = JSONObject.parseObject(deserialize.toString());
             log.info("欣客贷对接参数:{}", JSON.toJSONString(config));
-            HttpHeaders headers = new HttpHeaders();
-            headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+
             MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>();
             String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
             params.add("mobile", phoneMd5);
             String url = config.getString("url") + qualityCheckPath;
             log.info("credit qualityCheck XingkedaiCreditService request userId:{}, url:{}, params:{}",userInfo.getUserId(), url, JSON.toJSONString(params));
-            ResponseEntity<String> response = null;
+
+            HttpApiResponse response = null;
             try{
-                ResponseEntity<String> requestEntity = httpRestTemplate.restTemplate().postForEntity(url, params, String.class);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class);
+                    HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                    response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("欣客贷准入异常,异常信息:{}", e.getMessage(), e);
             }
             log.info("credit qualityCheck XingkedaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
-            if (response == null || response.getStatusCode()!= HttpStatus.OK) {
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if ( result.getInteger("statusCode")!= 200) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            return JSON.parseObject(response.getBody()).getInteger("code") ==0 ? DataVo.success(0, "欣客贷撞库成功", product.getPlanId())
+            return result.getInteger("code") ==0 ? DataVo.success(0, "欣客贷撞库成功", product.getPlanId())
                     : DataVo.fail("撞库失败", product.getPlanId());
 
         } catch (Exception e) {

+ 19 - 14
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinluCreditService.java

@@ -2,17 +2,23 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
+
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -62,7 +68,7 @@ public class XinluCreditService implements LoanDockingApi {
      *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction) {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction) {
         try {
             log.info("credit XinluCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
             String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
@@ -75,12 +81,10 @@ public class XinluCreditService implements LoanDockingApi {
             checkData.setTenantId(xinluJointDTO.getString("tenantId"));
             String requestJson = JSON.toJSONString(checkData);
             log.info("credit qualityCheck XinluCreditService request userId:{}, url:{},requestParam",userInfo.getUserId(), url,requestJson);
-            ResultHt response = null;
+            HttpApiResponse response = null;
             try{
-                HttpHeaders headers = new HttpHeaders();
-                headers.set("Content-Type", "application/json");
-                HttpEntity httpEntity = new HttpEntity<>(requestJson,headers);
-                 response = httpRestTemplate.restTemplate().postForObject(url,httpEntity, ResultHt.class );
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(requestJson,"post",url, HeadsUtil.getJsonHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("鑫鹿准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -88,8 +92,9 @@ public class XinluCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            return Objects.equals(200, response.getCode()) ? DataVo.success(0, "鑫鹿撞库成功", product.getPlanId())
-                    : DataVo.fail(response.getMsg(), product.getPlanId());
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            return Objects.equals(200, result.getInteger("code")) ? DataVo.success(0, "鑫鹿撞库成功", product.getPlanId())
+                    : DataVo.fail(result.getString("msg"), product.getPlanId());
         } catch (Exception e) {
             log.error("鑫鹿撞库失败", e);
             return DataVo.fail(1, "鑫鹿撞库失败,请联系系统管理员", product.getPlanId());

+ 20 - 15
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XinyidaiCreditService.java

@@ -2,17 +2,23 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.http.HttpResponse;
-import org.apache.http.util.EntityUtils;
+
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
@@ -73,7 +79,7 @@ public class XinyidaiCreditService implements LoanDockingApi {
      *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XinyidaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -83,13 +89,11 @@ public class XinyidaiCreditService implements LoanDockingApi {
             log.info("信易贷对接参数:{}", JSON.toJSONString(xinyidaiJointDTO));
             String url = xinyidaiJointDTO.getString("url") + qualityCheckPath+"?md5=" +userInfo.getUserMobileMD5() ;
             log.info("credit qualityCheck XinyidaiCreditService request userId:{}, url:{}",userInfo.getUserId(), url);
-            ResultHt response = null;
+
+            HttpApiResponse response = null;
             try{
-                Map<String, String> head = new HashMap<>();
-                head.put("Content-Type", "application/x-www-form-urlencoded");
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, "");
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr,ResultHt.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(null,"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("信易贷准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -97,8 +101,9 @@ public class XinyidaiCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            return Objects.equals(12, response.getCode()) ? DataVo.success(0, "信易贷撞库成功", product.getPlanId())
-                    : DataVo.fail(response.getMessage(), product.getPlanId());
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            return Objects.equals(12, result.getInteger("code")) ? DataVo.success(0, "信易贷撞库成功", product.getPlanId())
+                    : DataVo.fail(result.getString("message"), product.getPlanId());
         } catch (Exception e) {
             log.error("信易贷撞库失败", e);
             return DataVo.fail(1, "信易贷撞库失败,请联系系统管理员", product.getPlanId());

+ 18 - 6
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XuzhoufuliCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -34,7 +44,7 @@ public class XuzhoufuliCreditService implements LoanDockingApi {
     private final String applyPath = "/push";
 
     @Override
-    public ServerCodeEnums  getType() {
+    public ServerCodeEnums getType() {
         return ServerCodeEnums.Xuzhoufuli;
     }
 
@@ -66,7 +76,7 @@ public class XuzhoufuliCreditService implements LoanDockingApi {
      *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XuzhoufuliCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -92,9 +102,10 @@ public class XuzhoufuliCreditService implements LoanDockingApi {
             data.setParams(params);
             String url = xuzhoufuliJointDTO.getString("url") + qualityCheckPath;
             log.info("credit qualityCheck XuzhoufuliCreditService request userId:{}, url:{}, data:{}",userInfo.getUserId(), url, data);
-            ResultHt response = null;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().postForObject(url,data, ResultHt.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(data),"post",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("徐州富力准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -102,8 +113,9 @@ public class XuzhoufuliCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            return Objects.equals("200", response.getCode()) ? DataVo.success(0, "徐州富力撞库成功", product.getPlanId())
-                    :DataVo.fail(response.getMessage(), product.getPlanId());
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            return Objects.equals("200", result.getInteger("code")) ? DataVo.success(0, "徐州富力撞库成功", product.getPlanId())
+                    :DataVo.fail(result.getString("message"), product.getPlanId());
         } catch (Exception e) {
             log.error("徐州富力撞库失败", e);
             return DataVo.fail(1, "徐州富力撞库失败,请联系系统管理员", product.getPlanId());

+ 14 - 3
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XuzhoufuliV2CreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -65,7 +75,7 @@ public class XuzhoufuliV2CreditService implements LoanDockingApi {
      * @return
      */
     @Override
-    public DataVo qualityCheck()  {
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit XuzhoufuliV2CreditService qualityCheck begin...userId:{}",userInfo.getUserId());
            
@@ -87,9 +97,10 @@ public class XuzhoufuliV2CreditService implements LoanDockingApi {
             checkData.setMerNo(config.getString("merNo"));
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck XuzhoufuliV2CreditService request userId:{}, url:{}, checkData:{}",userInfo.getUserId(), url, checkData);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().postForObject(url,checkData, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkData),"post",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("徐州富丽准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 66 - 51
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/XveYiRongCreditService.java

@@ -1,23 +1,30 @@
 package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSONObject;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
-import com.hrsk.cloud.eg.infrastructure.utils.UserUtils;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.KeyValueObject;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.ValueObjectTypeEnum;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
+
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Objects;
 
 /**
@@ -54,7 +61,7 @@ public class XveYiRongCreditService implements LoanDockingApi {
      * 撞库
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         log.info("credit XveYiRongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
         try {
 
@@ -65,59 +72,67 @@ public class XveYiRongCreditService implements LoanDockingApi {
                 return DataVo.fail(product.getPlanName(), product.getPlanId());
             }
             CheckInfo checkInfo = new CheckInfo();
-            checkInfo.setName( UserUtils.getUserName(userInfo.getRealName(), userInfo.getPoliceSex()));
+            checkInfo.setName(UserUtils.getUserName(userInfo.getRealName(), userInfo.getPoliceSex()));
             checkInfo.setPhone(userInfo.getUserMobileMD5());
 
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck XveYiRongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            JsonNode jsonNode = null;
-            String msg = null;
-            String data = null;
+//            JsonNode jsonNode = null;
+//            String msg = null;
+//            String data = null;
+            HttpApiResponse response = null;
             try {
-                HttpHeaders headers = new HttpHeaders();
-                headers.set("Content-Type","text/plain");
-                headers.set("authKey",config.getString("authKey"));
-                headers.set("sessionId",config.getString("sessionId"));
-                headers.set("sessionId",config.getString("sessionId"));
-
-                HttpEntity<String> requestEntity = new HttpEntity<>(JSONObject.toJSONString(checkInfo), headers);
-                 httpRestTemplate.restTemplate().postForEntity(url, checkInfo, String.class);
-
-
-//                OkHttpClient client = new OkHttpClient().newBuilder()
-//                        .build();
-//                MediaType mediaType = MediaType.parse("text/plain");
-//                RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(checkInfo));
-//                Request request = new Request.Builder()
-//                        .url(url)
-//                        .method("POST", body)
-//                        .addHeader("authKey", config.getString("authKey"))
-//                        .addHeader("sessionId", config.getString("sessionId"))
-//                        .addHeader("Content-Type", "text/plain")
-//                        .build();
-//                Response execute = client.newCall(request).execute();
-                String responseBody = requestEntity.getBody();
-                log.info("雪易融 =======================>{}",JSONObject.parseObject(responseBody));
-                ObjectMapper objectMapper = new ObjectMapper();
-                // 解析JSON字符串
-                 jsonNode = objectMapper.readTree(responseBody);
-
-                if(!Objects.isNull(jsonNode.get("msg"))){
-                    msg = jsonNode.get("msg").asText();
-                }
-                if(!Objects.isNull(jsonNode.get("data"))){
-                    data = jsonNode.get("data").asText();
-                }
+//                HttpHeaders headers = new HttpHeaders();
+                List<KeyValueObject> header = new ArrayList<>();
+                KeyValueObject keyValueObject0 = new KeyValueObject();
+                keyValueObject0.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject0.setKey("Content-Type");
+                keyValueObject0.setValue("text/plain");
+
+                KeyValueObject keyValueObject = new KeyValueObject();
+                keyValueObject.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject.setKey("authKey");
+                keyValueObject.setValue(config.getString("authKey"));
+
+                KeyValueObject keyValueObject2 = new KeyValueObject();
+                keyValueObject2.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject2.setKey("sessionId");
+                keyValueObject2.setValue(config.getString("sessionId"));
+
+
+                header.add(keyValueObject0);
+                header.add(keyValueObject);
+                header.add(keyValueObject2);
+
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(checkInfo),"post",url, header));
+                response =httpClientFunc.apply(request);
+
+
+//                String responseBody = requestEntity.getBody();
+//                log.info("雪易融 =======================>{}",JSONObject.parseObject(responseBody));
+//                ObjectMapper objectMapper = new ObjectMapper();
+//                // 解析JSON字符串
+//                 jsonNode = objectMapper.readTree(responseBody);
+//
+//                if(!Objects.isNull(jsonNode.get("msg"))){
+//                    msg = jsonNode.get("msg").asText();
+//                }
+//                if(!Objects.isNull(jsonNode.get("data"))){
+//                    data = jsonNode.get("data").asText();
+//                }
 
 
             } catch (Exception e) {
                 log.error("雪易融准入异常,异常信息:{}", e.getMessage(), e);
             }
-            log.info("credit qualityCheck 雪易融CreditService response userId:{}, result:{}", userInfo.getUserId(), jsonNode);
-            if (jsonNode == null) {
+            log.info("credit qualityCheck 雪易融CreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            return Objects.equals(0,  jsonNode.get("code").intValue()) ?
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            String msg=result.getString("msg");
+            String data=response.getData().toString();
+            return Objects.equals(0,  result.getInteger("code")) ?
                     DataVo.success(0, "雪易融撞库成功", product.getPlanId())
                     : DataVo.fail((msg != null) ? msg : data, product.getPlanId());
 

+ 18 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YangZhouWanKeCreditService.java

@@ -2,15 +2,24 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
+
 import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
@@ -59,7 +68,7 @@ public class YangZhouWanKeCreditService implements LoanDockingApi {
     }
      */
     @Override
-        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+        public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit YangZhouWanKeCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -76,12 +85,10 @@ public class YangZhouWanKeCreditService implements LoanDockingApi {
             params.add("md5mobile", phoneMd5);
             params.add("brand", config.getString("brand"));
             log.info("credit qualityCheck YangZhouWanKeCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class).getBody();
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("扬州万客准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -89,7 +96,8 @@ public class YangZhouWanKeCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            if (response.equals("1")) {
+            String result = response.getData().toString();
+            if (result.equals("1")) {
                 return DataVo.success(0, "扬州万客撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "扬州万客撞库失败,请联系系统管理员", product.getPlanId());

+ 39 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiBangDaiCreditService.java

@@ -2,10 +2,22 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.KeyValueObject;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.ValueObjectTypeEnum;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.HttpResponse;
@@ -13,7 +25,9 @@ import org.apache.http.util.EntityUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -35,7 +49,7 @@ public class YiBangDaiCreditService implements LoanDockingApi {
         private String mobile;// 手机号md5
     }
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit FuChengCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -48,14 +62,28 @@ public class YiBangDaiCreditService implements LoanDockingApi {
             requestData.put("mobile", phoneMd5);
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck FuChengCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
-            JSONObject response = null;
+//            JSONObject response = null;
+            HttpApiResponse response = null;
             try{
-                Map<String, String> head = new HashMap<>();
-                head.put("Content-Type", "application/x-www-form-urlencoded");
-                head.put("token", config.getString("token"));
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, requestData);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr);
+//                Map<String, String> head = new HashMap<>();
+                List<KeyValueObject> header = new ArrayList<>();
+                KeyValueObject keyValueObject0 = new KeyValueObject();
+                keyValueObject0.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject0.setKey("Content-Type");
+                keyValueObject0.setValue("application/x-www-form-urlencoded");
+
+                KeyValueObject keyValueObject = new KeyValueObject();
+                keyValueObject.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject.setKey("token");
+                keyValueObject.setValue(config.getString("token"));
+                header.add(keyValueObject0);
+                header.add(keyValueObject);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(requestData),"post",url, header));
+                response =httpClientFunc.apply(request);
+
+//                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, requestData);
+//                String responseStr = EntityUtils.toString(httpResponse.getEntity());
+//                response = JSONObject.parseObject(responseStr);
             }catch (Exception e){
                 log.error("壹帮贷准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -63,8 +91,9 @@ public class YiBangDaiCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (response.getInteger("code")==1) {
-                String data = response.getString("data");
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if (result.getInteger("code")==1) {
+                String data = result.getString("data");
                 JSONObject datas = JSONObject.parseObject(data);
                 if (datas.getInteger("status")==0){
                     return DataVo.success(0, "壹帮贷撞库成功", product.getPlanId());

+ 15 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiLianRongCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import com.hrsk.cloud.eg.infrastructure.utils.SM3Util;
 import com.hrsk.cloud.eg.infrastructure.utils.SM4Util;
 import lombok.Data;
@@ -43,7 +53,7 @@ public class YiLianRongCreditService implements LoanDockingApi {
     }
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit YiLianRongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
@@ -67,9 +77,10 @@ public class YiLianRongCreditService implements LoanDockingApi {
             signMap.put("sign",signStr);
             String url = config.getString("checkUrl");
             log.info("credit qualityCheck YiLianRongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, signMap);
-            String response = null;
-            try {
-                response =httpRestTemplate.restTemplate().postForObject(url,signMap, String.class);
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(signMap),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("易联融准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 24 - 19
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiQiHuaCreditService.java

@@ -2,21 +2,25 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
-import com.hrsk.cloud.eg.infrastructure.utils.AESUtilPkcs7;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
+
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 
@@ -72,7 +76,7 @@ public class YiQiHuaCreditService implements LoanDockingApi {
      * @return {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit YiQiHuaCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
            
@@ -84,27 +88,28 @@ public class YiQiHuaCreditService implements LoanDockingApi {
                 return DataVo.fail(1, "一起花撞库失败,请联系系统管理员", product.getPlanId());
             }
             String url = config.getCheckUrl();
-            String response = null;
+            HttpApiResponse response = null;
             try {
                 MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
                 params.put("phone", Collections.singletonList(userInfo.getUserMobileMD5()));
                 params.put("source", Collections.singletonList(config.getChannel()));
                 params.put("city", Collections.singletonList(userInfo.getCityAllName()));
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-                HttpEntity<MultiValueMap<String, String>> httpEntity = new HttpEntity<>(params, headers);
+
                 log.info("credit qualityCheck YiQiHuaCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, params);
-                response = httpRestTemplate.restTemplate().postForEntity(url, httpEntity, String.class).getBody();
+              //  response = httpRestTemplate.restTemplate().postForEntity(url, httpEntity, String.class).getBody();
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(params),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("一起花准入异常,异常信息:{}", e.getMessage(), e);
             }
             log.info("credit qualityCheck YiQiHuaCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
-            JSONObject jsonObject = JSON.parseObject(response);
+
             log.info("yiqihua check response{}", response);
-            if (jsonObject == null) {
+            if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (jsonObject.getInteger("status") == 200) {
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            if (result.getInteger("status") == 200) {
                 return DataVo.success(0, "一起花撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "一起花撞库失败,请联系系统管理员", product.getPlanId());
@@ -117,7 +122,7 @@ public class YiQiHuaCreditService implements LoanDockingApi {
 
     private YiQiHuaConfig getYiQiHuaConfig(String configData, String cityCode) {
         List<YiQiHuaConfig> config =JSON.parseArray(configData,YiQiHuaConfig.class);
-        if (CollectionUtils.isNotEmpty(config)) {
+        if (!CollectionUtils.isEmpty(config)) {
             for (YiQiHuaConfig c : config) {
                 if (c.getCity().contains(cityCode)) {
                     return c;

+ 3 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiRongCreditService.java

@@ -3,20 +3,19 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 import com.hrsk.cloud.eg.client.vo.DataVo;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
+
 import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
 import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
 import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
 import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
 import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
 import com.hrsk.cloud.eg.domain.common.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;

+ 10 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiRongWangCreditService.java

@@ -3,6 +3,7 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
@@ -10,14 +11,14 @@ import com.hrsk.cloud.eg.client.vo.DataVo;
 import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
 import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
 import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
 import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
 import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
+
 import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
@@ -83,12 +84,10 @@ public class YiRongWangCreditService implements LoanDockingApi {
             params.add("md5mobile", phoneMd5);
             params.add("brand", config.getString("brand"));
             log.info("credit qualityCheck YiRongWangCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            String response = null;
-            try {
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class).getBody();
+            HttpApiResponse response = null;
+            try{
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("忆融网准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -96,7 +95,8 @@ public class YiRongWangCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            if (response.equals("1")) {
+            String reuslt=response.getData().toString();
+            if (reuslt.equals("1")) {
                 return DataVo.success(0, "忆融网撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "忆融网撞库失败,请联系系统管理员", product.getPlanId());

+ 3 - 2
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YiZhanShiShuZhiPingTaiCreditService.java

@@ -2,6 +2,7 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSONObject;
 import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
@@ -35,7 +36,7 @@ public class YiZhanShiShuZhiPingTaiCreditService implements LoanDockingApi {
 
 
     @Override
-    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFun)  {
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit YiZhanShiShuZhiPingTaiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
 
@@ -49,7 +50,7 @@ public class YiZhanShiShuZhiPingTaiCreditService implements LoanDockingApi {
             HttpApiResponse response = null;
             try{
                 HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(phoneMd5,"post",url));
-                response = httpClientFun.apply(request);
+                response = httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("一站式数字平台准入异常,异常信息:{}", e.getMessage(), e);
             }

+ 18 - 4
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YijieCreditService.java

@@ -2,10 +2,20 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -44,7 +54,7 @@ public class YijieCreditService implements LoanDockingApi {
 
 
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit YijieCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -63,9 +73,12 @@ public class YijieCreditService implements LoanDockingApi {
 
             String url = config.getString("url") + checkPath;
             log.info("credit qualityCheck YijieCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            Result response = null;
+//            Result response = null;
+            HttpApiResponse response = null;
             try {
-                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+//                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("易借准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -73,7 +86,8 @@ public class YijieCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            return Objects.equals(0, response.getCode()) ? DataVo.success(0, "易借撞库成功", product.getPlanId())
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            return Objects.equals(0, result.getInteger("code")) ? DataVo.success(0, "易借撞库成功", product.getPlanId())
                     : DataVo.fail("撞库失败", product.getPlanId());
 
         } catch (Exception e) {

+ 41 - 18
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YinHuaCreditService.java

@@ -2,27 +2,34 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.KeyValueObject;
+import com.hrsk.cloud.eg.domain.api.channel.guide.common.ValueObjectTypeEnum;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
+
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Random;
 
 import static org.apache.commons.codec.digest.DigestUtils.sha256Hex;
@@ -57,7 +64,7 @@ public class YinHuaCreditService implements LoanDockingApi {
         private String msg;
     }
     @Override
-    public ServerCodeEnums  getType() {
+    public ServerCodeEnums getType() {
         return ServerCodeEnums.YinHua;
     }
 
@@ -70,7 +77,7 @@ public class YinHuaCreditService implements LoanDockingApi {
      * @return {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit HuizhongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           
@@ -82,14 +89,29 @@ public class YinHuaCreditService implements LoanDockingApi {
             checkInfo.setPhoneMd5(userInfo.getUserMobileMD5());
             String url = config.getString("url") + qualityCheckPath;
             log.info("credit qualityCheck YinHuaCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            String response = null;
+//            String response = null;
+            HttpApiResponse response = null;
             try {
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_JSON);
-                headers.set("channel", config.getString("channel"));
-                HttpEntity httpEntity = new HttpEntity<>(checkInfo, headers);
-                ResponseEntity<String> responseEntity = httpRestTemplate.restTemplate().postForEntity(url, httpEntity, String.class);
-                response = responseEntity.getBody();
+                List<KeyValueObject> header = new ArrayList<>();
+                KeyValueObject keyValueObject0 = new KeyValueObject();
+                keyValueObject0.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject0.setKey("Content-Type");
+                keyValueObject0.setValue("application/json");
+//                HttpHeaders headers = new HttpHeaders();
+//                headers.setContentType(MediaType.APPLICATION_JSON);
+                KeyValueObject keyValueObject = new KeyValueObject();
+                keyValueObject.setType(ValueObjectTypeEnum.BASIC.getType());
+                keyValueObject.setKey("channel");
+                keyValueObject.setValue(config.getString("channel"));
+                header.add(keyValueObject0);
+                header.add(keyValueObject);
+
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(checkInfo),"post",url, header));
+                response =httpClientFunc.apply(request);
+//                headers.set("channel", config.getString("channel"));
+//                HttpEntity httpEntity = new HttpEntity<>(checkInfo, headers);
+//                ResponseEntity<String> responseEntity = httpRestTemplate.restTemplate().postForEntity(url, httpEntity, String.class);
+//                response = responseEntity.getBody();
             } catch (Exception e) {
                 log.error("银华准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -97,7 +119,8 @@ public class YinHuaCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            JSONObject res = JSONObject.parseObject(response);
+//            JSONObject res = JSONObject.parseObject(response);
+            JSONObject res=JSONObject.parseObject(response.getData().toString());
             if (res.getInteger("code") == 200) {
                 if (res.getJSONObject("data").getInteger("status") == 0) {
                     return DataVo.success(0, "银华撞库成功", product.getPlanId());

+ 15 - 9
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YourongCreditService.java

@@ -2,17 +2,21 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 import com.hrsk.cloud.eg.client.vo.DataVo;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
+
 import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
 import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
 import com.hrsk.cloud.eg.domain.common.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.binary.Base64;
@@ -55,7 +59,7 @@ public class YourongCreditService implements LoanDockingApi {
      * @return
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit YourongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 //            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
@@ -69,9 +73,10 @@ public class YourongCreditService implements LoanDockingApi {
             checkInfo.setChannelCode(config.getString("channelCode"));
             String url = config.getString("url") + qualityCheckPath;
             log.info("credit qualityCheck YourongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            ResultYr response = null;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, ResultYr.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(checkInfo),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("有融准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -79,8 +84,9 @@ public class YourongCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            return response.getCode() == 0 ? DataVo.success(0, "有融撞库成功", product.getPlanId())
-                    : DataVo.fail(response.getMsg(), product.getPlanId());
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            return result.getInteger("code") == 0 ? DataVo.success(0, "有融撞库成功", product.getPlanId())
+                    : DataVo.fail(result.getString("msg"), product.getPlanId());
 
         } catch (Exception e) {
             log.error("有融撞库失败", e);

+ 12 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YuRongFuCreditService.java

@@ -2,6 +2,8 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
@@ -9,13 +11,14 @@ import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 import com.hrsk.cloud.eg.client.vo.DataVo;
 import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
 import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
 import com.hrsk.cloud.eg.domain.common.HessianUtils;
 import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
 import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
@@ -84,7 +87,7 @@ public class YuRongFuCreditService implements LoanDockingApi {
     }
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit YuRongFuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
 
@@ -101,12 +104,10 @@ public class YuRongFuCreditService implements LoanDockingApi {
             params.add("md5mobile", phoneMd5);
             params.add("brand", config.getString("brand"));
             log.info("credit qualityCheck YuRongFuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class).getBody();
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("宇融服准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -114,7 +115,8 @@ public class YuRongFuCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            if (response.equals("1")) {
+            String result=response.getData().toString();
+            if (result.equals("1")) {
                 return DataVo.success(0, "宇融服撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "宇融服撞库失败,请联系系统管理员", product.getPlanId());

+ 12 - 8
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YukuaihuaCreditService.java

@@ -3,19 +3,19 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 import com.hrsk.cloud.eg.client.vo.DataVo;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
+
 import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
 import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
 import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
 import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
 import com.hrsk.cloud.eg.domain.common.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -68,9 +68,12 @@ public class YukuaihuaCreditService implements LoanDockingApi {
             checkInfo.setUserPhone(userInfo.getUserMobileMD5());
             String url = config.getString("url") + checkPath;
             log.info("credit qualityCheck YukuaihuaCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
-            Result response = null;
+//            Result response = null;
+            HttpApiResponse response = null;
             try {
-                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+//                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
             } catch (Exception e) {
                 log.error("愉快花准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -78,8 +81,9 @@ public class YukuaihuaCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(), product.getPlanName());
             }
-            return Objects.equals(1, response.getCode()) ? DataVo.success(0, "愉快花撞库成功", product.getPlanId())
-                    : DataVo.fail(response.getMsg(), product.getPlanId());
+            JSONObject result=JSONObject.parseObject(response.getData().toString());
+            return Objects.equals(1, result.getInteger("code")) ? DataVo.success(0, "愉快花撞库成功", product.getPlanId())
+                    : DataVo.fail(result.getString("msg"), product.getPlanId());
 
         } catch (Exception e) {
             log.error("愉快花撞库失败", e);

+ 1 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/YunHaiLianDongCreditService.java

@@ -3,6 +3,7 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;

+ 1 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ZhaoZhuangXinYiRongCreditService.java

@@ -3,6 +3,7 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import com.google.common.base.Function;
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;

+ 19 - 10
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ZhongXinQiFuCreditService.java

@@ -2,15 +2,25 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
+
+import com.hrsk.cloud.eg.client.dto.RedisSetDto;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
 
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HeadsUtil;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
+
 import org.springframework.stereotype.Service;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
@@ -58,7 +68,7 @@ public class ZhongXinQiFuCreditService implements LoanDockingApi {
     }
      */
     @Override
-         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc,Function<String,Object> redisGetFunction,Function<RedisSetDto,Boolean> redisSetFunction)  {
+         public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc, Function<String,Object> redisGetFunction, Function<RedisSetDto,Boolean> redisSetFunction)  {
         try {
             log.info("credit ZhongXinQiFuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
           
@@ -75,12 +85,10 @@ public class ZhongXinQiFuCreditService implements LoanDockingApi {
             params.add("md5mobile", phoneMd5);
             params.add("brand", config.getString("brand"));
             log.info("credit qualityCheck ZhongXinQiFuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
-            String response = null;
+            HttpApiResponse response = null;
             try{
-                HttpHeaders headers = new HttpHeaders();
-                headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
-                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class).getBody();
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(String.valueOf(params),"post",url, HeadsUtil.getFromHeaders(null,null)));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("众鑫企服准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -88,7 +96,8 @@ public class ZhongXinQiFuCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
-            if (response.equals("1")) {
+            String result=response.getData().toString();
+            if (result.equals("1")) {
                 return DataVo.success(0, "众鑫企服撞库成功", product.getPlanId());
             } else {
                 return DataVo.fail(1, "众鑫企服撞库失败,请联系系统管理员", product.getPlanId());