GITZYY 1 週間 前
コミット
8a743df1af
100 ファイル変更12026 行追加0 行削除
  1. 41 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/LoanDockingApi.java
  2. 157 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/AnHuiHengDaoCreditService.java
  3. 173 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/BaiXinShunTaiCreditService.java
  4. 152 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/BaiYiJinFuCreditService.java
  5. 260 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/BeiJingChongHeCreditService.java
  6. 111 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/CangZhouSuYiRonogCreditService.java
  7. 178 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/CheYouRongCreditService.java
  8. 138 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ChengDuYiHeShengCreditService.java
  9. 134 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ChengHongHuiCreditService.java
  10. 152 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ChongQinDongRunCreditService.java
  11. 148 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ChongQingRuiShangXinCreditService.java
  12. 120 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ChongQingYiYueCreditService.java
  13. 103 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ChuanjinCreditService.java
  14. 110 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/DeLuoXuanAesCreditService.java
  15. 108 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/DeLuoXuanCreditService.java
  16. 116 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/DeZhouXinYiRongCreditService.java
  17. 112 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/DeZhouXinYiRongV2CreditService.java
  18. 35 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/DfrzwCreditService.java
  19. 133 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/FangxinwangiCreditService.java
  20. 121 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/FuChengCreditService.java
  21. 91 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/FuZhouBeiJiuCreditService.java
  22. 132 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/FuZhouBeiYinJinRongCreditService.java
  23. 108 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/GexinjinfuCreditService.java
  24. 102 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/GuanZhouPuHuiCreditService.java
  25. 105 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/GuangDongHaoEnCreditService.java
  26. 94 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/GuangDongHongZhanCreditService.java
  27. 131 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/GuangZhouHuaXinCreditService.java
  28. 115 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HamiguaCreditService.java
  29. 114 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HaohanwuyinCreditService.java
  30. 94 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HeFeiShenDaiCreditService.java
  31. 100 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HeZeRongXinCreditService.java
  32. 124 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HengYangJiuZhenCreditService.java
  33. 149 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HengaiCreditService.java
  34. 106 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HongShengJinFuCreditService.java
  35. 118 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HongXinPuHuiCreditService.java
  36. 117 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HuNanDiShuiYanCreditService.java
  37. 105 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HuirongCrmCreditService.java
  38. 133 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HuixinCreditService.java
  39. 164 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/HuizhongCreditService.java
  40. 151 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JianZhanCreditService.java
  41. 93 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JiechengCreditService.java
  42. 95 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JilingHuiRongCreditService.java
  43. 152 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JinDieV2CreditService.java
  44. 98 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JinDieV3CreditService.java
  45. 80 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JinDieV4CreditService.java
  46. 122 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JinZhuLiCreditService.java
  47. 96 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JindieCreditService.java
  48. 94 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/JiuXinKeCreditService.java
  49. 98 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/KuaiYiRongCreditService.java
  50. 100 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/KuaiyidaiCreditService.java
  51. 101 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/KuaiyidaiFourToOneCreditService.java
  52. 107 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/KuaiyidaiNightCreditService.java
  53. 108 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/KuaiyidaiV2CreditService.java
  54. 93 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/KunMingXiaoSongShuCreditService.java
  55. 86 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/LeXiangRongCreditService.java
  56. 131 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/LianKeYunKongCreditService.java
  57. 103 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/LiaoChengXinYiDaiCreditService.java
  58. 131 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/MoGuTouCreditService.java
  59. 107 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/NanTongXingChengCreditService.java
  60. 87 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/NiYouKeCreditService.java
  61. 102 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/NingBoTianChengCreditService.java
  62. 94 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/OpenApiAesCreditService.java
  63. 96 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/OpenApiCreditService.java
  64. 141 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/PingDingShanCreditService.java
  65. 161 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/PingXunCreditService.java
  66. 43 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/PubNoCheckCreditService.java
  67. 82 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/QingDaoAoSengCreditService.java
  68. 81 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/QingDaoAoSengV2CreditService.java
  69. 194 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/QingyuCreditService.java
  70. 153 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/QingyuV2CreditService.java
  71. 143 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/QingyuV3CreditService.java
  72. 130 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongChuangJinFuCreditService.java
  73. 139 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangDaChangShaCreditService.java
  74. 141 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangKeBuShuCreditService.java
  75. 139 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongXiangKeV2CreditService.java
  76. 129 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongYiDaCreditService.java
  77. 84 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongkedaiCreditService.java
  78. 380 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongshengCreditService.java
  79. 150 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RongxiziCreditService.java
  80. 90 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RunMeiXinYiRongCreditService.java
  81. 116 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/RxkCreditService.java
  82. 157 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanDongBangBangDaiCreditService.java
  83. 126 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanXiHengShengDaiCreditService.java
  84. 122 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShanXiMingDePuHuiCreditService.java
  85. 85 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShangHaiHanGeCreditService.java
  86. 84 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShangHaiJuHuiRongCreditService.java
  87. 97 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenLuoJinFuCreditService.java
  88. 111 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenYangHengXinCreditService.java
  89. 90 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShenYangXinYiRongCreditService.java
  90. 168 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShiYueCreditService.java
  91. 94 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/ShuRongCreditService.java
  92. 152 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SiChuangRuiCreditService.java
  93. 170 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SouYuJinFuCreditService.java
  94. 98 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SuZhouJianYiRongCreditService.java
  95. 144 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/SuzhouchangshuoCreditService.java
  96. 81 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TangShanRongYangCreditService.java
  97. 113 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TianJingJiaYiCreditService.java
  98. 76 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TianShuiShuYiRongCreditService.java
  99. 130 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/TuoBaoRongCreditService.java
  100. 103 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/WeiFangHuaShenCreditService.java

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

@@ -0,0 +1,41 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking;
+
+import com.google.common.base.Function;
+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.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+
+import javax.xml.crypto.Data;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: dockingApi 三方助贷对接
+ * @date 2024/9/10 14:31
+ */
+public interface LoanDockingApi {
+
+    /**
+     * @description:  撞库接口
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/9/10 14:33
+     */
+    DataVo qualityCheck(UserBaseInfoCmd user, PlanCmd planDto, EgLoanApiConfigInfoCmd configInfoCmd, Function<HttpApiRequest, HttpApiResponse> httpClientFunc);
+
+
+    /**
+     * @description: 对接类型
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/9/10 14:33
+     */
+    ServerCodeEnums getType();
+
+}

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

@@ -0,0 +1,157 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.time.Instant;
+import java.util.*;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 11 09 09 49
+ **/
+@Service
+@Slf4j
+public class AnHuiHengDaoCreditService implements LoanDockingApi {
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.AnHuiHengDao;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String timeStamp;//时间戳:1627538679006
+        private String orderNo;//订单号(不可重复,一般是标识加上时间戳)
+        private String sign;//签名(MD5(data&orderNo&timeStamp&token))
+        private String data;//手机号码MD5值(32位小写)
+    }
+
+    @Data
+    public static class CheckData{
+        private String clientname;
+        private String phone;
+        private String remarks;
+        private String channelId;
+    }
+    @Data
+    public static class ApplyInfoData{
+        private String loanLimit;//贷款期限
+        private String car;
+        private String house;
+        private String socialSecurity;
+        private String reservedFunds;
+        private String insurance;
+        private String creditCard;//
+        private String zhima;//
+    }
+    @Data
+    private static class ApplyInfo {
+        private String timeStamp; //时间戳:1627538679006
+        private String orderNo; //订单号(不可重复,一般是标识加上时间戳)
+        private String sign; //签名(MD5(data&orderNo&timeStamp&token))
+        private String data; //数据信息(json类型的字符串,该字段需要aes加密,{"clientname":"客户名称", "phone":"电话 必填", "remarks":"备注 客户详细信息", "channelId":1 // 来源必填,需要申请})
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo) {
+        try {
+            log.info("credit AnHuiHengDaoCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+           
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+
+            log.info("安徽恒道对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setData(phoneMd5);
+            String millisecondsSinceEpoch = String.valueOf(Instant.now().toEpochMilli());
+            checkInfo.setTimeStamp(millisecondsSinceEpoch);//当前时间搓
+            checkInfo.setOrderNo(config.getString("channel")+millisecondsSinceEpoch);//订单号
+                //实体类转为JSONObject
+            JSONObject jsons = JSONObject.parseObject(JSON.toJSONString(checkInfo));
+            jsons.remove("sign");
+            String sign = getSign(jsons,config.getString("key"));
+            checkInfo.setSign(Md5Util.encoderByMd5(sign));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck AnHuiHengDaoCreditService request userId:{}, url:{}, checkInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("安徽恒道准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck AnHuiHengDaoCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("000")) {
+                return DataVo.success(0, product.getPlanId()+"安徽恒道撞库成功");
+            } else {
+                return DataVo.fail("安徽恒道撞库失败");
+            }
+        } catch (Exception e) {
+            log.error("安徽恒道撞库失败", e);
+            return DataVo.fail("安徽恒道撞库失败");
+        }
+
+    }
+
+    private String getSign(JSONObject params, String key) {
+            String sortStr = getFormatParams(params);
+            System.out.println("sortStr = " + sortStr);
+            //第二步:将tradeKey拼接在1中排序后的字符串后面得到待签名字符串。
+            sortStr += "&"+ key;
+            System.out.println("sortStr = " + sortStr);
+            //sortStr += "key=BF1BDE5A649724056F904A9335B1C1C9";
+            //第三步:使用md5算法加密待加密字符串并转为大写即为sign
+//        String sign = DigestUtils.md5DigestAsHex(sortStr.getBytes()).toUpperCase();
+//        System.out.println("sign = " + sign);
+            return sortStr;
+        }
+    /**
+     * 字典排序
+     * 获得参数格式化字符串
+     * 参数名按字典排序,小写在后面
+     */
+    private static String getFormatParams(Map<String, Object> params) {
+        List<Map.Entry<String, Object>> infoIds = new ArrayList<Map.Entry<String, Object>>(params.entrySet());
+        Collections.sort(infoIds, new Comparator<Map.Entry<String, Object>>() {
+            public int compare(Map.Entry<String, Object> arg0, Map.Entry<String, Object> arg1) {
+                return (arg0.getKey()).compareTo(arg1.getKey());
+            }
+        });
+        String ret = "";
+        for (Map.Entry<String, Object> entry : infoIds) {
+            ret += entry.getValue();
+            ret += "&";
+        }
+        ret = ret.substring(0, ret.length() - 1);
+        return ret;
+    }
+
+}

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

@@ -0,0 +1,173 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.io.UnsupportedEncodingException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.util.Date;
+
+/**
+ * @Author zjc
+ * @Date 2024 04 17 16 08
+ **/
+@Slf4j
+@Service
+public class BaiXinShunTaiCreditService implements LoanDockingApi {
+    public static String code = "UTF-8";
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Resource
+    private EgApiService egApiService;
+
+    //撞库
+    @Data
+    private static class CheckInfo {
+        private String phoneNo;//md5 的手机号
+
+    }
+
+    @Data
+    private static class RquestParam {
+        private String data;
+        private String merchantNo;
+        private String timestamp;
+        private String reqId;
+
+    }
+
+    //进件
+    @Data
+    private static class ApplyInfo {
+        private String custName;//客户姓名
+        private String city; //城市
+        private String cityCode;//城市行政区划代码
+        private String phoneNo; //手机号
+        private Integer sex; //性别 0:男:1女
+        private String age; //年龄
+        private String loanAmount;//客户借款额度 0-3万:1 ,3-5万:2 ,5-10万:3 ,10-20万:4 ,20万以上:5
+        private String profession;//职业身份
+        private String salaryType;//工资情况
+        private String socialSecurity; //社保0无 6个月以下1 6个月以上2
+        private String providentFund; //公积金 0无 6个月以下1 6个月以上2
+        private String car; //车产 0没有 1有按揭车 2有全款车
+        private String estate; //房产    无房	0 有按揭商品房	1 有全款商品房	2
+        private String creditCardLimit; //信用卡 0没有 1.3000元以下 2.3000-5000元 3.5000-10000元 4.10000元以上
+        private String zhiMaScore;//芝麻分
+        private String lifeInsurance; //保单0无1有
+        private String monthIncome; //月收入
+        private String degree; //学历 1 高中及以下	2 大专	3 本科及以上
+        private String loanTerm;//借款周期 01:一年以内 02:1-3年 03:3年上
+        private Integer company_id;//公司编码
+        private String promotion_prefix;//渠道名
+
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit QingDaoBaiXinShunTaiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("青岛佰信顺泰对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneNo(phoneMd5);
+            RquestParam requestParam=new RquestParam();
+            requestParam.setTimestamp(DateUtil.getFormatDate(new Date(), "yyyy-MM-dd HH:mm:ss"));
+            requestParam.setData(encryptAes(JSON.toJSONString(checkInfo), config.getString("key")));
+            requestParam.setReqId(config.getString("reqId"));
+            requestParam.setMerchantNo(config.getString("merchantNo"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck QingDaoBaiXinShunTaiCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, requestParam, String.class);
+            } catch (Exception e) {
+                log.error("青岛佰信顺泰准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck QingDaoBaiXinShunTaiCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanName());
+            }
+            if (jsonObject.getString("dealStatus").equals("0000")) {
+                return  DataVo.success(0,product.getPlanId()+"青岛佰信顺泰撞库成功");
+            } else {
+                return DataVo.fail("青岛佰信顺泰撞库失败,请联系系统管理员");
+            }
+        } catch (Exception e) {
+            log.error("青岛佰信顺泰撞库失败", e);
+            return DataVo.fail("青岛佰信顺泰撞库失败,请联系系统管理员");
+        }
+    }
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.QingDaoBaiXinSHunTaiCreditService;
+    }
+
+
+    public static String encryptAes(String data, String secretKey) {
+        try {
+            byte[] encrpyted = tripleAes(Cipher.ENCRYPT_MODE, data.getBytes(code), secretKey.getBytes());
+            byte[] encoded = Base64.encodeBase64(encrpyted); // Base64 编码
+            return new String(encoded);
+        } catch (UnsupportedEncodingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static byte[] cipherAes(String algorithm, String transformation, int opmode, byte[] data, byte[] iv, byte[] secretKey) {
+        try {
+            Cipher cipher = Cipher.getInstance(transformation);
+            SecretKeySpec keyspec = new SecretKeySpec(secretKey, algorithm);
+            IvParameterSpec ivspec = new IvParameterSpec(iv);  // CBC模式,需要一个向量iv,可增加加密算法的强度
+
+            cipher.init(Cipher.ENCRYPT_MODE, keyspec, ivspec);
+            byte[] encrypted = cipher.doFinal(data);
+            return encrypted;
+        } catch (InvalidKeyException | NoSuchAlgorithmException
+                 | NoSuchPaddingException
+                 | IllegalBlockSizeException | BadPaddingException |
+                 InvalidAlgorithmParameterException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static byte[] tripleAes(int opmode, byte[] data, byte[] secretKey) {
+        return cipherAes("AES", "AES/CBC/PKCS5Padding", opmode, data, "dxjf18129979469s".getBytes(), secretKey);
+    }
+}
+
+
+
+

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

@@ -0,0 +1,152 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import com.hrsk.cloud.eg.infrastructure.utils.RedisUtil;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.util.EntityUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 25 17 42
+ **/
+@Slf4j
+@Service
+public class BaiYiJinFuCreditService implements LoanDockingApi {
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Resource
+    private EgApiService egApiService;
+
+
+    @Data
+    private static class CheckInfo {
+        private String mobile;// 手机号码(MD5加密)
+    }
+
+    @Data
+    private static class UserTokenInfo {
+        private String username;// 	用户名
+        private String password;// 	密码
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String customerName;//客户名称
+        private String mobilePhone; //手机号码
+        private Double loanamount; //贷款金额
+        private String thirdCode; //第三方唯一码,唯一码不能重复,代表客户唯一标志
+        private String thirdSource;//第三方来源,固定值、需要联系平台管理员获取
+        private String channel;//渠道来源
+        private String source;//客户所在城市
+        private String houseflag;//房产:1:无、2:有
+        private String carflag;//车产:1:无、2:有
+        private String insuranceflag;//保险:N:否、Y:是
+        private String socialflag;//社保:1:无、4:缴纳未满6个月、 5:缴纳6个月以上、2:有
+        private String accumulationfundflag;//公积金:1:无、4:缴纳未满6个月、 5:缴纳6个月以上、2:有
+        private String overdueflag;//有无逾期:1:无、2:有
+        private String starlevel;//星级:0:0星、1:1星、 2:2星、3:3星、4:4星、5:长期跟进、6:重要、7:重点关注、8:五客管理、9:养客户、10:意向客户、11:债务优化、12:成交客户
+        private String sex;//	性别:0:男、1:女、2:未知
+        private String licensenoflag;//营业执照:1:无、2:有
+        private String status;//状态:0:未受理、1:待开发、 2:邀约中、3:待维护、4:待上门、5:进件中、6:已上门、7:已签约、8:已回款、9:外地申请、10:废弃
+        private String education;//学历:1:无、2:大专、3:本科、4:硕士
+        private String remark;//客户备注
+        private String age;//年龄
+        private String profession;//职业,如:上班族 ,传具体的职业描述
+        private String incomeType; //打卡方式, 1:银行代发、2:现金发放
+        private int monthlyIncome; //月收入,工资
+    }
+
+    @Resource
+    private RedisUtil redisUtil;
+    /**
+     * 助贷对接 特殊处理,在调用撞库之前
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit BaiYiJinFuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("佰亿金服对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMobile(phoneMd5);
+            String s = JSONObject.toJSONString(checkInfo);
+            String token = String.valueOf(redisUtil.get(String.format("zudai:token:%s:%s", "baiyi", "baiyitoken")));
+            if (StringUtils.isBlank(token)){
+                String responseUrl=null;
+                String tokenUrl=config.getString("tokenUrl");
+                UserTokenInfo userInfo1=new UserTokenInfo();
+                userInfo1.setUsername(config.getString("Username"));
+                userInfo1.setPassword(config.getString("Password"));
+                try{
+                    responseUrl =httpRestTemplate.restTemplate().postForObject(tokenUrl,userInfo1, String.class);
+                }catch (Exception e){
+                    log.error("佰亿金服准入异常,异常信息:{}", e.getMessage(), e);
+                }
+                JSONObject jsonObject=JSONObject.parseObject(responseUrl);
+                if (jsonObject.getInteger("code")==200&&jsonObject.getString("token")!=null){
+                    token=jsonObject.getString("token");
+                    redisUtil.set(String.format("zudai:token:%s:%s", "baiyi", "baiyitoken"), jsonObject.getString("token"),3, TimeUnit.HOURS);
+                }else {
+                    return DataVo.fail("佰亿金服撞库失败,请联系系统管理员"+product.getPlanId());
+                }
+            }
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck BaiYiJinFuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, s);
+            JSONObject response = null;
+            try{
+                Map<String, String> head = new HashMap<>();
+                head.put("Content-Type", "application/json");
+                head.put("Authorization", "Bearer "+token);
+                log.info("token{},值:{}",token,"Bearer "+token);
+                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, s);
+                String responseStr = EntityUtils.toString(httpResponse.getEntity());
+                response = JSONObject.parseObject(responseStr);
+            }catch (Exception e){
+                log.error("佰亿金服准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck BaiYiJinFuCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.fail(product.getPlanId()+product.getPlanName());
+            }
+            if (response.getInteger("code")==200) {
+                return DataVo.success("佰亿金服撞库成功",product.getPlanId());
+            } else {
+                return DataVo.fail("佰亿金服撞库成功",product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail("佰亿金服撞库失败,请联系系统管理员",product.getPlanId());
+        }
+    }
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.BaiYiJinFu;
+    }
+
+}

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

@@ -0,0 +1,260 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 11 29 15 59
+ **/
+@Slf4j
+@Service
+public class BeiJingChongHeCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.BeiJingChongHe;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private Integer channel_code;//渠道编码
+        private String channel_secret_key;//渠道密钥
+        private String md5_phone;//md5加密后的手机号,32位小写
+    }
+
+
+    @Data
+    private static class ApplyInfo{
+        private Integer channel_code;
+
+        private String phone;
+
+        private String name;
+
+        private Integer sex;
+
+        private Integer age;
+
+        private Integer quota;
+
+        private Integer house;
+
+        private Integer car;
+
+        private Integer social_security;
+
+        private Integer pay_taxes;
+
+        private Integer credit_card;
+
+        private Integer business_license;
+
+        private Integer micro_loan;
+
+        private Integer accumulation_fund;
+
+        private Integer insurance_policy;
+
+        private Integer marriage;
+
+        private String accumulation_fund_area;
+
+        private Integer accumulation_fund_term;
+
+        private Integer accumulation_fund_count_quota;
+
+        private Integer accumulation_fund_month_quota;
+
+        private String work_unit;
+
+        private Integer purchase_method;
+
+        private Integer car_full_payment_quota;
+
+        private Integer car_present_price;
+
+        private Integer car_service_life;
+
+        private String vehicle_license_plate;
+
+        private String car_remark_info;
+
+        private String hava_issued;
+
+        private Integer issued_type;
+
+        private String issued_info;
+
+        private Integer house_situation;
+
+        private Integer total_price;
+
+        private String house_region;
+
+        private Integer house_area;
+
+        private Integer month_repayment;
+
+        private Integer house_present_price;
+
+        private String insurance_company;
+
+        private String insurance_type;
+
+        private Integer insurance_quota;
+
+        private Integer insurance_years;
+
+        private String insurance_remark;
+
+        private Integer credit_card_count;
+
+        private Integer credit_card_count_quota;
+
+        private Integer credit_card_used_quota;
+
+        private String credit_card_remark;
+
+        private Integer hava_credit_loan;
+
+        private Integer credit_loan_count_quota;
+
+        private Integer credit_loan_balance;
+
+        private Integer credit_loan_month_repayment;
+
+        private String credit_loan_remark;
+
+        private Integer housing_loan_quota;
+
+        private String id_card;
+
+        private Integer annual_income;
+
+        private Integer professional_identity;
+
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channel_code":"34","checkUrl":"http://120.46.41.14:8888/api/customer/collisionLibrary","channel_secret_key":"HrYk20230829KYR6"}
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit BeiJingChongHeCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("北京重和对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5_phone((userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5()));
+            checkInfo.setChannel_code(Integer.valueOf(config.getString("channel_code")));
+            checkInfo.setChannel_secret_key(config.getString("channel_secret_key"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck BeiJingChongHeCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("北京重和准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck BeiJingChongHeCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success("北京重和撞库成功",product.getPlanId());
+            } else {
+                return DataVo.fail("北京重和撞库成功",product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("北京重和撞库失败", e);
+            return DataVo.fail("北京重和撞库成功",product.getPlanId());
+        }
+
+    }
+
+
+    private static class ApiAesUtil {
+        public static String Encrypt(String sSrc, String sKey) throws Exception {
+            if (sKey == null) {
+                System.out.print("Key为空null");
+                return null;
+            }
+            if (sKey.length() != 16) {
+                System.out.print("Key长度不是16位");
+                return null;
+            }
+            byte[] raw = sKey.getBytes("utf-8");
+            SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+            cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+            byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+            return Base64.encodeBase64String(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+        }
+
+        public static String Decrypt(String sSrc, String sKey) throws Exception {
+            try {
+                if (sKey == null) {
+                    System.out.print("Key为空null");
+                    return null;
+                }
+                if (sKey.length() != 16) {
+                    System.out.print("Key长度不是16位");
+                    return null;
+                }
+                byte[] raw = sKey.getBytes("utf-8");
+                SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+                Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+                cipher.init(Cipher.DECRYPT_MODE, skeySpec);
+                byte[] encrypted1 = Base64.decodeBase64(sSrc);//先用base64解密
+                try {
+                    byte[] original = cipher.doFinal(encrypted1);
+                    String originalString = new String(original,"utf-8");
+                    return originalString;
+                } catch (Exception e) {
+                    System.out.println(e.toString());
+                    return null;
+                }
+            } catch (Exception ex) {
+                System.out.println(ex.toString());
+                return null;
+            }
+        }
+
+    }
+
+}

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

@@ -0,0 +1,111 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author zjc
+ * @Date 2024 07 09 16 36
+ **/
+@Slf4j
+@Component
+public class CangZhouSuYiRonogCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.CangZhouSuYiRong;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile;//md5加密后的手机号,32位小写
+    }
+
+
+    @Data
+    private static class ApplyInfo {
+        private String promotion;//订单id
+        private String name;//姓名
+        private String mobile;//手机号码
+        private Integer age;//年龄
+        private Integer sex;//性别 (1男 2女)
+        private String city;//城市
+        private Integer is_house;//是否有房
+        private Integer is_car;//是否有车
+        private Integer is_company;//是否有车
+        private Integer is_credit;//是否信用卡
+        private Integer is_insurance;//是否有商业保险
+        private Integer is_social;//是否有社保
+        private Integer is_fund;//是否有公积金
+        private Integer is_work;//是打卡工资
+        private Integer is_tax;//是否有营业税
+        private Integer webank;//是否有微粒贷
+        private String money_demand;//贷款金额 万
+        private String content;
+
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit CangZhouSuYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("沧州速易融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile(phoneMd5);
+
+            JSONObject json=new JSONObject();
+            json.put("mobile",checkInfo.getMobile());
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck CangZhouSuYiRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,json, String.class);
+            }catch (Exception e){
+                log.error("沧州速易融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck CangZhouSuYiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") ==0 ) {
+
+                return DataVo.success(0, "沧州速易融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "沧州速易融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("沧州速易融撞库失败", e);
+            return  DataVo.fail( "沧州速易融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,178 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * @Author zjc
+ * @Date 2024 07 09 16 36
+ **/
+@Slf4j
+@Component
+public class CheYouRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.JiangXiCheYouRong;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phoneMD5 ;//md5加密后的手机号,32位小写
+    }
+
+
+    @Data
+    private static class ApplyInfo {
+        private String amount;//金额
+        private String cityName;//城市
+        private String cusName  ;//姓名
+        private String phone;//手机号码
+        private String carStatus;//车
+        private String carModel;//车辆品牌
+        private String carAge;//车龄
+        private String dc;
+        private String remark;//备注
+
+
+    }
+    @Data
+    private static class RquestParam {
+        private String source;//渠道来源
+        private String file_id;//
+        private String data;//	AES加密 (AES/ECB/PKCS5Padding)
+        private String sign;
+        private String timestamp;
+
+
+    }
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit JiangXiCheYouRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("江西车优融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPhoneMD5(phoneMd5);
+
+
+            String url = config.getString("checkUrl");
+
+            log.info("credit qualityCheck JiangXiCheYouRongCreditService request userId:{}, url:{}, checkInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("江西车优融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JiangXiCheYouRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getBoolean("data")) {
+                return DataVo.success(0, "江西车优融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "江西车优融撞库失败,请联系系统管理员", product.getPlanName());
+            }
+        } catch (Exception e) {
+            log.error("江西车优融撞库失败", e);
+            return DataVo.fail(1, "江西车优融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    /**
+     * 加密
+     * @param sSrc 需要加密的字符串
+     * @param sKey 此处使用AES-128-ECB加密模式,key需要为16位。s
+     * @return
+     * @throws Exception
+     */
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+
+        // 判断Key是否为16位
+        if (sKey.length() != 16) {
+            System.out.print("Key长度不是16位");
+            return null;
+        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        //return new Base64().encodeToString(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+        return  new org.apache.commons.codec.binary.Base64().encodeToString(encrypted);
+    }
+
+    /**
+     * 解密
+     * @param sSrc 需要解密的字符串
+     * @param sKey 此处使用AES-128-ECB加密模式,key需要为16位。
+     * @return
+     * @throws Exception
+     */
+    public static String decrypt(String sSrc, String sKey) throws Exception {
+        try {
+            // 判断Key是否正确
+            if (sKey == null) {
+                System.out.print("Key为空null");
+                return null;
+            }
+            // 判断Key是否为16位
+            if (sKey.length() != 16) {
+                System.out.print("Key长度不是16位");
+                return null;
+            }
+            byte[] raw = sKey.getBytes("utf-8");
+            SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            cipher.init(Cipher.DECRYPT_MODE, skeySpec);
+            byte[] encrypted1 = new org.apache.commons.codec.binary.Base64().decode(sSrc);//先用base64解密
+            try {
+                byte[] original = cipher.doFinal(encrypted1);
+                String originalString = new String(original,"utf-8");
+                return originalString;
+            } catch (Exception e) {
+                System.out.println(e.toString());
+                return null;
+            }
+        } catch (Exception ex) {
+            System.out.println(ex.toString());
+            return null;
+        }
+    }
+
+
+}

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

@@ -0,0 +1,138 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 05 16 36
+ **/
+@Slf4j
+@Component
+public class ChengDuYiHeShengCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ChengDuYiHeSheng;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String md5;//md5加密后的手机号,32位小写
+    }
+
+
+    @Data
+    private static class ApplyInfo {
+        private String order_id;//订单id
+        private String name;//姓名
+        private Integer age;//年龄
+        private String telephone;//手机号
+        private String gender;//性别 (1男 2女)
+        private String province;//省份
+        private String city;//城市
+        private String loan_time;//贷款时间//月
+        private Integer loan_amount;//贷款金额 万
+        private String sec_code;//安全码
+        private Integer has_job;//是否有工作 1有,2没有
+        private Integer has_income;//是否有收入 1有2没有
+        private Integer has_house;//是否有房
+        private Integer has_car;//是否有车
+        private Integer has_socins;//是否有社保
+        private Integer has_fund;//是否有公积金
+        private Integer has_ins;//是否有商业保险
+        private Integer has_cc;//是否有信用卡,1有,2没有
+        private Integer has_ovd;//是否有逾期,1有,2没有
+        private Integer has_ent;//是否有企业,1有,2没有
+        private Integer has_ali_score;//是否有芝麻分,0,0-599,1.600-649,2.650-699,3.700+
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ChengDuYiHeShengCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("成都亿禾生对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMd5(phoneMd5);
+
+            JSONObject json=new JSONObject();
+            json.put("appid", String.valueOf(config.getString("appid")));
+            json.put("data", encrypt(JSON.toJSONString(checkInfo), config.getString("key")));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck ChengDuYiHeShengCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,json, String.class);
+            }catch (Exception e){
+                log.error("成都亿禾生准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ChengDuYiHeShengCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout( product.getPlanId(),product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") ==200 ) {
+                return DataVo.success(0, "成都亿禾生撞库成功", product.getPlanId());
+            } else {
+                return DataVo.success(1, "成都亿禾生撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("成都亿禾生撞库失败", e);
+            return DataVo.success(1, "成都亿禾生撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+    public static String encrypt(String sSrc, String sKey) {
+        try {
+            if (sKey == null) {
+                System.out.print("Key为空null");
+                return null;
+            }
+            if (sKey.length() != 16) {
+                System.out.print("Key长度不是16位");
+                return null;
+            }
+            byte[] raw = sKey.getBytes("utf-8");
+            SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+            cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+            byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+            return Base64.encodeBase64String(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+        } catch (Exception e) {
+             return null;
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,134 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 01 02 14 09
+ **/
+@Service
+@Slf4j
+public class ChengHongHuiCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ChengHongHui;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String tel;//手机号码md5(32位,字母小写)
+    }
+
+
+    @Data
+    private static class ApplyInfo{
+        private Integer source_id;//渠道号(我方分配)
+        private String source_name;//渠道名称(中文)
+        private String name;//客户姓名
+        private String mobile;//手机号
+        private String city;//城市(不包含市,比如“杭州市”应该是“杭州”)
+        private String zhimafen;//芝麻分
+        private String wld;//微粒贷
+        private String baitiao_amount;//白条额度
+        private String huabei_amount;//花呗额度
+        private String car;//车
+        private Integer age;//年龄(如:39)
+        private String job;//工作
+        private Integer job_type;//职业 1:自由职业 2:上班族 3:个体户 4:企业主 5:无固定职业
+        private Integer monthly_income;//月收入(单位:元)
+        private String house;//房
+        private String baodan_is;//保单
+        private String sex;//性别(“男”或“女”)
+        private Integer money;//贷款额度(如:20,即单位为万)
+        private String shebao;//社保
+        private String gongjijin;//公积金
+        private String isbankpay;//银行代发
+        private String ip;//客户实际申请IP
+        private String credit_card;//信用卡
+        private Integer time;//该条数据实际申请时间(10位数字,如:1467100609)
+        private Integer education;//学历 1:高中及以下 2:专科 3:本科 4:硕士 5:博士及以上
+        private String use_remark;//贷款用途
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+//            log.info("credit ChengHongHuiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+//            log.info("晨宏汇对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setTel((userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5()));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck ChengHongHuiCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("晨宏汇准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ChengHongHuiCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+//            log.info("credit qualityCheck ChengHongHuiCreditService response userId:{}, jsonObject:{}", userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("resStatus").equals("1")) {
+                return DataVo.success(0, "晨宏汇撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "晨宏汇撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("晨宏汇撞库失败", e);
+            return DataVo.fail(1, "晨宏汇撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    public static String encrypt(String plainText, String key, String iv) throws Exception {
+        // 将 key 转换为 SecretKey 对象
+        SecretKey secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+        // 将 IV 字符串转换为字节数组
+        byte[] ivBytes = iv.getBytes(StandardCharsets.UTF_8);
+        // 生成 IV
+        // 创建 Cipher 对象
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(ivBytes));
+        // 加密明文
+        byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8));
+        // 将加密后的字节转换为 Base64 编码
+        return Base64.getEncoder().encodeToString(encryptedBytes);
+    }
+
+}

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

@@ -0,0 +1,152 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 05 07 10 38
+ **/
+@Slf4j
+@Component
+public class ChongQinDongRunCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ChongQinDongRunCreditService;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String sourceCode;// 渠道标识
+        private String accessKey;// 渠道访问密钥
+        private String phoneMd5;// 手机号MD5
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String realName;//姓名
+        private Integer age; //年龄
+        private String phone; //手机号
+        private String sex; //性别
+        private String city;//城市
+        private Integer profession;//职业
+        private Integer payoffType;//工资发放形式
+        private String idcard;//身份证号码
+        private Integer sesameScore;//芝麻分
+        private Integer loanMoney;//借款金额(单位:万元)
+        private Integer loanExpiresMonth;//借款期限
+        private Integer loanUse; //借款用途
+        private Integer gjjScop; //公积金
+        private Integer sbScop; //社保
+        private String incomeMonth;//月收入
+        private Integer house;//名下房产
+        private Integer car;//车产情况
+        private Integer baodanScop;//保单范围
+        private Integer credit;//信用情况
+        private Integer isLoans;//微粒贷
+        private Integer manageYears;//经营年限
+        private Integer turnover;//总经营流水
+        private Integer turnoverPublic;//对公账户经营收入
+        private Integer workingYears;//当前单位工龄 int workingYears
+        private Integer registAddress;//经营注册地
+        private Integer hasBusinessLicense;//是否办理过营业执照
+        private Integer education;//学历
+        private Integer creditCard;//信用卡
+        private Integer remarks;//备注
+
+    }
+
+    @Data
+    private static class RequestData{
+        private String sourceCode;// 渠道标识
+        private String accessKey;// 渠道访问密钥
+        private String dataStr;// 加密后参数
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ChongQinDongRunCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("重庆东润对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setAccessKey(config.getString("AccessKey"));
+            checkInfo.setSourceCode(config.getString("SourceCode"));
+            checkInfo.setPhoneMd5(phoneMd5);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck ChongQinDongRunCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("重庆东润准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ChongQinDongRunCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            JSONObject data =JSONObject.parseObject(jsonObject.getString("data"));
+            if (jsonObject.getString("code").equals("1")&&data.getBoolean("phoneMd5Exist")!=null&&!data.getBoolean("phoneMd5Exist")) {
+                return DataVo.success (0, "重庆东润撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "重庆东润撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail(1, "重庆东润撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    public static String encrypt(String plainText, String key, String iv)  {
+        try {
+            // 将 key 转换为 SecretKey 对象
+            SecretKey secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+            // 将 IV 字符串转换为字节数组
+            byte[] ivBytes = iv.getBytes(StandardCharsets.UTF_8);
+            // 生成 IV
+            // 创建 Cipher 对象
+            Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+            cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(ivBytes));
+            // 加密明文
+            byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8));
+            // 将加密后的字节转换为 Base64 编码
+            return Base64.getEncoder().encodeToString(encryptedBytes);
+        } catch (Exception e) {
+            return "";
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,148 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESedeKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+import java.nio.charset.StandardCharsets;
+import java.security.Key;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 11 08 10 29
+ **/
+@Slf4j
+@Service
+public class ChongQingRuiShangXinCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ChongQingRuiShuangXin;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobileEncrypt;//手机号MD5加密32位小写字符串
+        private String appid;//数据标识,接收方提供
+    }
+    @Data
+    private static class ApplyInfo{
+        private String appid; //数据标识,接收方提供
+        private String name; //姓名
+        private String mobile; //手机号
+        private String cardNo; //身份证
+        private Integer gender; //性别; 0-女 1-男
+        private String city; //城市(格式:xx市)
+        private Integer amount; //申请金额(万)
+        private String period; //申请期限(月)
+        private Integer monthlyIncome; //月收入(元)
+        private Integer age; //年龄(18-99)
+        private Integer houseType; //房产; 0-无 1-有
+        private Integer carType; //车产; 0-无 1-有
+        private Integer socialInsurance; //社保; 0-无 1-有
+        private Integer commercialInsurance; //	商业保险; 0-无 1-有
+        private Integer accumulationFund; //公积金; 0-无 1-有
+        private Integer entrepreneur; //是否企业主; 0-否 1-是
+        private String credit; //信用情况
+        private String zhima; //芝麻分
+        private String additional; //其他信息
+    }
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+    {
+    "checkUrl": "https://rsx.icl-network.com/api/data/common/check",
+    "applyUrl": "https://rsx.icl-network.com/api/data/common/encrypt_push",
+    "appid": "SQVEySSsMKOTialcatYIDtWmvFzwkcJM",
+    "key": "xj9pgn0n972cd2wy0u5s88gz",
+    "iv": "18521959"
+    }
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ChongQingRuiShangXinCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("重庆睿双鑫对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobileEncrypt(phoneMd5);
+            checkInfo.setAppid(config.getString("appid"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck ChongQingRuiShangXinCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("重庆睿双鑫准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ChongQingRuiShangXinCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getApiId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getApiId(),product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("200")) {
+                return DataVo.success(0, "重庆睿双鑫撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "重庆睿双鑫撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("重庆睿双鑫撞库失败", e);
+            return DataVo.fail(1, "重庆睿双鑫撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+//3DES算法key,iv
+    public static String encrypt(String data,String key,String iv) throws Exception {
+        byte[] encrpyted = tripleDES(Cipher.ENCRYPT_MODE,data.getBytes(StandardCharsets.UTF_8), key.getBytes(),iv.getBytes());
+        return new String(Base64.encodeBase64(encrpyted));
+    }
+
+    private static byte[] tripleDES(int opmode, byte[] data, byte[] secretKey,byte[] iv) throws
+            Exception {
+        return cipher("DESede", "DESede/CBC/PKCS5Padding", opmode, data, iv, secretKey);
+    }
+
+    private static byte[] cipher(String algorithm, String transformation, int opmode, byte[] data, byte[] iv, byte[] secretKey) throws Exception {
+        Key key = SecretKeyFactory.getInstance(algorithm).generateSecret(new
+                DESedeKeySpec(secretKey));
+        IvParameterSpec spec = new IvParameterSpec(iv);
+        Cipher cipher = Cipher.getInstance(transformation);
+        cipher.init(opmode, key, spec);
+        return cipher.doFinal(data);
+    }
+}

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

@@ -0,0 +1,120 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author zjc
+ * @Date 2024 07 09 16 36
+ **/
+@Slf4j
+@Service
+public class ChongQingYiYueCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ChongQingYiYue;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile;//md5加密后的手机号,32位小写
+    }
+
+
+    @Data
+    private static class ApplyInfo {
+        private Integer file_id;//渠道id
+        private String mobile;//手机号码
+        private String name;//姓名
+        private Integer age;//年龄
+        private Integer sex;//性别 (1男 2女)
+        private String city;//城市
+        private Integer money_demand;//贷款金额 元
+        private Integer is_house;//是否有房
+        private Integer is_car;//是否有车
+        private Integer is_company;//是否有公司营业执照 1:是,2:否
+        private Integer is_credit;//是否信用卡
+        private Integer is_insurance;//是否有商业保险
+        private Integer is_social;//是否有社保
+        private Integer is_fund;//是否有公积金
+        private Integer is_work;//是打卡工资
+        private Integer is_tax;//是否有营业税
+        private Integer webank;//微粒贷额度(单位:元)
+        private String remarks;//备注
+
+
+    }
+    @Data
+    private static class RquestParam {
+        private String source;//渠道来源
+        private String file_id;//
+        private String data;//	AES加密 (AES/ECB/PKCS5Padding)
+        private String sign;
+        private String timestamp;
+
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+            log.info("credit ChongQingYiYueCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("重庆易悦对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile(phoneMd5);
+
+
+            String url = config.getString("checkUrl");
+
+            log.info("credit qualityCheck ChongQingYiYueCreditService request userId:{}, url:{}, checkInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("重庆易悦准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ChongQingYiYueCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") ==0 ) {
+                return DataVo.success(0, "重庆易悦撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "重庆易悦撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("重庆易悦撞库失败", e);
+            return DataVo.fail(1, "重庆易悦撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,103 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/2/6
+ * @Version V1.0
+ **/
+@Service
+@Slf4j
+public class ChuanjinCreditService implements LoanDockingApi {
+
+    private final static String qualityCheckPath = "customers/check/MD5Encrypt";
+    private final static String applyPath = "customers";
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ChuanJin;
+    }
+    @Data
+    private static class CheckInfo {
+        private String phone_encrypt;
+
+        private String company_id;
+    }
+
+    @Data
+    private static class ResResult {
+        private Integer data;
+
+        private Integer code;
+
+        private String msg;
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String name;
+        private String phone;
+        private String gender;
+        private Integer age;
+        private Integer limit;
+        //        private String income_year;
+        private String provider_code;
+        private String education;
+        private String career;
+        private String company_id;
+    }
+
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ChuanjinCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+           
+            Object requestConfig = HessianUtils.deserialize(configInfo.getRequestConfig()) ;
+            JSONObject config = JSONObject.parseObject(requestConfig.toString());
+            log.info("川金对接参数:{}", JSON.toJSONString(config));
+            String url = config.getString("url") + qualityCheckPath;
+            ResResult response = null;
+            try {
+
+                url = url + "?phone_encrypt=" + userInfo.getUserMobileMD5() + "&company_id=" + config.getString("channelSource");
+                log.info("credit qualityCheck ChuanjinCreditService request userId:{}, url:{}", userInfo.getUserId(), url);
+                response = httpRestTemplate.restTemplate().postForObject(url, null, ResResult.class);
+            } catch (Exception e) {
+                log.error("川金准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ChuanjinCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            return Objects.equals(0, response.getData()) ? DataVo.success(0, "川金撞库成功", product.getPlanId())
+                    : DataVo.fail(1, response.getMsg(), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("川金撞库失败", e);
+            return DataVo.fail(1, "川金撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,110 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 24 10 58
+ **/
+@Slf4j
+@Service
+public class DeLuoXuanAesCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.DeLuoXuanAES;
+    }
+    @Data
+    private static class CheckInfo{
+        private String md5Phone;// 手机号md5
+        private Integer company_id;//公司编号
+    }
+    @Data
+    private static class ApplyInfo{
+        private String username;//姓名:xxx
+        private String phone; //手机号
+        private String city; //城市
+        private Integer loan; //贷款金额
+        private Integer price;//放款金额
+        private String content; //备注
+        private Integer gjj; //1-有公积金;2-无公积金
+        private String company; //工作单位
+        private Integer ispayroll;//1-有代发:2-无代发
+        private Integer house; //房产:1-本地房;2-无;3-外地房
+        private Integer car; //1-有车;2-无车
+        private Integer insurance; //保单:1-有 2-无
+        private Integer xyk;//信用卡 0-无 1-有
+        private Integer credit_loan; //信用贷款 1-无 2-有
+        private Integer shebao; //社保 1-有 -2无
+        private Integer pay_tax; //企业纳税 1-有 2-无
+        private Integer particles;//微粒贷 1-有 2-无
+        private Integer business_license;//营业执照 0-无 1-有
+        private Integer write_id;//无
+        private Integer sex;//性别 0-男 1-女
+        private Integer age;//年龄
+        private Integer job;//0自由职业1企业主2白领3公务员
+        private Integer degree;//1-高中以下 2-专科 3-本科及以上
+        private String source;//渠道名(平台提供)
+        private Integer platform_id;//不需要回传值为 0,回传必传(平台提供)
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit DeLuoXuanAesCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("德诺轩AES对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5Phone(phoneMd5);
+            checkInfo.setCompany_id(config.getInteger("company_id"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck DeLuoXuanAesCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("德诺轩AES准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck DeLuoXuanAesCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code")==0) {
+                return DataVo.success(0, "德诺轩AES撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "德诺轩AES撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("德诺轩AES撞库失败", e);
+            return DataVo.fail(1, "德诺轩AES撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,108 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 18 13 50
+ **/
+@Slf4j
+@Service
+public class DeLuoXuanCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.DeLuoXuan;
+    }
+    @Data
+    private static class CheckInfo{
+        private String md5Phone;// 手机号md5
+    }
+    @Data
+    private static class ApplyInfo{
+        private String username;//姓名:xxx
+        private String phone; //手机号
+        private String city; //城市
+        private Integer loan; //贷款金额
+        private Integer price;//放款金额
+        private String content; //备注
+        private Integer gjj; //1-有公积金;2-无公积金
+        private String company; //工作单位
+        private Integer ispayroll;//1-有代发:2-无代发
+        private Integer house; //房产:1-本地房;2-无;3-外地房
+        private Integer car; //1-有车;2-无车
+        private Integer insurance; //保单:1-有 2-无
+        private Integer xyk;//信用卡 0-无 1-有
+        private Integer credit_loan; //信用贷款 1-无 2-有
+        private Integer shebao; //社保 1-有 -2无
+        private Integer pay_tax; //企业纳税 1-有 2-无
+        private Integer particles;//微粒贷 1-有 2-无
+        private Integer business_license;//营业执照 0-无 1-有
+        private Integer write_id;//无
+        private String promotion_prefix;//来源
+        private Integer sex;//性别 0-男 1-女
+        private Integer age;//年龄
+        private Integer job;//0自由职业1企业主2白领3公务员
+        private Integer degree;//1-高中以下 2-专科 3-本科及以上
+
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit DeLuoXuanCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("德诺轩对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5Phone(phoneMd5);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck DeLuoXuanCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("德诺轩准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck DeLuoXuanCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code")==100) {
+                return DataVo.success(0, "德诺轩撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "德诺轩撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("德诺轩撞库失败", e);
+            return DataVo.fail(1, "德诺轩撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,116 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 10 09 16 18
+ *  德州鑫易融API
+ **/
+@Slf4j
+@Service
+public class DeZhouXinYiRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.DeZhouXinYiRong;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile;//md5 的手机号
+        private String wxapp_id;//公司id
+    }
+
+    @Data
+    private static class ApplyInfo{
+        private Integer wxapp_id; //公司ID 是
+
+        private Integer channel_id; //渠道ID,否
+
+        private String name; //客户姓名 是
+
+        private String mobile;//手机号码 是
+
+        private Integer loans_price; //贷款金额,否
+
+        private Integer age;//年龄
+
+        private Integer sex; //性别(1:为男,2为女)
+
+        private Integer property;//名下房产 1:本地房 2:外地房 3:无房
+
+        private Integer vehicle;//	名下车 1:有 2:无
+
+        private Integer guarantee;//保单 1:有 2:无
+
+        private Integer drop;//代发 1:有 2:无
+
+        private Integer credit_card;//信用卡 1:有 2:无
+
+        private Integer social;//社保 1:有 2:无
+
+        private Integer fund;//公积金 1:有 2:无
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+            log.info("credit DeZhouXinYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("德州鑫易融对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile(phoneMd5);
+            checkInfo.setWxapp_id(config.getString("wxapp_id"));
+            String url=config.getString("http")+config.getString("index")+config.getString("parameter1")+config.getString("parameter2")+config.getString("parameter3")+config.getString("checkParmeter");
+            log.info("credit qualityCheck DeZhouXinYiRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("德州鑫易融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck DeZhouXinYiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "德州鑫易融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "德州鑫易融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("德州鑫易融撞库失败", e);
+            return DataVo.fail(1, "德州鑫易融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,112 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 10 16 10 44
+ * 德州鑫易融V2API
+ **/
+@Slf4j
+@Service
+public class DeZhouXinYiRongV2CreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.DeZhouXinYiRongV2;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile_md5;//md5 的手机号
+    }
+
+    @Data
+    private static class ApplyInfo{
+        private String name; //姓名
+
+        private String mobile; //11位手机号
+
+        private Integer sex; //性别 (1男 2女)
+
+        private Integer loan_limit;//额度 (比如: 100000,单位:元)
+
+        private Integer room; //是否有房产(1:有  0:无)
+
+        private Integer car;//是否有车产( 1:有  0:无)
+
+        private Integer accumulation; //是否有公积金 ( 1:有  0:无)
+
+        private Integer social;//是否有社保 ( 1:有  0:无 )
+
+        private Integer policy;//是否有保单 (  1:有  0:无 )
+
+        private Integer business;//是否有营业执照 ( 1:有  0:无 )
+
+        private Integer issued;//是否有打卡工资 ( 1:有  0:无 )
+
+        private Integer enterprise;//是否有企业纳税 (  1:有  0:无 )
+
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit DeZhouXinYiRongV2CreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("德州鑫易融V2对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile_md5(phoneMd5);
+            String url=config.getString("checkUrl")+"?company="+config.getString("company")+"&mobile_md5="+checkInfo.getMobile_md5();
+            log.info("credit qualityCheck DeZhouXinYiRongV2CreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("德州鑫易融V2准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck DeZhouXinYiRongV2CreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "德州鑫易融V2撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "德州鑫易融V2撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("德州鑫易融V2撞库失败", e);
+            return DataVo.fail(1, "德州鑫易融V2撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

ファイルの差分が大きいため隠しています
+ 35 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/DfrzwCreditService.java


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

@@ -0,0 +1,133 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 放心网API接单
+ */
+@Service
+@Slf4j
+public class FangxinwangiCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    private final String qualityCheckPath = "/api/VenderExists/Post";
+
+    private final String applyPath = "/api/Venders/Save";
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Fangxinwang;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone;
+    }
+    @Data
+    private static class ResultHt{
+        private Integer code;
+        private String msg;
+    }
+    @Data
+    private static class ApplyInfo{
+
+        String channeld;
+        String name;
+        String phoneNumber;
+        Integer sex;
+        int age;
+        String city;
+        int loanAmount;
+        int house;
+        int car;
+        int houseFund;
+        int socialInsurance;
+        int lifeInsurance;
+        String vender = "惠融易客";
+    }
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit FangxinwangCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject fangxinwangJointDTO = JSON.parseObject(configJson);
+            log.info("放心网对接参数:{}", JSON.toJSONString(fangxinwangJointDTO));
+            String url = fangxinwangJointDTO.getString("url") + qualityCheckPath;
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhone(userInfo.getUserMobile() != null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5());
+            String requestBody = JSON.toJSONString(checkInfo);
+            log.info("credit qualityCheck FangxinwangCreditService request userId:{},requestBody:{}",userInfo.getUserId(), url,requestBody);
+            ResultHt response = null;
+            try{
+                Map<String, String> head = new HashMap<>();
+                head.put("Content-Type", "application/json");
+                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, requestBody);
+                String responseStr = EntityUtils.toString(httpResponse.getEntity());
+                response = JSONObject.parseObject(responseStr,ResultHt.class);
+            }catch (Exception e){
+                log.error("放心网准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck FangxinwangCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals(0, response.getCode()) ? DataVo.success(0, "放心网撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("放心网撞库失败", e);
+            return DataVo.fail(1, "放心网撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    private void wrapSex(ApplyInfo applyInfoApi, String policeSex) {
+        int sex = 0;
+        switch (policeSex){
+            case "男":
+                sex = 1;
+                break;
+            case "女":
+                sex = 2;
+                break;
+            default:
+                sex = 0;
+        }
+        applyInfoApi.setSex(sex);
+    }
+
+
+}

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

@@ -0,0 +1,121 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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 javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 04 23 14 36
+ **/
+@Slf4j
+@Service
+public class FuChengCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.FuCheng;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phoneMd5;// 手机号md5
+    }
+    @Data
+    private static class ApplyInfo{
+        private String phone;//手机号(明文)
+        private String name; //客户姓名
+        private String city; //城市编码(例:310101)
+        private Integer amount; //贷款金额,单位万元
+        private Integer car;//是否有车  0 没有  1有
+        private Integer house;//是否有房  0没有  1有
+        private Integer socialSecurity; //是否有社保
+        private Integer accumulationFund; //是否有公积金
+        private Integer businessLicense; //是否有营业执照
+    }
+
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit FuChengCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("福程对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(phoneMd5);
+            JSONObject json = new JSONObject(){{
+                put("data",encrypt(JSON.toJSONString(checkInfo),config.getString("key")));
+            }};
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck FuChengCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            JSONObject response = null;
+            try{
+                Map<String, String> head = new HashMap<>();
+                head.put("Content-Type", "application/json");
+                head.put("channelSign", config.getString("channelSign"));
+                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, json.toJSONString());
+                String responseStr = EntityUtils.toString(httpResponse.getEntity());
+                response = JSONObject.parseObject(responseStr);
+            }catch (Exception e){
+                log.error("福程准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck FuChengCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (response.getString("code").equals("200")) {
+                return DataVo.success(0, "福程撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "福程撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail(1, "福程撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+        if (sKey == null) {
+            System.out.print("Key为空null");
+            return null;
+        }
+        if (sKey.length() != 16) {
+            System.out.print("Key长度不是16位");
+            return null;
+        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        return Base64.encodeBase64String(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+    }
+}

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

@@ -0,0 +1,91 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 25 14 48
+ **/
+@Slf4j
+@Service
+public class FuZhouBeiJiuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.FuZhouBeiJiu;
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String name; //(必填)客户姓名
+        private String phone; //客户电话
+        private String quota; //额度
+        private String city; //0(0:福州,1:泉州)
+        private String forCondition; //跟进条件 车房公积金等数据
+        private String source; //来源.配置为2
+    }
+
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+            log.info("credit FuZhouBeiJiuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("福州北久对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = config.getString("checkUrl");
+            JSONArray jsonArray = new JSONArray();
+            jsonArray.add(phoneMd5);
+            JSONObject json = new JSONObject(){{
+                put("data", jsonArray);
+            }};
+            log.info("credit qualityCheck FuZhouBeiJiuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, json);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, json, String.class);
+            } catch (Exception e) {
+                log.error("福州北久准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck FuZhouBeiJiuCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("result").equals("success")) {
+                return DataVo.success(0, "福州北久撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "福州北久撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("福州北久撞库失败", e);
+            return DataVo.fail(1, "福州北久撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,132 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 11 06 11 58
+ **/
+@Slf4j
+@Service
+public class FuZhouBeiYinJinRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.FuZhouBeiYinJinRong;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone;//md5 的手机号
+        private String channelCode;//渠道号
+    }
+
+    @Data
+    private static class ApplyInfo{
+        private String channelCode;//渠道编号
+        private String phone;//手机号(RSA加密后)
+        private String idCardNo;//否,身份证号码(RSA加密后)
+        private String name;//姓名(RSA加密后)
+        private Integer loanAmount;//贷款额度/单位:万元
+        private String loanLimit;//借款期限 1.1个月 2.3个月 3.6个月 4.9个月 5.12个月 6.24个月 7.36个月 8.36个月以上
+        private String loanUse;//借款用途 1.购车贷款 2.购房贷款 3.装修贷款 4.教育贷款 5.消费贷款 6.过桥贷款 7.结婚贷款 8.旅游贷款 9.医疗贷款 10.其他贷款
+        private String sex;//性别 1:男 2:女 3:未知
+        private Integer age;//年龄
+        private String cityOfWork;//工作城市,结尾不要带‘市’
+        private Integer cityOfWorkCode;//工作城市代码,重庆:500100
+        private Integer revenue;//月收入/元
+        private String profession;//职业 0.无固定职业 1.工薪族 2.生意人
+        private String reservedFunds;//公积金 0.无 1.有
+        private String socialSecurity;//社保 0.无 1.有
+        private String creditCard;//信用卡 0.无 1.有
+        private String zhima;//芝麻分 0.无 1.550分以下 2.550-600分 3.600-650分 4.650-700分 5.700分及以上
+        private String car;//车产 0.无 1.有
+        private String house;//房产 0.无 1.本地房 2.外地房
+        private String insurance;//寿险保单 0.无 1.有
+        private String education;//学历 0.高中及以下 1.大专 2.本科 3.本科以上
+        private String salary;//工资代发 0.无 1.有
+        private String weili;//微粒贷 0.无 1.有
+        private String businessLicense;//营业执照 0.无 1.有
+        private String enterpriseTaxes;//企业纳税 0.无企税 1.有企税
+        private String marital;//婚姻状况 0.未婚/单身 1.离异 2.已婚
+
+
+
+    }
+
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     * {
+     * 	"checkUrl": "http://110.40.178.43:8888/channel/openapi/checkuser",
+     * 	"applyUrl": "http://110.40.178.43:8888/channel/openapi/pushuser",
+     * 	"channelCode": "huirongyikefuzhou",
+     * 	"sourcecode": "21070",
+     * 	"publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsLuutChHG1O_PG6Xo7IE6EMr9S5DdIc4PX2T0OoWqf7-jLMvdgq0ueEBPXC-JmyE-vHFkejVwZBwte7eoVaW6KeW0v1FYuN_hDA7bra__zWpLKnlyvYs8TsqkwbCq5EhL7pnhi08ypoEEXQVsyjjBy7cttDMWz7b4bjkEPSdWulmTKeOadLJKdGA95MpC1kbA_TlKJf4bwaBluWSFdb7jyms-KtzcCygQLVD5z1NcPIQVe44HXGUYqelThZ0MwokcnLS2ow7RpkE3_-ut0Lrwk9zT2gJ3_gPEL6IE1XXXvsDZwsKdv252AfBiZwUqVc26XsMd7pd-jowK1QiLnOmSQIDAQAB"
+     * }
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit FuZhouBeiYinJinRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("福州北银金融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPhone(phoneMd5);
+            checkInfo.setChannelCode(config.getString("channelCode"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck FuZhouBeiYinJinRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("福州北银金融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck FuZhouBeiYinJinRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") ==0 ) {
+                return DataVo.success(0, "福州北银金融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "福州北银金融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("福州北银金融撞库失败", e);
+            return DataVo.fail(1, "福州北银金融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+}

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

@@ -0,0 +1,108 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 格鑫金服API接单
+ */
+@Service
+@Slf4j
+public class GexinjinfuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    private final String qualityCheckPath = "/api/rsatg/checkmobile";
+
+    private final String applyPath = "/api/rsatg/add";
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Gexinjinfu;
+    }
+
+    @Data
+    public static class CheckData{
+
+        private String channel_code;
+        private String mobile_md5;
+        private String channel_secret_key;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String client_id;
+
+        private String client_secret;
+
+        private CheckData data;
+
+
+    }
+    @Data
+    private static class ResultHt{
+        private Integer status;
+        private String msg;
+    }
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit GexinjinfuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+           
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject gexinjinfuJointDTO = JSON.parseObject(configJson);
+            log.info("格鑫金服对接参数:{}", JSON.toJSONString(gexinjinfuJointDTO));
+            String md5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = gexinjinfuJointDTO.getString("url") + qualityCheckPath  + "?mobnum_md5=" +  md5;
+            log.info("credit qualityCheck GexinjinfuCreditService request userId:{}, url:{}, checkData:{}",userInfo.getUserId(), url);
+            ResultHt response = null;
+            try{
+                Map<String, String> head = new HashMap<>();
+                head.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+                 response = httpRestTemplate.restTemplate().getForObject(url, ResultHt.class,head);
+            }catch (Exception e){
+                log.error("格鑫金服准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck GexinjinfuCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals(200, response.getStatus()) ? DataVo.success(0, "格鑫金服撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("格鑫金服撞库失败", e);
+            return DataVo.fail(1, "格鑫金服撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,102 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 12 14 15 55
+ **/
+@Slf4j
+@Service
+public class GuanZhouPuHuiCreditService  implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.GuanZhouPuHui;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile;//Md5(mobile)
+    }
+
+    @Data
+    private static class ApplyInfo{
+        private Integer file_id;
+        private String name; //姓名
+        private String mobile; //手机号码
+        private Integer age; //年龄
+        private Integer sex;//性别(1:为男,2:为女,无传0)
+        private String city; //城市(如武汉市)
+        private Integer is_house; //是否有房(是传1,否传0)
+        private Integer is_car; //是否有车(是传1,否传0)
+        private Integer is_company; //是否有公司营业执照(是传1,否传0)
+        private Integer is_credit; //是否有信用卡 (是传1,否传0)
+        private Integer is_insurance; //是否有保单(是传1,否传0)
+        private Integer is_social; //是否有社保(是传1,否传0)
+        private Integer is_fund; //是否有公积金(是传1,否传0)
+        private Integer is_work; //是否有打卡工资(是传1,否传0)
+        private Integer is_tax; //是否有营业税(是传1,否传0)
+        private String webank; //微粒贷额度(单位:元)
+        private String money_demand; //申请额度(单位:元)
+        private String remarks; //备注
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit GuanZhouPuHuiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("广州普惠对接参数:{}", JSONObject.toJSONString(config));
+            String Phone_md5=(userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5());
+            CheckInfo checkInfo=new CheckInfo();
+            checkInfo.setMobile(Phone_md5);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck GuanZhouPuHuiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("广州普惠准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck GuanZhouPuHuiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            log.info("credit qualityCheck GuanZhouPuHuiCreditService response md5Phone:{}, jsonObject:{}",userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code")==0) {
+                return DataVo.success(0, "广州普惠撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "广州普惠撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("广州普惠撞库失败", e);
+            return DataVo.fail(1, "广州普惠撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,105 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 09 22 17 08
+ *广东昊恩API
+ **/
+@Slf4j
+@Service
+public class GuangDongHaoEnCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.GuangDongHaoEn;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String appid;//数据标识
+        private String mobileEncrypt;//手机号MD5加密32位小写字符串
+    }
+
+    @Data
+    private static class ApplyInfo{
+        private String appid; //数据标识
+        private String name; //姓名
+        private String mobile;//手机号
+        private String cardNo;//身份证
+        private Integer gender;//性别; 0-女 1-男
+        private String city;//城市(格式:xx市)
+        private Integer amount;//申请金额(万)
+        private String period;//申请期限(月)
+        private Integer monthlyIncome;//月收入(元)
+        private Integer age;//年龄(18-99)
+        private Integer houseType;//房产; 0-无 1-有
+        private Integer carType;//车产; 0-无 1-有
+        private Integer socialInsurance;//社保; 0-无 1-有
+        private Integer commercialInsurance;//商业保险; 0-无 1-有
+        private Integer accumulationFund;//公积金; 0-无 1-有
+        private Integer entrepreneur;//是否企业主; 0-否 1-是
+        private Integer credit;//信用情况
+        private Integer zhima;//芝麻分
+        private Integer additional;//其他信息
+    }
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit GuangDongHaoEnCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("广东昊恩对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobileEncrypt(phoneMd5);
+            checkInfo.setAppid(config.getString("appid"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck GuangDongHaoEnCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("广东昊恩准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck GuangDongHaoEnCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 200) {
+                return DataVo.success(0, "广东昊恩撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "广东昊恩撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("广东昊恩撞库失败", e);
+            return DataVo.fail(1, "广东昊恩撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,94 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author zjc
+ * @Date 2024 08 14 16 36
+ **/
+@Slf4j
+@Service
+    public class GuangDongHongZhanCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.GuangDongHongZhan;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile;//md5加密后的手机号,32位小写
+    }
+
+
+    @Data
+    private static class ApplyInfo {
+
+        private String loanName;//姓名
+        private String phone;//手机号码
+        private String loanMoney;//贷款金额 元
+        private String area;//城市
+        private String situation;//备注
+    }
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit GuangDongHongZhanCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("广东鸿展对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile(phoneMd5);
+
+
+            String url = config.getString("checkUrl");
+
+            log.info("credit qualityCheck GuangDongHongZhanCreditService request userId:{}, url:{}, checkInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("广东鸿展准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck GuangDongHongZhanCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") ==0 && jsonObject.getBoolean("data")) {
+                return DataVo.success(0, "广东鸿展撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "广东鸿展撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("广东鸿展撞库失败", e);
+            return DataVo.fail(1, "广东鸿展撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,131 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 22 14 13
+ **/
+@Service
+@Slf4j
+public class GuangZhouHuaXinCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.GuangZhouHuaXin;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String appKey;// Md5(mobile)
+        private String sign;// Md5签名
+        private String timestamp;// 时间戳 到秒级 例:1704042061,10位
+        private String phoneMd5;// 明文电话号码Md5加密值(小写),用于判断是否重复
+    }
+
+
+    @Data
+    private static class ApplyInfo {
+        private String appKey;//渠道代码【接收方提供】
+        private String sign;//Md5签名
+        private String timestamp;//时间戳
+        private String phone;//手机
+        private String phoneMd5;//明文电话号码Md5加密值(小写),用于判断是否重复
+        private String province;//省
+        private String city;//市
+        private String realName;//真实姓名
+        private String idCard;//身份证号,如果没有该字段,传“无”
+        private int age;//年龄
+        private Integer gender;//性别;0:女 1:男
+        private String wageMonth;//月收入 (没有传“0”),单位“元”,具体的数字,例如:10000,或者,25000
+        private Integer education;//教育程度:1、初中;2、 高中 ;3、 中专 ;4、 大专 ;5、 本科及以上(没有传5)
+        private Integer socialSecurity;//社保信息: 0、 无社保信息;1、 六个月以下;2、 六到十二个月; 3、 十二个月以上(没有传0)
+        private Integer overdue;//信用记录:1、无信用卡或贷款;2、一年内逾期超过3次且超过90天; 3、 一年内逾期不超过3次且少于90天;4、 信用良好并无逾期 (没有传4)
+        private Integer profession;//职业 : 1、 上班职员;2、 自由职业;3、 个体户;4、企业主(没有传1)
+        private Integer paymentForm;//工资发放形式:0、 无 ;1、 现金发放;2、 转账工资;3、 银行代发;4、 打卡+现金; (没有传3)
+        private Integer workTime;//工作时间:1、 六个月以下;2、 六到十二个月;3、十二个月以上 (没有传3)
+        private Integer house;//房产信息:1 无房产 2 商品房 3 自建房 (没有传1)
+        private Integer accumulationFound;//公积金信息:0、无公积金;1、 六个月以下;2、 六到十二个月;3、 十二个月以上 (没有传0)
+        private Integer loanAmount;//贷款额度: 1,5万以下; 2,5-10万(推荐);3,10-20万(推荐); 4,20万以上; (没有传2)
+        private Integer car;//车产信息:1 无车产;2 全款车;3 按揭车(没有传1)
+        private Integer carAmount;//车辆价值:0:无;1:0-8万;2:9-15万;3:15-20万;4:20万以上(没有传0)
+        private Integer carYear;//车子购买年限:0:无;1,8年以上; 2,8年以下(没有传0)
+        private Integer carMortgageStatus;//车子当前抵押状态:0,无;1:当前抵押中;2:当前无抵押(没有传0)
+        private Integer isCarOwner;//车产是否本人名下:0:否 1:是(没有传0)
+        private Integer loanTime;//贷款时间:1、 1~3个月;2、 3~6个月;3、 6~12个月;4、12~24个月;5、>24个月(没有传1)
+        private Integer commercialInsurance;//商业保险:1、 无; 2、投保人寿险且投保两年以下;3、投保人寿险且投保两年以上(没有传1)
+        private Integer creditCardLimit;//信用卡额度:1、 无;2、 3000以下;3、3千到1万; 4、1万到3万; 5、3万以上(没有传1)
+        private Integer weiLiDai;//微粒贷:0 、无;1 、500 ~ 2999;2 、3000~5999; 3、6000~9999;4 10000 ~ 29999; 5 、30000~99999 ;6、>100000;(没有传0)
+        private Integer zhiMa;//芝麻分数:0,无;1、小于500; 2,500~599; 3,600~649; 4,650~699; 5,700以上; (没有传0)
+        private Integer baiTiao;//京东白条 0,无;1,3000以下;2,3000~4999;3,5000以上(没有传0
+        private Integer huaBei;//蚂蚁花呗 0,无;1,3000以下;2,3000~4999;3,5000以上(没有传0)
+
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit GuangZhouHuaXinCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("广州华鑫对接参数:{}", JSONObject.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = config.getString("checkUrl");
+            //签名
+            StringBuffer sb = new StringBuffer();
+            long currentTimeMillis = System.currentTimeMillis()/1000;
+            sb.append(config.getString("AppKey")+config.getString("AppSecret")+phoneMd5+currentTimeMillis);
+            String sign = Md5Util.encoderByMd5(sb.toString()).toLowerCase();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(phoneMd5);
+            checkInfo.setTimestamp(String.valueOf(currentTimeMillis));
+            checkInfo.setAppKey(config.getString("AppKey"));
+            checkInfo.setSign(sign);
+            log.info("credit qualityCheck GuangZhouHuaXinCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("广州华鑫准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck GuangZhouHuaXinCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code").equals(200) && "SUCCESS".equals(jsonObject.getString("msg"))) {
+                return DataVo.success(0, "广州华鑫撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "广州华鑫撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("广州华鑫撞库失败", e);
+            return DataVo.fail(1, "广州华鑫撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,115 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 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;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 哈密瓜API接单
+ */
+@Service
+@Slf4j
+public class HamiguaCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    private final String qualityCheckPath = "/v1/api/customer/repeat/check";
+
+    private final String applyPath = "/v1/api/customer/media/create";
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Hamigua;
+    }
+
+    @Data
+    public static class CheckData{
+        private String mobile_md5;
+        private String city;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String client_id;
+
+        private String client_secret;
+
+        private CheckData data;
+
+
+    }
+    @Data
+    private static class ResultHt{
+        private Integer code;
+        private String message;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit HamiguaCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+           
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString() ;
+            JSONObject hamiguaJointDTO = JSON.parseObject(configJson);
+            log.info("哈密瓜对接参数:{}", JSON.toJSONString(hamiguaJointDTO));
+//            CheckInfo checkInfo = new CheckInfo();
+            CheckData checkData = new CheckData();
+            checkData.setCity(userInfo.getCompanyCity());
+            checkData.setMobile_md5(userInfo.getUserMobileMD5());
+//            checkInfo.setClient_id(hamiguaJointDTO.getClientId());
+//            checkInfo.setClient_secret(hamiguaJointDTO.getClientSecret());
+//            checkInfo.setData(checkData);
+            String url = hamiguaJointDTO.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck HamiguaCreditService request userId:{}, url:{}, checkData:{}",userInfo.getUserId(), url, checkData);
+            ResultHt response = null;
+            try{
+                Map<String, String> head = new HashMap<>();
+                head.put("Content-Type", "application/json");
+                head.put("secret", hamiguaJointDTO.getString("clientSecret"));
+                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, JSON.toJSONString(checkData));
+                String responseStr = EntityUtils.toString(httpResponse.getEntity());
+                response = JSONObject.parseObject(responseStr,ResultHt.class);
+            }catch (Exception e){
+                log.error("哈密瓜准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HamiguaCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals(10, response.getCode()) ? DataVo.success(0, "哈密瓜撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMessage(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("哈密瓜撞库失败", e);
+            return DataVo.fail(1, "哈密瓜撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,114 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 灏瀚无崟API接单
+ */
+@Service
+@Slf4j
+public class HaohanwuyinCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    private final String qualityCheckPath = "/api/customer/collisionLibrary";
+
+    private final String applyPath = "/api/customer/pushCustomer";
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Haohanwuyin;
+    }
+
+    @Data
+    public static class CheckData{
+
+        private String channel_code;
+        private String mobile_md5;
+        private String channel_secret_key;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String client_id;
+
+        private String client_secret;
+
+        private CheckData data;
+
+
+    }
+    @Data
+    private static class ResultHt{
+        private Integer code;
+        private String msg;
+    }
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit HaohanwuyinCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+           
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString() ;
+            JSONObject HaohanwuyinJointDTO = JSON.parseObject(configJson);
+            log.info("灏瀚无崟对接参数:{}", JSON.toJSONString(HaohanwuyinJointDTO));
+            Map<String,String> checkData = new HashMap<>();
+            checkData.put("channel_code", HaohanwuyinJointDTO.getString("channelCode"));
+            checkData.put("channel_secret_key", HaohanwuyinJointDTO.getString("channelSecretKey"));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkData.put("md5_phone", phoneMd5);
+            String url = HaohanwuyinJointDTO.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck HaohanwuyinCreditService request userId:{}, url:{}, checkData:{}",userInfo.getUserId(), url, checkData);
+            ResultHt response = null;
+            try{
+                Map<String, String> head = new HashMap<>();
+                head.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+                String httpResponse = httpRestTemplate.restTemplate().postForObject(url,  head,String.class, checkData);
+                response = JSONObject.parseObject(httpResponse,ResultHt.class);
+            }catch (Exception e){
+                log.error("灏瀚无崟准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HaohanwuyinCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals(0, response.getCode()) ? DataVo.success(0, "灏瀚无崟撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("灏瀚无崟撞库失败", e);
+            return DataVo.fail(1, "灏瀚无崟撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,94 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 12 07 10 53
+ **/
+@Slf4j
+@Service
+public class HeFeiShenDaiCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HeFeiShenDai;
+    }
+
+    @Data
+    private static class ApplyInfo{
+        private String name; //客户姓名
+        private String phone; //手机号
+        private String gender; //性别
+        private Integer age; //年龄
+        private String grade;//星级
+        private Integer limit; //额度
+        private Integer annual_income; //年收入
+        private Integer remark_condition; //条件备注
+        private String is_married; //是否结婚
+        private String source_from; //来源
+        private String mortgages; //条件信息
+        private String education; //学历
+        private String profession; //职业
+    }
+
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product,EgLoanApiConfigInfoCmd configInfoDo) {
+        try {
+            log.info("credit HeFeiShenDaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+            byte[] requestConfig = configInfoDo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("合肥盛代对接参数:{}", JSONObject.toJSONString(config));
+            String Phone_md5=(userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5());
+            String url = config.getString("checkUrl")+Phone_md5;
+            log.info("credit qualityCheck HeFeiShenDaiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, Phone_md5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().getForObject(url, String.class);
+            }catch (Exception e){
+                log.error("合肥盛代准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HeFeiShenDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            log.info("credit qualityCheck HeFeiShenDaiCreditService response md5Phone:{}, jsonObject:{}",userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code")==0&&jsonObject.getString("data").equals("0")) {
+                return DataVo.success(0, "合肥盛代撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "合肥盛代撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("合肥盛代撞库失败", e);
+            return DataVo.fail(1, "合肥盛代撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,100 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 09 21 15 30
+ * 菏泽融信API
+ **/
+@Slf4j
+@Service
+public class HeZeRongXinCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HeZeRongXin;
+    }
+    @Data
+    private static class CheckInfo{
+        private String mobile_md5;//md5 的手机号
+    }
+    @Data
+    private static class ApplyInfo{
+        private String name; //姓名
+        private String mobile; //11位手机号
+        private Integer sex;//姓名
+        private Integer loan_limit;//额度 (比如: 100000,单位:元)
+        private Integer room;//是否有房产(1:有  0:无)
+        private Integer car;//是否有车产( 1:有  0:无)
+        private Integer accumulation;//是否有公积金 ( 1:有  0:无)
+        private Integer social;//是否有社保 ( 1:有  0:无 )
+        private Integer policy;//是否有保单 (  1:有  0:无 )
+        private Integer business;//是否有营业执照 ( 1:有  0:无 )
+        private Integer issued;//是否有打卡工资 ( 1:有  0:无 )
+        private Integer enterprise;//是否有企业纳税 (  1:有  0:无 )
+        private Integer credit;//是否有信用卡 (  1:有  0:无 )
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit HeZeRongXinCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("菏泽融信对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile_md5(phoneMd5);
+            String checkUrl = config.getString("checkUrl");
+            String url=checkUrl+"?company="+config.getInteger("checkCompany")+"&mobile_md5="+checkInfo.getMobile_md5();
+            log.info("credit qualityCheck HeZeRongXinCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("菏泽融信准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HeZeRongXinCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "菏泽融信撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "菏泽融信撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("菏泽融信撞库失败", e);
+            return DataVo.fail(1, "菏泽融信撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,124 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
+import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
+import com.hrsk.cloud.eg.clinet.vo.DataVo;
+import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
+
+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.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;
+
+import javax.annotation.Resource;
+import java.util.Collections;
+
+/**
+ * @Author zjc
+ * @Date 2024 07 17 14 53
+ **/
+@Slf4j
+@Component
+public class HengYangJiuZhenCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HengYangJiuZhen;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone;
+        private String source;
+        private String city;
+    }
+
+    @Data
+    private static class ApplyInfo{
+        private String qdName;//渠道ID
+        private String name;//姓名
+        private String phone;//手机号
+        private Integer price;//贷款金额
+        private Integer house;//是否有房,1有,0无
+        private Integer car;//是否有⻋,1有,0无
+        private Integer insurance;//是否有寿险,1有,0无
+        private Integer fund;//是否有公积⾦,1有,0无
+        private Integer socital;//是否有社保,1有,0无
+        private String city;//所在城市
+
+        private Integer xyk;//信用卡
+        private Integer wld;
+        private Integer qyns;
+        private Integer df;
+        private String source;
+        private Integer age;
+        private Integer loan_periods;//
+        private Integer business_license;//营业执照(0无1有)
+
+
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+//            log.info("credit YunHaiLianDongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+
+            String url = config.getString("checkUrl");
+
+            MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+            params.put("phone", Collections.singletonList(userInfo.getUserMobileMD5()));
+            params.put("source", Collections.singletonList(config.getString("source")));
+            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 HengYangJiuZhenCreditService request userId:{}, url:{}, params:{}", userInfo.getUserId(), url, params);
+            String response = null;
+            try {
+//                response =getRestTemplate().postForObject(url,checkInfo, String.class);
+                response = httpRestTemplate.restTemplate().postForEntity(url, httpEntity, String.class).getBody();
+            } catch (Exception e) {
+                log.error("衡阳玖臻准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HengYangJiuZhenCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+//            log.info("credit qualityCheck YunHaiLianDongCreditService response userId:{}, jsonObject:{}", userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("status") == 200) {
+                return DataVo.success(0, "衡阳玖臻撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "衡阳玖臻撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("衡阳玖臻撞库失败", e);
+            return DataVo.fail(1, "衡阳玖臻撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+
+}

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

@@ -0,0 +1,149 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.core.env.Environment;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2022/12/5
+ * @Version V1.0
+ **/
+@Service
+@Slf4j
+public class HengaiCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    private final String qualityCheckPathTest = "/api/source/test_filter";
+
+    private final String qualityCheckPathProd = "/api/source/filter";
+
+    private final String applyPathTest = "/api/source/test_post_customer";
+
+    private final String applyPathProd = "/api/source/post_customer";
+
+    private final String devUrl = "http://apitest.shlyxxjs.com";
+
+    private final String prodUrl = "https://api.shlyxxjs.com";
+
+    @Resource
+    private Environment env;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HengAi;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private int source_code;
+
+        private int timestamp;
+
+        private String access_key;
+
+        private String md5_phone;
+
+
+    }
+
+    @Data
+    private static class ResultHa {
+        private int errcode;
+        private String msg;
+    }
+
+    @Data
+    private static class HengaiPushData {
+        private String name;
+        private String phone;
+        private Integer intention_amount;//意向金额(额度)	 单位 元 例如(50000)
+        private Integer age; //年龄(未知传0)
+        private String city;
+        private Integer credit_score; //芝麻信用分
+        private Integer has_social_security; //是否有社保
+        private Integer has_provident_fund;      //是否有公积金	Int 1有 2无
+        private Integer has_car;  //是否有车	Int 1有 2无
+        private Integer has_house;  //是否有房	Int 1有 2无
+        private Integer has_business_license;  //是否有营业执照	Int 1有 2无
+        private Integer has_policy;  //是否有保单	Int 1有 2无
+        private Integer has_credit_card;  //是否有信用卡	Int 1有 2无
+        private Integer has_jdbaitiao;  //是否有京东白条	Int 1有 2无
+        private Integer has_weilidai;  //是否有微粒贷	Int 1有 2无
+        private Integer has_huabei;  //是否有花呗	Int 1有 2无
+        private String desc;  //备注	String
+    }
+
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit HengaiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("恒爱对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMd5_phone(phoneMd5);
+            checkInfo.setSource_code(config.getIntValue("channelSource"));
+            String timestamp = String.valueOf(new Date().getTime() / 1000);
+            checkInfo.setTimestamp(Integer.valueOf(timestamp));
+            String accessKey = config.getIntValue("channelSource") + config.getString("key") + timestamp;
+            checkInfo.setAccess_key(Md5Util.encoderByMd5(accessKey));
+
+            String proFile = env.getActiveProfiles()[0];
+            String url;
+            if (proFile.indexOf("prod") >= 0) {
+                url = config.getString("url") + qualityCheckPathProd;
+            } else {
+                url = config.getString("url") + qualityCheckPathTest;
+            }
+            log.info("credit qualityCheck HengaiCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            ResultHa response = null;
+            try {
+                HttpHeaders headers = new HttpHeaders();
+                headers.setContentType(MediaType.valueOf("application/json;UTF-8"));
+                HttpEntity<CheckInfo> entity = new HttpEntity(checkInfo, headers);
+                response = httpRestTemplate.restTemplate().postForObject(url, entity, ResultHa.class);
+            } catch (Exception e) {
+                log.error("恒爱准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HengaiCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            return 0 == response.getErrcode() ? DataVo.success(0, "恒爱撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("恒爱撞库失败", e);
+            return DataVo.fail(1, "恒爱撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,106 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+
+import javax.annotation.Resource;
+
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 09 03 09 49
+ **/
+@Slf4j
+@Service
+public class HongShengJinFuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HongShengJinFu;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String md5;// 手机号(32位MD5加密字符串)
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String name;//客户姓名
+        private String sex; //性别(“男”或“女”)
+        private String mobile; //手机号
+        private String check_num;//验证码(无则留空)
+        private Integer money;//贷款额度(如:20,即单位为万)
+        private String city; //城市不包含市
+        private Integer age;//年龄
+        private String shebao; //社保(“有”或“无”)
+        private String gongjijin; //公积金(“有”或“无”)
+        private String credit_card;//信用卡(“有”或“无”)
+        private String baodan_is;//保单(“有”或“无”)
+        private String license; //营业执照(“有”或“无”)
+        private String house;//房(“有”或“无”)
+        private String car; //是否有车(“有”或“无”)
+        private String isbankpay; //银行代发(“是”或“否”)
+        private String source;//(必填)贷款来源(固定值,具体需要和对接人确定)
+        private String meiti;//媒体名称(投放媒体名称,第三方私下内容以便其对数据分析)
+        private String remark;
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("弘盛金服对接参数:{}", JSONObject.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = config.getString("checkUrl");
+            log.info("弘盛金服开始撞库,请求地址:{},md5:{}", url, phoneMd5);
+            MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>();
+            params.add("md5", phoneMd5);
+            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();
+            } catch (Exception e) {
+                log.error("弘盛金服准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("弘盛金服撞库响应:{},md5:{}", response, phoneMd5);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject.getString("code").equals("12")) {
+                return DataVo.success(0, "弘盛金服撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "弘盛金服撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail(1, "弘盛金服撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,118 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 04 13 49
+ **/
+@Slf4j
+@Service
+public class HongXinPuHuiCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HongXinPuHui;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile_md5;//md5加密后的手机号,32位小写
+        private Integer company;//指定推送商户id,当前默认都传“3
+        private Integer is_encrypt;//是否加密,1:是  0:否
+    }
+
+
+    @Data
+    private static class ApplyInfo {
+        private String name;//姓名
+        private String mobile;//加密字符串
+        private Integer channel;//渠道来源(固定传16)
+        private Integer company;//商户id,默认传“3”
+        private Integer sex;//性别 (1男 2女)
+        private Integer loan_limit;//额度 (比如: 100000,单位:元)
+        private Integer room;//是否有房产(1:有  0:无)
+        private Integer car;//是否有车产( 1:有  0:无)
+        private Integer accumulation;//是否有公积金 ( 1:有  0:无)
+        private Integer social;//是否有社保 ( 1:有  0:无 )
+        private Integer policy;//是否有保单 (  1:有  0:无 )
+        private Integer business;//是否有营业执照 ( 1:有  0:无 )
+        private Integer issued;//是否有打卡工资 ( 1:有  0:无 )
+        private Integer enterprise;//是否有企业纳税 (  1:有  0:无 )
+        private Integer credit;//是否有信用卡 (  1:有  0:无 )
+        private Integer is_encrypt;//是否加密(1:是 0:否)
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+            log.info("credit HongXinPuHuiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("弘鑫普惠对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile_md5(phoneMd5);
+            checkInfo.setCompany(config.getInteger("company"));
+            checkInfo.setIs_encrypt(0);
+
+            Map<String, String> requestData = new HashMap<>();
+            requestData.put("mobile_md5", String.valueOf(checkInfo.getMobile_md5()));
+            requestData.put("company", String.valueOf(checkInfo.getCompany()));
+            requestData.put("is_encrypt", String.valueOf(checkInfo.getIs_encrypt()));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck HongXinPuHuiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            JSONObject 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);
+            }catch (Exception e){
+                log.error("弘鑫普惠准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HongXinPuHuiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (response.getInteger("code")==0) {
+                return DataVo.success(0, "弘鑫普惠撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "弘鑫普惠撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("弘鑫普惠撞库失败", e);
+            return DataVo.fail(1, "弘鑫普惠撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,117 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 12 04 17 12
+ **/
+@Slf4j
+@Service
+public class HuNanDiShuiYanCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HuNanDiShuiYan;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone_md5;//手机号
+        private String channel;//渠道代码QHXR59
+    }
+    @Data
+    private static class ApplyInfo{
+        private String username; //客户姓名
+        private String tel; //手机号
+        private String cityName; //城市(上海/苏州/…)
+        private Integer price; //需求金额(如50000)
+        private String sex;//性别(男/女)
+        private Integer hasHouse; //是否有房(1有/2无)
+        private Integer hasCar; //是否有车(1有/2无)
+        private Integer hasBaodan; //有无保单(1有/2无)
+        private Integer hasGongjijin; //是否有公积金(1有/2无)
+        private Integer hasWeilidai; //有无芝麻分(1有/2无)
+        private Integer hasNashui; //有无纳税(1有/2无)
+        private String channel; //渠道代码由我方提供:QHXR59
+        private Integer note; //备注可为空(其他信息可传这
+    }
+
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit HuNanDiShuiYanCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("湖南滴水岩对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo=new CheckInfo();
+            checkInfo.setPhone_md5(userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5());
+            checkInfo.setChannel(config.getString("channel"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck HuNanDiShuiYanCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("湖南滴水岩准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HuNanDiShuiYanCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("state").equals("1")) {
+                return DataVo.success(0, "湖南滴水岩撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "湖南滴水岩撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("湖南滴水岩撞库失败", e);
+            return DataVo.fail(1, "湖南滴水岩撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+
+        // 判断Key是否为16位
+//        if (sKey.length() != 16) {
+//            System.out.print("Key长度不是16位");
+//            return null;
+//        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        return new Base64().encodeToString(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+    }
+
+
+
+}

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

@@ -0,0 +1,105 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * 惠融crmAPI接单
+ */
+@Service
+@Slf4j
+public class HuirongCrmCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.HUIRONG_CRM;
+    }
+
+    @Data
+    public static class CheckData {
+        private String chanelCode;
+        private String secretKey;
+        private String attackPhone;
+        private String merchantNo;
+    }
+
+    @Data
+    private static class ResultHt {
+        private Integer code;
+        private String msg;
+        private JSONObject data;
+    }
+
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @return {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfoCmd) {
+        try {
+            log.info("credit HuirongCrmCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+            String config = HessianUtils.deserialize(configInfoCmd.getRequestConfig()).toString();
+            JSONObject huirongJointDTO = JSON.parseObject(config);
+            String url = huirongJointDTO.getString("checkUrl");
+            CheckData checkData = new CheckData();
+            if(StringUtils.isNotBlank(userInfo.getUserMobile())){
+                checkData.setAttackPhone(Md5Util.encoderByMd5(userInfo.getUserMobile()));
+            }else{
+                checkData.setAttackPhone(userInfo.getUserMobileMD5());
+            }
+
+            checkData.setSecretKey(huirongJointDTO.getString("secretKey"));
+            checkData.setChanelCode(huirongJointDTO.getString("channelCode"));
+            checkData.setMerchantNo(product.getBid());
+            String requestJson = JSON.toJSONString(checkData);
+            log.info("credit qualityCheck HuirongCrmCreditService request userId:{}, url:{},requestParam:{}", userInfo.getUserId(), url, requestJson);
+            ResultHt response = null;
+            try {
+               HttpHeaders headers = new HttpHeaders();
+               headers.set("Content-Type", "application/json");
+               HttpEntity httpEntity = new HttpEntity<>(requestJson,headers);
+               //post方式如果出现对接 请求体 为空参考这种方式
+                response = httpRestTemplate.restTemplate().postForObject(url,httpEntity,ResultHt.class);
+              log.info("hui ron result {}",JSONObject.toJSONString(response));
+            } catch (Exception e) {
+                log.error("惠融crm准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HuirongCrmCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject data = response.getData();
+            Integer status = data.getInteger("status");
+            return Objects.equals(0, status) ? DataVo.success(0, "惠融crm撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("惠融crm撞库失败", e);
+            return DataVo.fail(1, "惠融crm撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,133 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.StringDecodeUtils;
+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.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/5/15
+ * @Version V1.0
+ **/
+@Component
+@Slf4j
+public class HuixinCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    private final String qualityCheckPath = "pushdata.ashx?type=CheckMobilePhone";
+
+    private final String applyPath = "pushdata.ashx";
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Huixin;
+    }
+
+    @Data
+    public static class HuiXinJointDTO {
+
+        private String url;
+
+        private String merNo;
+
+        private String encKey;
+
+        private String sourceType;
+    }
+
+
+    @Data
+    public static class CheckData {
+        private String merNo;
+        private String params;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String phoneMd5;
+
+        private String sign;
+
+
+    }
+
+    @Data
+    private static class ResultHt {
+        private String code;
+        private String msg;
+        private boolean status;
+    }
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit HuixinCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+           
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject huiXinJointDTO = JSONObject.parseObject(configJson);
+            log.info("汇鑫对接参数:{}", JSONObject.toJSONString(huiXinJointDTO));
+
+            String phoneMd5 = userInfo.getUserMobileMD5();
+            JSONObject param = new JSONObject() {{
+                put("phoneMd5", phoneMd5);
+            }};
+
+            String url = huiXinJointDTO.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck HuixinCreditService request userId:{}, url:{}, data:{}", userInfo.getUserId(), url, param);
+
+            ResponseEntity<String> response = null;
+            try {
+                HttpHeaders headers = new HttpHeaders();
+                headers.setContentType(MediaType.valueOf("application/json;UTF-8"));
+                HttpEntity<ResultHt> entity = new HttpEntity(param, headers);
+                response = httpRestTemplate.restTemplate().postForEntity(url, entity, String.class);
+            } catch (Exception e) {
+                log.error("汇鑫准入异常,异常信息:{}", e.getMessage(), e);
+            }
+
+            log.info("credit qualityCheck HuixinCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+
+            JSONObject jsonObject = JSONObject.parseObject(StringDecodeUtils.decodeUnicode(response.getBody()));
+
+            return Objects.equals(200, jsonObject.getInteger("code")) && Objects.equals("true", jsonObject.getString("status")) ?
+                    DataVo.success(0, "汇鑫撞库成功", product.getPlanId())
+                    : DataVo.fail(jsonObject.getString("msg"), product.getPlanId());
+        } catch (Exception e) {
+            log.error("汇鑫撞库失败", e);
+            return DataVo.fail(1, "汇鑫撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+}

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

@@ -0,0 +1,164 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.*;
+import javax.crypto.spec.DESedeKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+import java.io.UnsupportedEncodingException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Objects;
+
+/**
+ * 惠众API接单
+ */
+@Service
+@Slf4j
+public class HuizhongCreditService implements LoanDockingApi {
+
+    private final String qualityCheckPath = "/api/user/check";
+
+    private final String applyPath = "/api/yhzd/addCust";
+
+    private final String devUrl = "http://apitest.shlyxxjs.com";
+
+    private final String prodUrl = "https://api.shlyxxjs.com";
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Huizhong;
+    }
+
+
+    @Data
+    private static class CheckInfo{
+        private String phoneNo;
+
+        private String channelSource;
+    }
+    @Data
+    private static class ResultHt{
+        private String code;
+        private String msg;
+    }
+    @Data
+    private static class ApplyInfo{
+        private String cust_name;
+
+        private String mobile;
+
+        private Integer age; //年龄(未知传0)
+
+        private Integer sex; //性别(1:为男,2:为女,未知传0)
+
+        private Integer apply_limit;//申请额度(单位元)如50000,若无特别说明,金额需3万起步
+
+        private String channel_source;
+
+        private String city;
+    }
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit HuizhongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("惠众对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneNo(userInfo.getUserMobileMD5());
+            checkInfo.setChannelSource(config.getString("channelSource"));
+            String url = config.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck HuizhongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            ResultHt response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, ResultHt.class);
+            }catch (Exception e){
+                log.error("惠众准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck HuizhongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals("0000", response.getCode()) ? DataVo.success(0, "惠众撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("惠众撞库失败", e);
+            return DataVo.fail(1, "惠众撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+    private static class ApiAesUtil {
+
+        public static String encrypt(String data, String secretKey) {
+            try {
+                byte[] encrpyted = tripleDES(Cipher.ENCRYPT_MODE, data.getBytes("UTF-8"), secretKey.getBytes());
+                byte[] encoded = Base64.encodeBase64(encrpyted); // Base64编码
+                return new String(encoded);
+            } catch (UnsupportedEncodingException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        public static String decrypt(String data, String secretKey ) {
+            try {
+                byte[] decoded = Base64.decodeBase64(data); // Base64解码
+                byte[] decrypted = tripleDES(Cipher.DECRYPT_MODE, decoded, secretKey.getBytes());// 3DES解密
+                return new String(decrypted, "UTF-8");
+            } catch (UnsupportedEncodingException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        private static byte[] tripleDES(int opmode, byte[] data, byte[] secretKey) {
+            return cipher("DESede", "DESede/CBC/PKCS5Padding", opmode, data, "01234567".getBytes(), secretKey);
+        }
+
+        private static byte[] cipher(String algorithm, String transformation, int opmode, byte[] data, byte[] iv, byte[] secretKey) {
+            try {
+                Key key = SecretKeyFactory.getInstance(algorithm).generateSecret(new DESedeKeySpec(secretKey));
+                IvParameterSpec spec = new IvParameterSpec(iv);
+                Cipher cipher = Cipher.getInstance(transformation);
+                cipher.init(opmode, key, spec);
+                return cipher.doFinal(data);
+            } catch (InvalidKeyException | InvalidKeySpecException | NoSuchAlgorithmException | NoSuchPaddingException
+                    | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) {
+                throw new RuntimeException(e);
+            }
+        }
+    }
+}

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

@@ -0,0 +1,151 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 05 21 11 33
+ **/
+@Slf4j
+@Service
+public class JianZhanCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.JianZhan100;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String act;// 操作类型
+        private String c_phone;// 手机号(32位MD5加密字符串)
+
+        private String aid;// Access Id
+        private String timestamp;// 时间戳
+        private String noncestr;// 随机字符串
+        private String signature;// 签名
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String act;//姓名
+        private String c_name; //年龄
+        private String c_phone; //手机号
+        private Integer c_sex; //性别
+        private String type;//类型
+        private String c_city;//城市
+        private String c_birth_year;//出生年份如:1990)
+        private String c_daikuanedu;//贷款额度如:3000)
+        private Integer c_has_xinyongka;//有无信用卡1(有)2(无)
+        private Integer loanMoney;//借款金额(单位:万元)
+        private Integer c_has_fang;//有无房 1(有)2(无)
+        private Integer c_has_che; //有无车 1(有)2(无)
+        private Integer c_has_gongjijin; //有无公积金 1(有)2(无)
+
+        private Integer c_has_shebao; //有无社保 1(有)2(无)
+        private String c_has_baodan;//有无保单 1(有)2(无)
+        private Integer c_has_weilidai;//有无微粒贷 1(有)2(无)
+        private Integer c_faxinfangshi;//发薪方式1(银行转账)2(代发工资)3(现金发放)4(无)
+        private String c_shouru;//收入(如:3000)
+        private String c_zhiye;//职业(如:工程师)
+
+        private String aid;// Access Id
+        private String timestamp;// 时间戳
+        private String noncestr;// 随机字符串
+        private String signature;// 签名
+
+    }
+
+    @Data
+    private static class RequestData{
+        private String aid;// Access Id
+        private String act;// 操作类型,具体的功能点act值不一样。
+        private String timestamp;// 时间戳
+        private String noncestr;// 随机字符串
+        private String signature;// 签名
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd user, PlanCmd product, EgLoanApiConfigInfoCmd configInfoCmd) {
+        try {
+            log.info("credit JianZhanCreditService qualityCheck begin...userId:{}", user.getUserMobileMD5());
+          
+            byte[] requestConfig =
+            configInfoCmd.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("建站100对接参数:{}", JSON.toJSONString(config));
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+            // 获取当前日期时间
+            LocalDateTime now = LocalDateTime.now();
+            // 使用format方法将LocalDateTime对象转换为字符串
+            String formattedDateTime = now.format(formatter);
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setAct(config.getString("checkAct"));
+            checkInfo.setC_phone(user.getUserMobileMD5());
+            checkInfo.setAid(config.getString("aid"));
+            checkInfo.setNoncestr(formattedDateTime);
+            checkInfo.setTimestamp(formattedDateTime);
+            String signature=checkInfo.getAid()+checkInfo.getAct()+checkInfo.getTimestamp()+checkInfo.getNoncestr()+config.getString("akey");
+            checkInfo.setSignature(Md5Util.encoderByMd5(signature));
+            Map<String, String> requestData = new HashMap<>();
+            requestData.put("act", checkInfo.getAct());
+            requestData.put("c_phone",checkInfo.getC_phone());
+            requestData.put("aid", checkInfo.getAid());
+            requestData.put("noncestr",checkInfo.getNoncestr());
+            requestData.put("timestamp", checkInfo.getTimestamp());
+            requestData.put("signature",checkInfo.getSignature());
+
+            String url = config.getString("url");
+            log.info("credit qualityCheck JianZhanCreditService request userId:{}, url:{}, CheckInfo:{}", requestData, url, user.getUserMobileMD5());
+            Map<String, String> header = new HashMap<>();
+            header.put("Content-Type", "application/x-www-form-urlencoded");
+            String res = "";
+            JSONObject jsonObject = new JSONObject();
+            try{
+                HttpResponse response = httpRestTemplate.restTemplate().postForObject(url, null, null, header, null, requestData);
+                res = EntityUtils.toString(response.getEntity());
+                jsonObject = JSON.parseObject(res);
+            }catch (Exception e){
+                log.error("建站100准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JianZhanCreditService response userId:{}, result:{}",user.getUserMobileMD5(), jsonObject);
+            if (jsonObject == null) {
+                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            if (jsonObject.getString("status").equals("0")) {
+                return DataVo.success(0, "建站100撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "建站100撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail(1, "建站100撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,93 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * 捷诚API接单
+ */
+@Service
+@Slf4j
+public class JiechengCreditService implements LoanDockingApi {
+    private final String qualityCheckPath = "/api/yrh/index";
+    private final String applyPath = "/api/yrh/orderadd";
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Jiecheng;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"key":"5lvNIA1Kmchq2gu3C9P5g+rttvQXq3lh","url":"http://www.cs.ahaiyu.com"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit JiechengCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("捷诚对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(userInfo.getUserMobileMD5());
+            String url = config.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck JiechengCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            ResultJc response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, ResultJc.class);
+            }catch (Exception e){
+                log.error("捷诚准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JiechengCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return response.getCode() == 200 && response.getData().equals("1") ? DataVo.success(0, "捷诚撞库成功", product.getPlanId())
+                    : DataVo.fail("捷诚撞库失败:" + response.getMessage(), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("捷诚撞库失败", e);
+            return DataVo.fail(1, "捷诚撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    @Data
+    private static class CheckInfo{
+        private String phoneMd5;
+    }
+
+    @Data
+    private static class ResultJc{
+        private int code;
+        private String message;
+        private String data;
+    }
+
+
+}

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

@@ -0,0 +1,95 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 09 19 09 10
+ * 济宁惠融API
+ **/
+@Slf4j
+@Service
+public class JilingHuiRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.JiNingHR;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private Integer channel_code;//渠道编码
+        private String channel_secret_key;//渠道密钥
+        private String md5_phone;//md5加密后的手机号,32位小写
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit JilingHuiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("济宁惠融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5_phone(Md5Util.encoderByMd5(userInfo.getUserMobile()));
+            checkInfo.setChannel_code(Integer.valueOf(config.getString("channel_code")));
+            checkInfo.setChannel_secret_key(config.getString("channel_secret_key"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck JilingHuiRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("济宁惠融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JilingHuiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "济宁惠融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.success(1, "济宁惠融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("济宁惠融撞库失败", e);
+            return DataVo.fail(1, "济宁惠融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,152 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.cglib.beans.BeanMap;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Descrption
+ * @Author: zhangyy
+ * @Date: 2023/5/8
+ * @Version V1.0
+ **/
+@Service
+@Slf4j
+public class JinDieV2CreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.CRM_JD;
+    }
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return {"url":"http://apitest.shlyxxjs.com","key":"fluxZhudai*_key","tenantId":"1405729496904110081","trafficPlatformId":"13872425018351111"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
+        try {
+            log.info("credit JindieV2CreditService qualityCheck begin...userId:{},productId={}", userInfo.getUserId(), product.getPlanId());
+
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            if (StringUtils.isBlank(configJson)) {
+                return DataVo.fail(product.getPlanName(), product.getPlanId());
+            }
+            JSONObject config = JSONObject.parseObject(configJson);
+            log.info("锦蝶V2.0对接参数:{}", JSON.toJSONString(config));
+            JSONObject jsonObject = new JSONObject() {{
+                put("Appid", config.getString("Appid"));
+                put("Appkey", config.getString("Appkey"));
+                put("Userphone", userInfo.getUserMobileMD5());
+            }};
+            String url = config.getString("CheckUrl");
+            log.info("credit qualityCheck JindieV2CreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, jsonObject);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, jsonObject, String.class);
+            } catch (Exception e) {
+                log.error("【{}】-锦蝶V2.0准入异常,异常信息:{}", product.getPlanName(), e.getMessage(), e);
+            }
+            log.info("credit qualityCheck QingyuV2CreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject res = JSONObject.parseObject(response);
+            if (res.getInteger("result") == 400) {
+                return DataVo.success(0, "【" + product.getPlanName() + "】-锦蝶V2.0撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(res.getString("message"), product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("【{}】-锦蝶V2.0撞库失败", product.getPlanName(), e);
+            return DataVo.fail(1, "锦蝶V2.0撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+    public static <T> Map<String, Object> beanToMap(T bean) {
+        Map<String, Object> map = new HashMap<>();
+        if (bean != null) {
+            BeanMap beanMap = BeanMap.create(bean);
+            for (Object key : beanMap.keySet()) {
+                map.put(key + "", beanMap.get(key));
+            }
+        }
+        return map;
+    }
+
+
+    private String getSign(Map<String, Object> map) {
+        String text = "";
+        Iterator<Map.Entry<String, Object>> iterator = map.entrySet().iterator();
+        while (iterator.hasNext()) {
+            Map.Entry<String, Object> entry = iterator.next();
+            String value;
+            if (null == entry.getValue()) {
+                value = "";
+            } else {
+                value = (String) entry.getValue();
+            }
+            text = text + entry.getKey() + value;
+        }
+        return Md5Util.encoderByMd5(text).toUpperCase();
+    }
+
+
+    @Data
+    private static class V2Req {
+        private String requestId;
+
+        private String accessKey;
+
+        private JSONArray data;
+    }
+
+    @Data
+    private static class CheckInfoResp {
+        private Integer code;
+        private String msg;
+        private Boolean success;
+        private List<JSONObject> data;
+    }
+
+
+    @Data
+    private static class ResultYq {
+        private Integer code;
+        private String msg;
+        private Boolean success;
+        private String requestId;
+        private JSONArray data;
+    }
+}

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

@@ -0,0 +1,98 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 12 01 16 54
+ **/
+@Component
+@Slf4j
+public class JinDieV3CreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        //三方对接平台,或者第三方sass平台,此处不设置任何默认值
+        return ServerCodeEnums.CRM_JDV3;
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String Username;
+        private String Userphone;
+        private Integer Sex; //性别(1:为男,2:为女,未知传0)
+        private Integer Money;//申请额度(单位元)如50000,若无特别说明,金额需3万起步
+        private String City;
+        private String Channel;
+        private String ChannelInfo;
+        private String Info;
+        private Integer Price;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return {"url":"http://apitest.shlyxxjs.com","key":"fluxZhudai*_key","tenantId":"1405729496904110081","trafficPlatformId":"13872425018351111"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
+        try {
+            log.info("credit JinDieV3CreditService qualityCheck begin...userId:{},productId={}", userInfo.getUserId(), product.getPlanId());
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            if (StringUtils.isBlank(configJson)) {
+                return DataVo.fail(product.getPlanName(), product.getPlanId());
+            }
+            JSONObject config = JSONObject.parseObject(configJson);
+            log.info("锦蝶V3.0对接参数:{}", JSON.toJSONString(config));
+            JSONObject jsonObject = new JSONObject() {{
+                put("Appid", config.getString("Appid"));
+                put("Appkey", config.getString("Appkey"));
+                put("Userphone", userInfo.getUserMobileMD5());
+            }};
+            String url = config.getString("CheckUrl");
+            log.info("credit qualityCheck JinDieV3CreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, jsonObject);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, jsonObject, String.class);
+            } catch (Exception e) {
+                log.error("【{}】-锦蝶V3.0准入异常,异常信息:{}", product.getPlanName(), e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JinDieV3CreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject res = JSONObject.parseObject(response);
+            if (res.getInteger("result") == 400) {
+                return DataVo.success(0, "【" + product.getPlanName() + "】-锦蝶V3.0撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(res.getString("message"), product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("【{}】-锦蝶V3.0撞库失败", product.getPlanName(), e);
+            return DataVo.fail(1, "锦蝶V3.0撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+}

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

@@ -0,0 +1,80 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 05 14 11 25
+ **/
+@Service
+@Slf4j
+public class JinDieV4CreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.JinDieV4CreditService;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String sign;// 渠道标识
+        private String tel;// 手机号MD5
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit JinDieV4CreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("锦蝶v4对接参数:{}", JSONObject.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setSign(config.getString("sign"));
+            checkInfo.setTel(phoneMd5);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck JinDieV4CreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("锦蝶v4准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JinDieV4CreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject.getString("code").equals("500")) {
+                return DataVo.success(0, "锦蝶v4撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "锦蝶v4撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail(1, "锦蝶v4撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,122 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author zjc
+ * @Date 2024 06 12 17 11
+ **/
+@Slf4j
+@Service
+public class JinZhuLiCreditService  implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.JinZhuLiCreditService;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String phone;//手机号, MD5加密(32位小写)
+        private String qdName;//城市:例如:北京
+        private String source;//固定值,具体需要和对接人确定
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String qdName;
+        private String name;
+        private Long phone;
+        private Long price;
+        private Integer house;
+        private Integer car;
+        private Integer insurance;
+        private Integer fund;
+        private Integer socital;
+        private Integer xyk;
+        private Integer wld;
+        private Integer qyns;
+        private Integer df;
+        private Integer business_license;
+        private String city;
+        private String source;
+        private Integer age;
+        private Integer loan_periods;
+
+    }
+
+    @Data
+    private static class ApplyInfoRequst {
+       private String is_jm;
+       private String source;
+       private String data;
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit JinZhuLiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+
+            log.info("金助理对接参数:{}", JSON.toJSONString(config));
+
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhone(phoneMd5);
+            checkInfo.setQdName(config.getString("qdName"));
+            checkInfo.setSource(config.getString("source"));
+
+            String url = config.getString("checkUrl");
+
+            log.info("credit qualityCheck JinZhuLiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("金助理准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JinZhuLiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("status").equals("200")) {
+                return DataVo.success(0, "金助理撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "金助理撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("金助理撞库失败", e);
+            return DataVo.fail(1, "金助理撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,96 @@
+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.annotation.JsonProperty;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * 锦蝶API接单
+ */
+@Service
+@Slf4j
+public class JindieCreditService implements LoanDockingApi {
+    private final String qualityCheckPath = "/erp/api/ifRepeatmd5";
+    private final String applyPath = "/erp/api/addclue";
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Jindie;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return {"url":"https://jyw.jinchen.cc","Appid":"zZyeD3+kkEQVRWno","Appkey":"y52RC3muwUdtOhWe1Z0qo8FlFA","Channel":"网络渠道","ChannelInfo":"融5"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit JindieCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("锦蝶对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+
+            checkInfo.setAppid(config.getString("Appid"));
+            checkInfo.setAppkey(config.getString("Appkey"));
+            checkInfo.setUserphone(userInfo.getUserMobileMD5());
+            String url = config.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck JindieCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("锦蝶准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JindieCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (JSON.parseObject(response).getInteger("result") == 400 ) {
+                return DataVo.success(0, "锦蝶撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail("锦蝶撞库失败", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("锦蝶撞库失败", e);
+            return DataVo.fail(1, "锦蝶撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+    @Data
+    private static class CheckInfo {
+        @JsonProperty(value ="Appid")
+        private String Appid;
+
+        @JsonProperty(value ="Appkey")
+        private String Appkey;
+
+        @JsonProperty(value ="Userphone")
+        private String Userphone;
+    }
+
+}

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

@@ -0,0 +1,94 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 27 14 06
+ **/
+@Slf4j
+@Service
+public class JiuXinKeCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.JiuXinKe;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String phoneMd5;// Md5(mobile)
+        private Integer file_id;//渠道id
+        private String promotion;//渠道标识
+    }
+
+
+
+    /**
+     * 助贷对接撞库模板1,标准流程,post请求,application/json,参数直接传对象
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit JiuXinKeCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("玖欣客对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = config.getString("checkUrl");
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(phoneMd5);
+            checkInfo.setPromotion(config.getString("promotion"));
+            checkInfo.setFile_id(config.getInteger("file_id"));
+            log.info("credit qualityCheck JiuXinKeCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("玖欣客准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck JiuXinKeCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("0")) {
+                return DataVo.success(0, "玖欣客撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "玖欣客撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("玖欣客撞库失败", e);
+            return DataVo.fail(1, "玖欣客撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,98 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 08 31 10 54k
+ * 快易融API
+ **/
+@Slf4j
+@Service
+public class KuaiYiRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.KuaiYiRong;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private Integer channel_code;//渠道编码
+        private String channel_secret_key;//渠道密钥
+        private String md5_phone;//md5加密后的手机号,32位小写
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channel_code":"34","checkUrl":"http://120.46.41.14:8888/api/customer/collisionLibrary","channel_secret_key":"HrYk20230829KYR6"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit KuaiYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("快易融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5_phone(Md5Util.encoderByMd5(userInfo.getUserMobile()));
+            checkInfo.setChannel_code(Integer.valueOf(config.getString("channel_code")));
+            checkInfo.setChannel_secret_key(config.getString("channel_secret_key"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck KuaiYiRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("快易融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck KuaiYiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "快易融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "快易融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("快易融撞库失败", e);
+            return DataVo.fail(1, "快易融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}
+

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

@@ -0,0 +1,100 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 快易贷API接单
+ */
+@Service
+@Slf4j
+public class KuaiyidaiCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    private final String qualityCheckPath = "/Admin/UserIncomeApi/comparePhoneMonitor";
+
+    private final String applyPath = "/Admin/UserIncomeApi/addUserAes";
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Kuaiyidai;
+    }
+
+    @Data
+    public static class CheckData{
+        private String merNo;
+        private String params;
+    }
+
+    @Data
+    private static class ResultHt{
+        private String status;
+        private String mes;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit KuaiyidaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+           
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject kuaiyidaiJointDTO = JSONObject.parseObject(configJson);
+            log.info("快易贷对接参数:{}", JSON.toJSONString(kuaiyidaiJointDTO));
+
+            Map<String, String> paramMap = new HashMap<>();
+            paramMap.put("city",userInfo.getCityAllName() );
+            paramMap.put("phone", userInfo.getUserMobileMD5());
+            paramMap.put("qdName", kuaiyidaiJointDTO.getString("qdName"));
+
+
+            String url = kuaiyidaiJointDTO.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck KuaiyidaiCreditService request userId:{}, url:{}, data:{}",userInfo.getUserId(), url, JSON.toJSONString(paramMap));
+            ResultHt response = null;
+            try{
+                JSONObject resJson = httpRestTemplate.restTemplate().postForEntity(url,paramMap,JSONObject.class).getBody();
+                response = JSON.parseObject(resJson.toJSONString(), ResultHt.class);
+            }catch (Exception e){
+                log.error("快易贷准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck KuaiyidaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals("200", response.getStatus()) ? DataVo.success(0, "快易贷撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMes(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("快易贷撞库失败", e);
+            return DataVo.fail(1, "快易贷撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+}

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

@@ -0,0 +1,101 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 快易贷API接单
+ */
+@Service
+@Slf4j
+public class KuaiyidaiFourToOneCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    private final String qualityCheckPath = "/Admin/UserIncomeApi/comparePhoneMonitor";
+
+    private final String applyPath = "/Admin/UserIncomeApi/addUserAes";
+
+    @Data
+    public static class CheckData{
+        private String merNo;
+        private String params;
+    }
+
+    @Data
+    private static class ResultHt{
+        private String status;
+        private String mes;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit KuaiyidaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+           
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject kuaiyidaiJointDTO = JSON.parseObject(configJson);
+            log.info("快易贷对接参数:{}", JSON.toJSONString(kuaiyidaiJointDTO));
+
+
+            Map<String, String> paramMap = new HashMap<>();
+            paramMap.put("city",userInfo.getCityAllName() );
+            paramMap.put("phone", userInfo.getUserMobileMD5());
+            paramMap.put("qdName", kuaiyidaiJointDTO.getString("qdName"));
+
+
+            String url = kuaiyidaiJointDTO.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck KuaiyidaiCreditService request userId:{}, url:{}, data:{}",userInfo.getUserId(), url, JSON.toJSONString(paramMap));
+            ResultHt response = null;
+            try{
+                JSONObject resJson = httpRestTemplate.restTemplate().postForEntity(url,paramMap,JSONObject.class).getBody();
+                response = JSON.parseObject(resJson.toJSONString(), ResultHt.class);
+            }catch (Exception e){
+                log.error("快易贷准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck KuaiyidaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals("200", response.getStatus()) ? DataVo.success(0, "快易贷撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMes(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("快易贷撞库失败", e);
+            return DataVo.fail(1, "快易贷撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.KuaiyidaiFourToOne;
+    }
+
+}

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

@@ -0,0 +1,107 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 快易贷API接单
+ */
+@Service
+@Slf4j
+public class KuaiyidaiNightCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Autowired
+    Environment environment;
+
+    private final String qualityCheckPath = "/Admin/UserIncomeApi/comparePhoneMonitor";
+
+    private final String applyPath = "/Admin/UserIncomeApi/addUserAes";
+
+
+    @Data
+    public static class CheckData{
+        private String merNo;
+        private String params;
+    }
+
+    @Data
+    private static class ResultHt{
+        private String status;
+        private String mes;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit KuaiyidaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+           
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject kuaiyidaiJointDTO = JSON.parseObject(configJson);
+            log.info("快易贷对接参数:{}", JSON.toJSONString(kuaiyidaiJointDTO));
+
+
+            Map<String, String> paramMap = new HashMap<>();
+            paramMap.put("city",userInfo.getCityAllName() );
+            paramMap.put("phone", userInfo.getUserMobileMD5());
+            paramMap.put("qdName", kuaiyidaiJointDTO.getString("qdName"));
+
+
+            String url = kuaiyidaiJointDTO.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck KuaiyidaiCreditService request userId:{}, url:{}, data:{}",userInfo.getUserId(), url, JSON.toJSONString(paramMap));
+            ResultHt response = null;
+            try{
+                JSONObject resJson = httpRestTemplate.restTemplate().postForEntity(url,paramMap,JSONObject.class).getBody() ;
+                response = JSON.parseObject(resJson.toJSONString(), ResultHt.class);
+            }catch (Exception e){
+                log.error("快易贷准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck KuaiyidaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals("200", response.getStatus()) ? DataVo.success(0, "快易贷撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMes(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("快易贷撞库失败", e);
+            return DataVo.fail(1, "快易贷撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.KuaiyidaiNight;
+    }
+
+}

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

@@ -0,0 +1,108 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 快易贷API接单
+ */
+@Service
+@Slf4j
+public class KuaiyidaiV2CreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    private final String qualityCheckPath = "/Admin/UserIncomeApi/comparePhoneMonitor";
+
+    private final String applyPath = "/Admin/UserIncomeApi/addUserAes";
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.KuaiyidaiV2;
+    }
+
+    @Data
+    public static class CheckData{
+        private String merNo;
+        private String params;
+    }
+
+    @Data
+    private static class ResultHt{
+        private String status;
+        private String mes;
+    }
+
+    @Data
+    private static class ApplyResultHt{
+        private Integer code;
+        private String message;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit KuaiyidaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject kuaiyidaiJointDTO = JSON.parseObject(configJson);
+            log.info("快易贷对接参数:{}", JSON.toJSONString(kuaiyidaiJointDTO));
+
+            Map<String, String> paramMap = new HashMap<>();
+            paramMap.put("city",userInfo.getCityAllName() );
+            paramMap.put("phone", userInfo.getUserMobileMD5());
+            paramMap.put("qdName", kuaiyidaiJointDTO.getString("qdName"));
+
+
+            String url = kuaiyidaiJointDTO.getString("url");
+            log.info("credit qualityCheck KuaiyidaiCreditService request userId:{}, url:{}, data:{}",userInfo.getUserId(), url, JSON.toJSONString(paramMap));
+            ResultHt response = null;
+            try{
+                JSONObject resJson = httpRestTemplate.restTemplate().postForEntity(url,paramMap,JSONObject.class).getBody();
+                response = JSON.parseObject(resJson.toJSONString(), ResultHt.class);
+            }catch (Exception e){
+                log.error("快易贷准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck KuaiyidaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return  DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return Objects.equals("200", response.getStatus()) ? DataVo.success(0, "快易贷撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMes(), product.getPlanId());
+        } catch (Exception e) {
+            log.error("快易贷撞库失败", e);
+            return DataVo.fail(1, "快易贷撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,93 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 10 20 10 46
+ * 昆明小松鼠API
+ **/
+@Slf4j
+@Service
+public class KunMingXiaoSongShuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.KunMingXiaoSongShu;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String md5CusPhone;//md5 的手机号小写
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit KunMingXiaoSongShuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("昆明小松鼠代对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMd5CusPhone(phoneMd5);
+            String url = config.getString("checkUrl")+"/"+checkInfo.getMd5CusPhone();
+            log.info("credit qualityCheck KunMingXiaoSongShuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            JSONObject response = null;
+            try{
+                Map<String, String> head = new HashMap<>();
+                head.put("Content-Type", "application/json; charset=utf-8");
+                head.put("access-control-allow-origin","*");
+                String httpResponse =  httpRestTemplate.restTemplate().getForObject(url, String.class,  head);
+                log.info("昆明小松鼠撞库响应数据:{}", httpResponse);
+                response = JSON.parseObject(httpResponse);
+            }catch (Exception e){
+                log.error("昆明小松鼠代准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck KunMingXiaoSongShuCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            if (response.getInteger("Code") == 1  && response.getString("Data").equals("false")) {
+                return DataVo.success(0, "昆明小松鼠代撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "昆明小松鼠代撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("昆明小松鼠代撞库失败", e);
+            return DataVo.fail(1, "昆明小松鼠代撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,86 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 18 14 51
+ **/
+@Slf4j
+@Service
+public class LeXiangRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.LeXiangRong;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone;//MD5加密
+    }
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit LeXiangRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("乐享融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPhone(phoneMd5);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck LeXiangRongCreditService request userId:{}, url:{}, checkInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("乐享融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck LeXiangRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("state").equals("200")) {
+                return DataVo.success(0, "乐享融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "乐享融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("乐享融撞库失败", e);
+            return DataVo.fail(1, "乐享融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,131 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import com.hrsk.cloud.eg.infrastructure.utils.RSAUtils;
+import com.hrsk.cloud.eg.infrastructure.utils.SnowflakeIdWorker;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.security.interfaces.RSAPublicKey;
+import java.time.Instant;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 19 17 49
+ **/
+@Slf4j
+@Service
+public class LianKeYunKongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.LianKeYunKong;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String phoneMd5;// 手机号MD5
+    }
+
+    @Data
+    private static class ApplyInfo {
+        private String custName;//姓名
+        private String mobile; //手机号
+        private String age; //年龄
+        private String sex; //性别
+        private String city;//城市
+        private BigDecimal applyLimit;//申请额度
+        private String applyTime;//申请日期
+        private String channelSource;//渠道来源
+        private String hasFund;//是否有公积金
+        private String hasHouse;//是否有房
+        private String hasCar;//是否有车
+        private String hasSocial; //是否有社保
+        private String inspectionLevel; //芝麻信用分
+        private String mediaSource; //媒体来源
+    }
+
+    @Data
+    private static class RequestData{
+        private String tenantId;// 租户 ID
+        private String timestamp;// 时间戳
+        private String requestId;// 随机字符串
+        private String configName;// 撞库配置名
+        private JSONObject data;// 随机字符串
+        private String sign;//签名
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit LianKeYunKongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("链客云控对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(phoneMd5);
+            String millisecondsSinceEpoch = String.valueOf(Instant.now().toEpochMilli());
+            long id = SnowflakeIdWorker.nextId();
+            String sign="timestamp:"+millisecondsSinceEpoch+"-"+"requestId:"+id;
+            RequestData requestParam=new RequestData();
+            requestParam.setTenantId(config.getString("tenantId"));
+            requestParam.setTimestamp(millisecondsSinceEpoch);
+            RSAPublicKey publicKey = RSAUtils.getPublicKey(config.getString("publicKey"));
+            String s = RSAUtils.publicEncrypt(checkInfo.getPhoneMd5(), publicKey);
+            JSONObject json=new JSONObject();
+            json.put("phoneMd5",s);
+            requestParam.setData(json);
+            requestParam.setRequestId(String.valueOf(id));
+            requestParam.setSign(Md5Util.encoderByMd5(sign));
+            requestParam.setConfigName(config.getString("configNameCheck"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck LianKeYunKongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, requestParam, String.class);
+            } catch (Exception e) {
+                log.error("链客云控准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck LianKeYunKongCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject data = JSON.parseObject(jsonObject.getString("data"));
+            if (jsonObject.getString("code").equals("0")&&data.getString("code").equals("200")) {
+                return DataVo.success(0, "链客云控撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "链客云控撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("链客云控撞库失败", e);
+            return DataVo.fail(1, "链客云控撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,103 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 08 22 09 57
+ **/
+@Slf4j
+@Service
+public class LiaoChengXinYiDaiCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.DaXiangHuaBei;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone;//md5 的手机号
+        private String source;//合作标识
+        private String city;//客户所在城市。比如:北京
+    }
+    @Data
+    private static class ResultHt{
+        private String code;
+        private String msg;
+        private JSONObject data;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"source":"xy_dxhb","checkUrl":"http://api-crm.krdcrm.cn:8181/home/encryptCheckCustomer","publicKey":"hxW7zT4BI9siImpE"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit LiaoChengXinYiDaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("聊城鑫易代对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPhone(phoneMd5);
+            checkInfo.setSource(config.getString("source"));
+            checkInfo.setCity(userInfo.getCompanyCity());
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck LiaoChengXinYiDaiService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("聊城鑫易代准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck LiaoChengXinYiDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 200 && jsonObject.getJSONObject("data")!=null && jsonObject.getJSONObject("data").getInteger("isRegistered")==0) {
+                return DataVo.success(0, "聊城鑫易代撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "聊城鑫易代撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("聊城鑫易代撞库失败", e);
+            return DataVo.fail(1, "聊城鑫易代撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,131 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.time.Instant;
+import java.util.Random;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 03 22 11 13
+ **/
+@Slf4j
+@Service
+public class MoGuTouCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.MoGuTou;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String tenantId;//企业ID
+        private String md5Code;//手机号Md5小写加密串
+        private String signature;//按照tenantId、timestamp、randomStr、系统密钥和企业密钥的顺序拼接的字符串,再通过Md5小写加密串
+        private String randomStr;//由大小写字母和数字组成的6位的随机字符串
+        private String timestamp;//时间戳,单位:毫秒
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit SouYuJinFuCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("蘑菇投对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5Code((userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5()));
+            checkInfo.setTenantId(config.getString("tenantId"));
+            String millisecondsSinceEpoch = String.valueOf(Instant.now().toEpochMilli());
+            checkInfo.setTimestamp(millisecondsSinceEpoch);//当前时间搓
+            checkInfo.setRandomStr(getRandomStr());//随机字符串
+            String signature=checkInfo.getTenantId()+checkInfo.getTimestamp()+checkInfo.getRandomStr()+config.getString("key")+config.getString("qykey");
+            String s = Md5Util.encoderByMd5(signature).toLowerCase();
+            checkInfo.setSignature(s);
+            String url = config.getString("checkUrl");
+
+            log.info("credit qualityCheck MoGuTouCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("蘑菇投准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck MoGuTouCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            log.info("credit qualityCheck MoGuTouCreditService response userId:{}, jsonObject:{}", userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code")==200&&!jsonObject.getString("data").equals("duplicate")) {
+                return DataVo.success(0, "蘑菇投撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "蘑菇投撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("蘑菇投撞库失败", e);
+            return DataVo.fail(1, "授渔金服撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    public static String getRandomStr(){
+        // 定义一个字符串,包含所有可能的字符
+        String charPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+
+        // 创建Random对象
+        Random random = new Random();
+
+        // 使用StringBuilder来构建随机字符串
+        StringBuilder sb = new StringBuilder(6);
+
+        // 循环6次,生成6个随机字符
+        for (int i = 0; i < 6; i++) {
+            // 从charPool中随机选择一个字符
+            int index = random.nextInt(charPool.length());
+            char randomChar = charPool.charAt(index);
+
+            // 将随机字符添加到StringBuilder中
+            sb.append(randomChar);
+        }
+
+        // 将StringBuilder转换为String并输出
+        String randomString = sb.toString();
+        return randomString;
+    }
+
+    /**
+     * 强化的MD5计算
+     * @param inbuf 需做md5的字符串
+     * @return
+     */
+    public static String encodeByMd5WithSalt(String inbuf,String salt) {
+        String mac = Md5Util.encoderByMd5(Md5Util.encoderByMd5(inbuf+salt));
+        return mac;
+    }
+}

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

@@ -0,0 +1,107 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import com.hrsk.cloud.eg.infrastructure.utils.RSAUtils;
+import com.hrsk.cloud.eg.infrastructure.utils.RedisUtil;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.security.interfaces.RSAPublicKey;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 04 12 09 29
+ **/
+@Slf4j
+@Service
+public class NanTongXingChengCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Resource
+    private RedisUtil redisUtil;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.NanTongXingChengCreditService;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String openId;//广告平台
+        private String cityCode;//城市代码
+        private String phone;
+    }
+    @Data
+    private static class Request{
+        private String data;
+    }
+
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit NanTongXingChengCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("南通星辰对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhone(phoneMd5);
+            checkInfo.setOpenId(config.getString("openId"));
+            String cityCode = String.valueOf(userInfo.getCityCode());
+            String citycodes=cityCode+"000000";
+            checkInfo.setCityCode(citycodes);
+            RSAPublicKey publicKey = RSAUtils.getPublicKey(config.getString("key"));
+            String data = RSAUtils.publicEncrypt(JSON.toJSONString(checkInfo), publicKey);
+            Request request= new Request();
+            request.setData(data);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck NanTongXingChengCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,request, String.class);
+            }catch (Exception e){
+                log.error("南通星辰准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck NanTongXingChengCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("result").equals("true")) {
+                redisUtil.set(String.format("zudai:token:%s:%s", "nantong", phoneMd5), jsonObject.getString("token"),1, TimeUnit.DAYS);
+                return DataVo.success(0, "南通星辰撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "南通星辰撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("南通星辰撞库失败", e);
+            return DataVo.fail(1, "南通星辰撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,87 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 06 13 43
+ **/
+@Slf4j
+@Service
+public class NiYouKeCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums  getType() {
+        return ServerCodeEnums.NiYouKe;
+    }
+    @Data
+    private static class CheckInfo{
+        private String channelcode;//渠道号
+        private String phone_md5;//手 机 号 md5 小 写
+        private String city;//申请人所在城市,如上海市
+        private String sign;//键按照升序组合,加上秘钥(URSolKiBSlcxUuAVtbEO)md5
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+            log.info("credit NiYouKeCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("尼优客对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPhone_md5(phoneMd5);
+            checkInfo.setCity(userInfo.getCityAllName());
+            checkInfo.setChannelcode(config.getString("channelCode"));
+            String sign="channelcode="+config.getString("channelCode")+"&city="+checkInfo.getCity()+"&phone_md5="+phoneMd5+config.getString("appKey");
+            checkInfo.setSign(Md5Util.encoderByMd5(sign));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck NiYouKeCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("尼优客准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck NiYouKeCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 200) {
+                return DataVo.success(0, "尼优客撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "尼优客撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("尼优客撞库失败", e);
+            return DataVo.fail(1, "尼优客撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,102 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 10 23 16 56
+ * 宁波天澄API对接
+ **/
+@Slf4j
+@Component
+public class NingBoTianChengCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.NingBoTianCheng;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile;//md5 的手机号
+        private String file_id;
+    }
+    @Data
+    private static class ResultHt{
+        private String code;
+        private String msg;
+        private JSONObject data;
+    }
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit NingBoTianChengCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("宁波天澄对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile(phoneMd5);
+            checkInfo.setFile_id(config.getString("file_id"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck NingBoTianChengCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("宁波天澄准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck NingBoTianChengCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "宁波天澄撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "宁波天澄撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("宁波天澄撞库失败", e);
+            return DataVo.fail(1, "宁波天澄撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,94 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 08 29 14 20
+ **/
+@Slf4j
+@Service
+public class OpenApiAesCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    private final static String IV="go9yPim47avSQZ8m";
+
+
+    @Data
+    private static class CheckInfo {
+        private String channelCode = "hrsk";
+
+        private String city;
+
+        private String phoneMd5;
+    }
+
+    @Data
+    private static class Result {
+        private Integer code;
+        private String msg;
+        private JSONObject data;
+    }
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
+        log.info("credit OpenApiAesCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+        try {
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+
+            String url = config.getString("checkUrl");
+
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(userInfo.getUserMobileMD5());
+            checkInfo.setCity(userInfo.getCompanyCity());
+            log.info("credit qualityCheck OpenApiAesCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            Result response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+            } catch (Exception e) {
+                log.error("OpenAPI准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck OpenApiAesCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            return Objects.equals(0, response.getCode()) && Objects.equals(0, response.getData().getInteger("status")) ?
+                   DataVo.success(0, "OpenAPI撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("OpenAPI撞库失败", e);
+            return DataVo.fail(1, "OpenAPI撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.OPEN_API_AES;
+    }
+
+}
+

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

@@ -0,0 +1,96 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/2/27
+ * @Version V1.0
+ **/
+@Slf4j
+@Service
+public class OpenApiCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    private final static String IV="go9yPim47avSQZ8m";
+
+
+    @Data
+    private static class CheckInfo {
+        private String channelCode = "hrsk";
+
+        private String city;
+
+        private String phoneMd5;
+    }
+
+    @Data
+    private static class Result {
+        private Integer code;
+        private String msg;
+        private JSONObject data;
+    }
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
+        log.info("credit OpenApiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+        try {
+            String config = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            JSONObject jsonObject = JSONObject.parseObject(config);
+            if (StringUtils.isAnyEmpty(jsonObject.getString("openapiCheckUrl"), jsonObject.getString("openapiAccessKeySecret"))) {
+                return DataVo.fail(product.getPlanName(), product.getPlanId());
+            }
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(userInfo.getUserMobileMD5());
+            checkInfo.setCity(userInfo.getCompanyCity());
+            String url = jsonObject.getString("openapiCheckUrl");
+            log.info("credit qualityCheck OpenApiCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            Result response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+            } catch (Exception e) {
+                log.error("OpenAPI准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck OpenApiCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            return Objects.equals(0, response.getCode()) && Objects.equals(0, response.getData().getInteger("status")) ?
+                    DataVo.success(0, "OpenAPI撞库成功", product.getPlanId())
+                    : DataVo.fail(response.getMsg(), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("OpenAPI撞库失败", e);
+            return DataVo.fail(1, "OpenAPI撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.OPEN_API;
+    }
+
+}

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

@@ -0,0 +1,141 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.time.Instant;
+import java.util.Base64;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 12 27 16 28
+ **/
+@Component
+@Slf4j
+public class PingDingShanCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.PingDingShan;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String partnerName;//合作⽅名称
+        private String channelId;//渠道号
+        private String serialNo;//请求流⽔号
+        private String requestData;//请求数据密⽂
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit PingDingShanCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("平顶山对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPartnerName("惠融易客");
+            checkInfo.setChannelId(config.getString("chanelId"));
+            String millisecondsSinceEpoch = String.valueOf(Instant.now().toEpochMilli());
+            checkInfo.setSerialNo("hryk"+millisecondsSinceEpoch);
+
+            JSONObject jsonObjects = new JSONObject() {{
+                put("anonymizer", "MASKED_MOBILE_2");
+                put("encryptValue", phoneMd5);
+            }};
+            checkInfo.setRequestData(encrypt(String.valueOf(jsonObjects),config.getString("publicKey")));
+            log.info("平顶山手机号{},加密前参数{},加密后参数{}",userInfo.getUserMobile(),jsonObjects,checkInfo);
+            String url = config.getString("checkUrl");
+            MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>();
+            params.add("partnerName", checkInfo.getPartnerName());
+            params.add("channelId", checkInfo.getChannelId());
+            params.add("serialNo", checkInfo.getSerialNo());
+            params.add("requestData", checkInfo.getRequestData());
+            log.info("credit qualityCheck PingDingShanCreditService 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();
+            }catch (Exception e){
+                log.error("平顶山准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck PingDingShanCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject.getInteger("code")==1) {
+                    return DataVo.success(0, "平顶山撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "平顶山撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("平顶山撞库失败", e);
+            return DataVo.fail(1, "平顶山撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+    // 加密
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+        if (sKey == null) {
+            System.out.print("Key为空null");
+            return null;
+        }
+        // 判断Key是否为16位
+        if (sKey.length() != 16) {
+            System.out.print("Key长度不是16位");
+            return null;
+        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        return Base64.getEncoder().encodeToString(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+    }
+
+    public static String getphonecrypt(String num){
+        char[] phoneArray = num.toCharArray();
+        // 将最后两位字符替换为星号
+        phoneArray[phoneArray.length - 2] = '*';
+        phoneArray[phoneArray.length - 1] = '*';
+        String maskedPhoneNumber = new String(phoneArray);
+       return maskedPhoneNumber;
+    }
+
+
+
+}

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

@@ -0,0 +1,161 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import com.hrsk.cloud.eg.infrastructure.utils.StringDecodeUtils;
+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.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/2/7
+ * @Version V1.0
+ **/
+@Slf4j
+@Component
+public class PingXunCreditService implements LoanDockingApi {
+
+
+    private final static String checkPath = "pull/common/warehouse";
+    private final static String applyPath = "pull/common/receive";
+
+    private final static String cityCodePath = "pull/get-code-by-name-status";
+
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Data
+    private static class ReqData {
+        private String channel;
+        private Long timestamp;
+        private String sign;
+        private String content;
+    }
+
+    @Data
+    private static class Result {
+
+        private Integer code;
+
+        private String msg;
+
+        private Object data;
+    }
+
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit PingXunCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("平讯对接参数:{}", JSON.toJSONString(config));
+
+//            LambdaQueryWrapper<XdUserBasicInfo> queryWrapper = new LambdaQueryWrapper<>();
+//            queryWrapper.eq(XdUserBasicInfo::getUserId, userInfo.getUserId());
+//            XdUserBasicInfo xdUserBasicInfo = this.xdUserBasicInfoMapper.selectOne(queryWrapper);
+
+//            String cityPath = config.getString("url") + cityCodePath;
+//            String cityCode = getCityCode(cityPath, xdUserBasicInfo.getCityOfWork());
+//
+//            ApplyInfo applyInfo = bulidInfo(userInfo, xdUserBasicInfo, userInfo.getBorrowMoney(), userInfo.getBorrowPurpose(), userInfo.getBorrowLimit());
+//            applyInfo.setProvince(Integer.parseInt(cityCode));
+//            applyInfo.setPhone(null);
+//            applyInfo.setId_card(null);
+//            applyInfo.setApply_name(null);
+//            log.info("平讯撞库业务数据:{}", JSON.toJSONString(applyInfo));
+
+            ReqData reqData = new ReqData() {{
+                setChannel(config.getString("channel"));
+                setContent(encrypt(userInfo.getUserMobileMD5(), config.getString("secret")));
+                Long timestamp = System.currentTimeMillis();
+                setSign(bulidSign(config, timestamp + ""));
+                setTimestamp(timestamp);
+            }};
+
+            String url = config.getString("url") + checkPath;
+            log.info("credit qualityCheck PingXunCreditService request userId:{}, url:{}, reqData:{}", userInfo.getUserId(), url, reqData);
+
+            ResponseEntity<String> response = null;
+            try {
+                HttpHeaders headers = new HttpHeaders();
+                headers.setContentType(MediaType.valueOf("application/json;UTF-8"));
+                HttpEntity<ReqData> entity = new HttpEntity(reqData, headers);
+                response = httpRestTemplate.restTemplate().postForEntity(url, entity, String.class);
+            } catch (Exception e) {
+                log.error("平讯准入异常,异常信息:{}", e.getMessage(), e);
+            }
+
+            log.info("credit qualityCheck PingXunCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+
+            JSONObject jsonObject = JSONObject.parseObject(StringDecodeUtils.decodeUnicode(response.getBody()));
+            if (200 == jsonObject.getInteger("status") && 1 == jsonObject.getJSONObject("data").getInteger("code")) {
+                return DataVo.success(0, "平讯撞库成功", product.getPlanId());
+            }
+            return DataVo.fail(jsonObject.getString("msg"), product.getPlanId());
+        } catch (Exception e) {
+            log.error("平讯撞库失败", e);
+            return DataVo.fail(1, "平讯撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.PingXun;
+    }
+
+    public String bulidSign(JSONObject config, String timestamp) {
+        String channel = config.getString("channel");
+        String secret = config.getString("secret");
+        return Md5Util.encoderByMd5(channel + timestamp + secret);
+    }
+    public static String encrypt(String content, String key) {
+        byte[] originalContent = content.getBytes(StandardCharsets.UTF_8);
+        String keys = key.substring(0, 16);
+        byte[] encryptKey = keys.getBytes();
+        try {
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            SecretKeySpec skeySpec = new SecretKeySpec(encryptKey,  "AES");
+            cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+            byte[] encrypted = cipher.doFinal(originalContent);
+            return Base64.encodeBase64String(encrypted);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+
+}

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

@@ -0,0 +1,43 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+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.loanMannager.threedocking.LoanDockingApi;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Author zhangyy
+ * @Date 2023 11 08.
+ * 用于处理所有不撞库的助贷相关逻辑
+ **/
+@Component
+@Slf4j
+public class PubNoCheckCreditService implements LoanDockingApi {
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.NoCheck;
+    }
+    /**
+     * 撞库 虚假的撞库   暂时直接返回成功,后续需要兼容排重包等功能
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfoCmd) {
+        log.info("虚假的助贷撞库请求参数 userInfo:{}  product:{}", userInfo, product);
+        String productName = "";
+        if (null != product && StringUtils.isNotBlank(product.getPlanName())){
+            productName = product.getPlanName();
+        }
+        return DataVo.success(0, productName+"撞库成功", product.getPlanId());
+    }
+}

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

@@ -0,0 +1,82 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author zjc
+ * @Date 2024 07 17 14 53
+ **/
+@Slf4j
+@Service
+public class QingDaoAoSengCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.QingDaoAoSen;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String code;
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+//            log.info("credit YunHaiLianDongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setCode((userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5()));
+
+            String url = config.getString("checkUrl");
+
+//            log.info("credit qualityCheck YunHaiLianDongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("青岛奥森准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck QingDaoAoSenCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+//            log.info("credit qualityCheck YunHaiLianDongCreditService response userId:{}, jsonObject:{}", userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 1) {
+                return DataVo.success(0, "青岛奥森撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "青岛奥森撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("青岛奥森撞库失败", e);
+            return DataVo.fail(1, "青岛奥森撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,81 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author zjc
+ * @Date 2024 07 17 14 53
+ **/
+@Slf4j
+@Component
+public class QingDaoAoSengV2CreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.QingDaoAoSenV2;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String code;
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+//            log.info("credit YunHaiLianDongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setCode((userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5()));
+
+            String url = config.getString("checkUrl");
+//            log.info("credit qualityCheck YunHaiLianDongCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("青岛奥森V2准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck QingDaoAoSenV2CreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+//            log.info("credit qualityCheck YunHaiLianDongCreditService response userId:{}, jsonObject:{}", userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 1) {
+                return DataVo.success(0, "青岛奥森V2撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "青岛奥森V2撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("青岛奥森撞库失败", e);
+            return DataVo.fail(1, "青岛奥森V2撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+}

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

@@ -0,0 +1,194 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 庆鱼API接单
+ */
+@Component
+@Slf4j
+public class QingyuCreditService implements LoanDockingApi {
+    private final String qualityCheckPath = "/openapi/interface/query/phones";
+    private final String applyPath = "/openapi/interface/save/customer";
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    public ServerCodeEnums getType() {
+        return null;
+    }
+
+    private String getSign(String data, String trafficPlatformId, String key) {
+        return Md5Util.encoderByMd5("data=" + data + "&trafficPlatformId=" + trafficPlatformId + key);
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return {"url":"http://apitest.shlyxxjs.com","key":"fluxZhudai*_key","tenantId":"1405729496904110081","trafficPlatformId":"13872425018351111"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
+        try {
+            log.info("credit QingyuCreditService qualityCheck begin...userId:{},productId={}", userInfo.getUserId(), product.getPlanId());
+            String configJson = HessianUtils.deserialize(configInfo.getRequestConfig()).toString();
+            if (StringUtils.isBlank(configJson)) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+
+            JSONObject config = JSONObject.parseObject(configJson);
+            log.info("庆鱼对接参数:{}", JSON.toJSONString(config));
+            CheckInfoReq checkInfo = new CheckInfoReq();
+            checkInfo.setData(JSON.toJSONString(new ArrayList<CheckInfoReq.CheckRequest>() {{
+                add(new CheckInfoReq.CheckRequest() {{
+                    setCustomers(new ArrayList<CustomersReq>() {{
+                        add(new CustomersReq(userInfo.getUserMobileMD5()));
+                    }});
+                    setTenantId(config.getString("tenantId"));
+                }});
+            }}));
+            checkInfo.setTrafficPlatformId(config.getString("trafficPlatformId"));
+            checkInfo.setSign(getSign(checkInfo.getData(), checkInfo.getTrafficPlatformId(), config.getString("key")));
+            String url = config.getString("url") + qualityCheckPath;
+            log.info("credit qualityCheck QingyuCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            ResultYq response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, ResultYq.class);
+            } catch (Exception e) {
+                log.error("【{}】-庆鱼准入异常,异常信息:{}", product.getPlanName(), e.getMessage(), e);
+            }
+            log.info("credit qualityCheck QingyuCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (response.getCode() == 200 && response.getSuccess() == true && response.getData().get(0).getCustomers().get(0).getStatus() == 0) {
+                return DataVo.success(0, "【" + product.getPlanName() + "】-庆鱼撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(response.getMsg(), product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("【{}】-庆鱼撞库失败", product.getPlanName(), e);
+            return DataVo.fail(1, "庆鱼撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+    @Data
+    private static class CheckInfoReq {
+        private String data;
+
+        private String sign;
+
+        private String trafficPlatformId;
+
+        @Data
+        static class CheckRequest {
+            private List<CustomersReq> customers;
+
+            private String tenantId;
+
+            @Data
+            @AllArgsConstructor
+            static class CustomersReq {
+                private String phone;
+            }
+        }
+    }
+
+    @Data
+    private static class ResultYq {
+        private Integer code;
+        private String msg;
+        private Boolean success;
+
+        private List<Result> data;
+
+        @Data
+        static class Result {
+            private List<CustomersRes> customers;
+
+            private String tenantId;
+
+            @Data
+            static class CustomersRes {
+                private String phone;
+                //0.成功 1.失败
+                private Integer status;
+            }
+        }
+    }
+
+    @Data
+    private static class ApplyInfo {
+
+        private String data;
+
+        private String sign;
+
+        private String trafficPlatformId;
+
+        @Data
+        static class ApplyRequest {
+
+            private List<CustomersReq> customers;
+
+            private String tenantId;
+
+            @Data
+            static class CustomersReq {
+
+                private String name;//姓名
+
+                private String phone;//电话
+
+                private String amount;//申请金额
+
+                private String car; //车产(有  无)
+
+                private String house; //房产(有  无)
+
+                private String age; //年龄
+
+                private String purpose;//贷款目的(消费贷款)
+
+                private String deadline;//贷款期限(6~12月)
+
+                private String social;//社保
+
+                private String accumulation;//公积金
+
+                private String insurance;//保险保单
+
+                private String points;//芝麻分
+
+                private String provinceCode;//省代码
+
+                private String cityCode;//市代码
+
+                private String resource;
+            }
+        }
+    }
+}

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

@@ -0,0 +1,153 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cglib.beans.BeanMap;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/5/8
+ * @Version V1.0
+ **/
+@Component
+@Slf4j
+public class QingyuV2CreditService implements LoanDockingApi {
+    private final String qualityCheckPath = "/access/phoneMd5Check";
+    private final String applyPath = "/access/customer";
+
+    private final String prefix = "/openapi";
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.CRM_QY_V2;
+    }
+
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return {"url":"http://apitest.shlyxxjs.com","key":"fluxZhudai*_key","tenantId":"1405729496904110081","trafficPlatformId":"13872425018351111"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfoCmd) {
+        try {
+            log.info("credit QingyuV2CreditService qualityCheck begin...userId:{},productId={}", userInfo.getUserId(), product.getPlanId());
+            byte[] requestConfig = configInfoCmd.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("庆鱼V2.0对接参数:{}", JSON.toJSONString(config));
+            V2Req checkInfo = new V2Req();
+            checkInfo.setAccessKey(config.getString("accessKey"));
+            checkInfo.setRequestId(UUID.randomUUID().toString());
+
+            JSONObject jsonObject = new JSONObject() {{
+                put("phone", userInfo.getUserMobileMD5());
+            }};
+            JSONArray dataArray = new JSONArray();
+            dataArray.add(jsonObject);
+            checkInfo.setData(dataArray);
+            String configUrl = config.getString("url");
+            String url;
+            if (configUrl.contains("qingyu3")) {
+                url = config.getString("url") + qualityCheckPath;
+            } else {
+                url = config.getString("url") + prefix + qualityCheckPath;
+            }
+
+            log.info("credit qualityCheck QingyuV2CreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            CheckInfoResp response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, CheckInfoResp.class);
+            } catch (Exception e) {
+                log.error("【{}】-庆鱼V2.0准入异常,异常信息:{}", product.getPlanName(), e.getMessage(), e);
+            }
+            log.info("credit qualityCheck QingyuV2CreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (response.getCode() == 200 && response.getSuccess() == true && response.getData().size() == 0) {
+                return DataVo.success(0, "【" + product.getPlanName() + "】-庆鱼V2.0撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(response.getMsg(), product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("【{}】-庆鱼V2.0撞库失败", product.getPlanName(), e);
+            return DataVo.fail(1, "庆鱼V2.0撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    public static <T> Map<String, Object> beanToMap(T bean) {
+        Map<String, Object> map = new HashMap<>();
+        if (bean != null) {
+            BeanMap beanMap = BeanMap.create(bean);
+            for (Object key : beanMap.keySet()) {
+                map.put(key + "", beanMap.get(key));
+            }
+        }
+        return map;
+    }
+
+
+    private String getSign(Map<String, Object> map) {
+        String text = "";
+        Iterator<Map.Entry<String, Object>> iterator = map.entrySet().iterator();
+        while (iterator.hasNext()) {
+            Map.Entry<String, Object> entry = iterator.next();
+            String value;
+            if (null == entry.getValue()) {
+                value = "";
+            } else {
+                value = (String) entry.getValue();
+            }
+            text = text + entry.getKey() + value;
+        }
+        return Md5Util.encoderByMd5(text).toUpperCase();
+    }
+
+
+    @Data
+    private static class V2Req {
+        private String requestId;
+
+        private String accessKey;
+
+        private JSONArray data;
+    }
+
+    @Data
+    private static class CheckInfoResp {
+        private Integer code;
+        private String msg;
+        private Boolean success;
+        private List<JSONObject> data;
+    }
+
+
+}

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

@@ -0,0 +1,143 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cglib.beans.BeanMap;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 09 06 15 31
+ **/
+@Component
+@Slf4j
+public class QingyuV3CreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums  getType() {
+        return ServerCodeEnums.CRM_QY_V3;
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return {
+     * 	"checkUrl": "http://36.111.70.93:804/qingyu3/access/phoneMd5Check",
+     * 	"applyUrl": "http://36.111.70.93:804/qingyu3/access/customer",
+     * 	"accessKey": "b71df3c8aff86fbd46b732a183e2d34c",
+     * 	"source": "中融闪贷",
+     * 	"publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjlJ/w9nHYEAJKseVHonypwWy1bDb0+8XXfPB9NSsgZxS8aLJVH2RqRNeKQNghDT+yg+YEst16XVlBng+o+4id0XT18vmoXBSfys7lImv7FMJiZx2Kac6lYrmoLmgJT3Dg4MQ10RApkPWKhRowicY9VPdlUSj8G1TEdwuhVe/ljwIDAQAB"
+     * }
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
+        try {
+            log.info("credit QingyuV3CreditService qualityCheck begin...userId:{},productId={}", userInfo.getUserId(), product.getPlanName());
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("庆鱼V3.0对接参数:{}", JSON.toJSONString(config));
+            V3Req checkInfo = new V3Req();
+            checkInfo.setAccessKey(config.getString("accessKey"));
+            checkInfo.setRequestId(UUID.randomUUID().toString());
+
+            JSONObject jsonObject = new JSONObject() {{
+                put("phone", userInfo.getUserMobileMD5());
+            }};
+            JSONArray dataArray = new JSONArray();
+            dataArray.add(jsonObject);
+            checkInfo.setData(dataArray);
+            String checkUrl = config.getString("checkUrl");
+
+            log.info("credit qualityCheck QingyuV3CreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), checkUrl, checkInfo);
+            CheckInfoResp response = null;
+            try {
+                response =httpRestTemplate.restTemplate().postForObject(checkUrl, checkInfo, CheckInfoResp.class);
+            } catch (Exception e) {
+                log.error("【{}】-庆鱼V3.0准入异常,异常信息:{}", product.getPlanName(), e.getMessage(), e);
+            }
+            log.info("credit qualityCheck QingyuV3CreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (response.getCode() == 200 && response.getSuccess() == true && response.getData().size()  == 0) {
+                return DataVo.success(0, "【" + product.getPlanName() + "】-庆鱼V3.0撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(response.getMsg(), product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("【{}】-庆鱼V3.0撞库失败", product.getPlanName(), e);
+            return DataVo.fail(1, "庆鱼V3.0撞库失败,请联系系统管理员", product.getPlanName());
+        }
+
+    }
+    public static <T> Map<String, Object> beanToMap(T bean) {
+        Map<String, Object> map = new HashMap<>();
+        if (bean != null) {
+            BeanMap beanMap = BeanMap.create(bean);
+            for (Object key : beanMap.keySet()) {
+                map.put(key + "", beanMap.get(key));
+            }
+        }
+        return map;
+    }
+
+
+    private String getSign(Map<String, Object> map) {
+        String text = "";
+        Iterator<Map.Entry<String, Object>> iterator = map.entrySet().iterator();
+        while (iterator.hasNext()) {
+            Map.Entry<String, Object> entry = iterator.next();
+            String value;
+            if (null == entry.getValue()) {
+                value = "";
+            } else {
+                value = (String) entry.getValue();
+            }
+            text = text + entry.getKey() + value;
+        }
+        return Md5Util.encoderByMd5(text).toUpperCase();
+    }
+
+
+    @Data
+    private static class V3Req {
+        private String requestId;
+
+        private String accessKey;
+
+        private JSONArray data;
+    }
+
+    @Data
+    private static class CheckInfoResp {
+        private Integer code;
+        private String msg;
+        private Boolean success;
+        private List<JSONObject> data;
+    }
+
+
+}
+

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

@@ -0,0 +1,130 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.util.Base64Utils;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESedeKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+import java.security.Key;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 24 15 25
+ **/
+@Slf4j
+@Service
+public class RongChuangJinFuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.RongChuangJinFu;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String mobile;// 手机号MD5
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RongChuangJinFuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("融创金服对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMobile(phoneMd5);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck RongChuangJinFuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("融创金服准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RongChuangJinFuCreditService response userId:{}, result:{}",phoneMd5, response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("0")&&jsonObject.getBoolean("data")) {
+                return DataVo.success(0, "融创金服撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "融创金服撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("融创金服撞库失败", e);
+            return DataVo.fail(1, "融创金服撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+    public static String encode(String plainText, String secretKey, String iv) {
+        String result = null;
+        try {
+            DESedeKeySpec deSedeKeySpec = new DESedeKeySpec(secretKey.getBytes());
+            SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("desede");
+            Key desKey = secretKeyFactory.generateSecret(deSedeKeySpec);
+            Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding");
+            IvParameterSpec ips = new IvParameterSpec(iv.getBytes());
+            cipher.init(Cipher.ENCRYPT_MODE, desKey, ips);
+            byte[] encryptData = cipher.doFinal(plainText.getBytes("UTF-8"));
+            result = Base64Utils.encodeToString(encryptData);
+        } catch (Exception e) {
+            log.error("DesCbcUtil encode error : {}", e);
+        }
+        return result;
+    }
+
+    /**
+     * 3DES解密
+     *
+     * @param encryptText 加密文本
+     * @return 解密后明文,失败返回null
+     */
+    public static String decode(String encryptText, String secretKey, String iv) {
+        String result = null;
+        try {
+            DESedeKeySpec spec = new DESedeKeySpec(secretKey.getBytes());
+            SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("desede");
+            Key desKey = secretKeyFactory.generateSecret(spec);
+            Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding");
+            IvParameterSpec ips = new IvParameterSpec(iv.getBytes());
+            cipher.init(Cipher.DECRYPT_MODE, desKey, ips);
+            byte[] decryptData = cipher.doFinal(Base64Utils.decodeFromString(encryptText));
+            result = new String(decryptData, "UTF-8");
+        } catch (Exception e) {
+            log.error("DesCbcUtil decode error : {}", e.getMessage());
+        }
+        return result;
+    }
+
+
+}

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

@@ -0,0 +1,139 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 11 03 17 31
+ **/
+@Slf4j
+@Service
+public class RongXiangDaChangShaCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.RongXiangDaChangSha;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phoneMd5;//md5 的手机号
+        private String accessKey;//渠道访问密钥
+        private String sourceCode;//渠道标识
+    }
+
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {
+     * 	"checkUrl": "http://test-gw.xxb888.com/xxb-filter/api/filter/md5",
+     * 	"applyUrl": "http://test-gw.xxb888.com/xxb/api/source/clue_data/consumer",
+     * 	"accesskey": "3465D5B2-1D08-4875-B7E7-E1DAA9385530",
+     * 	"sourcecode": "10986",
+     * 	"key": "BFXC7JM1OG35XDVR",
+     * 	"iv": "67P0VGV0AXUM9NH5"
+     * }
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RongXiangDaChangShaCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("融享达长沙对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? convertMD5ToUpperCase(Md5Util.encoderByMd5(userInfo.getUserMobile())) : convertMD5ToUpperCase(userInfo.getUserMobileMD5());
+            checkInfo.setPhoneMd5(phoneMd5);
+            checkInfo.setAccessKey(config.getString("accesskey"));
+            checkInfo.setSourceCode(config.getString("sourcecode"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck RongXiangDaChangShaCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("融享达长沙准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RongXiangDaChangShaCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 1 && jsonObject.getJSONObject("data")!=null && jsonObject.getJSONObject("data").getBoolean("phoneMd5Exist").equals(false)) {
+                return DataVo.success(0, "融享达长沙撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "融享达长沙撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("融享达长沙撞库失败", e);
+            return DataVo.fail(1, "融享达长沙撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    public static String convertMD5ToUpperCase(String md5Hash) {
+        if (md5Hash == null || md5Hash.length() == 0) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < md5Hash.length(); i++) {
+            char c = md5Hash.charAt(i);
+            if (Character.isLowerCase(c)) {
+                sb.append(Character.toUpperCase(c));
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+    public static String encrypt(String plainText, String key, String iv) throws Exception {
+        // 将 key 转换为 SecretKey 对象
+        SecretKey secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+        // 将 IV 字符串转换为字节数组
+        byte[] ivBytes = iv.getBytes(StandardCharsets.UTF_8);
+        // 生成 IV
+        // 创建 Cipher 对象
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(ivBytes));
+        // 加密明文
+        byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8));
+        // 将加密后的字节转换为 Base64 编码
+        return Base64.getEncoder().encodeToString(encryptedBytes);
+    }
+
+}

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

@@ -0,0 +1,141 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 01 14 26
+ **/
+@Slf4j
+@Service
+public class RongXiangKeBuShuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.RongXiangKeBuShu;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phoneMd5;//md5 的手机号
+        private String sourceCode;//渠道标识
+    }
+
+
+
+
+    /**
+     * 助贷对接撞库模板1,标准流程,post请求,application/json,参数直接传对象
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {
+     * 	"checkUrl": "http://test-gw.xxb888.com/xxb-filter/api/filter/md5",
+     * 	"applyUrl": "http://test-gw.xxb888.com/xxb/api/source/clue_data/consumer",
+     * 	"accesskey": "3465D5B2-1D08-4875-B7E7-E1DAA9385530",
+     * 	"sourcecode": "10986",
+     * 	"key": "BFXC7JM1OG35XDVR",
+     * 	"iv": "67P0VGV0AXUM9NH5"
+     * }
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RongXiangKeBuShuCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("融享客部署模式对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? convertMD5ToUpperCase(Md5Util.encoderByMd5(userInfo.getUserMobile())) : convertMD5ToUpperCase(userInfo.getUserMobileMD5());
+            checkInfo.setPhoneMd5(phoneMd5);
+            checkInfo.setSourceCode(config.getString("sourcecode"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck RongXiangKeBuShuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("融享客部署模式准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RongXiangKeBuShuCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 1 && jsonObject.getJSONObject("data")!=null && jsonObject.getJSONObject("data").getBoolean("phoneMd5Exist").equals(false)) {
+                return DataVo.success(0, "融享客部署模式撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "融享客部署模式撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("融享客部署模式撞库失败", e);
+            return DataVo.fail(1, "融享客部署模式撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    public static String convertMD5ToUpperCase(String md5Hash) {
+        if (md5Hash == null || md5Hash.length() == 0) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < md5Hash.length(); i++) {
+            char c = md5Hash.charAt(i);
+            if (Character.isLowerCase(c)) {
+                sb.append(Character.toUpperCase(c));
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+    public static String encrypt(String plainText, String key, String iv) throws Exception {
+        // 将 key 转换为 SecretKey 对象
+        SecretKey secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+        // 将 IV 字符串转换为字节数组
+        byte[] ivBytes = iv.getBytes(StandardCharsets.UTF_8);
+        // 生成 IV
+        // 创建 Cipher 对象
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(ivBytes));
+        // 加密明文
+        byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8));
+        // 将加密后的字节转换为 Base64 编码
+        return Base64.getEncoder().encodeToString(encryptedBytes);
+    }
+}

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

@@ -0,0 +1,139 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 03 19 15 54
+ **/
+@Slf4j
+@Component
+public class RongXiangKeV2CreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.RongXiangKeV2;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phoneMd5;//md5 的手机号
+        private String accessKey;//渠道访问密钥
+        private String sourceCode;//渠道标识
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {
+     * 	"checkUrl": "http://test-gw.xxb888.com/xxb-filter/api/filter/md5",
+     * 	"applyUrl": "http://test-gw.xxb888.com/xxb/api/source/clue_data/consumer",
+     * 	"accesskey": "3465D5B2-1D08-4875-B7E7-E1DAA9385530",
+     * 	"sourcecode": "10986",
+     * 	"key": "BFXC7JM1OG35XDVR",
+     * 	"iv": "67P0VGV0AXUM9NH5"
+     * }
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RongXiangKeV2CreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("融享客V2对接参数:{}", JSONObject.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? convertMD5ToUpperCase(Md5Util.encoderByMd5(userInfo.getUserMobile())) : convertMD5ToUpperCase(userInfo.getUserMobileMD5());
+            checkInfo.setPhoneMd5(phoneMd5);
+            checkInfo.setAccessKey(config.getString("accesskey"));
+            checkInfo.setSourceCode(config.getString("sourcecode"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck RongXiangKeV2CreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("融享客V2准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RongXiangKeV2CreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 1 && jsonObject.getJSONObject("data")!=null && jsonObject.getJSONObject("data").getBoolean("phoneMd5Exist").equals(false)) {
+                return DataVo.success(0, "融享客V2撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "融享客V2撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("融享客V2撞库失败", e);
+            return DataVo.fail(1, "融享客V2撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+    private static String convertMD5ToUpperCase(String md5Hash) {
+        if (md5Hash == null || md5Hash.length() == 0) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < md5Hash.length(); i++) {
+            char c = md5Hash.charAt(i);
+            if (Character.isLowerCase(c)) {
+                sb.append(Character.toUpperCase(c));
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+    public static String encrypt(String plainText, String key, String iv) throws Exception {
+        // 将 key 转换为 SecretKey 对象
+        SecretKey secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+        // 将 IV 字符串转换为字节数组
+        byte[] ivBytes = iv.getBytes(StandardCharsets.UTF_8);
+        // 生成 IV
+        // 创建 Cipher 对象
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(ivBytes));
+        // 加密明文
+        byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8));
+        // 将加密后的字节转换为 Base64 编码
+        return Base64.getEncoder().encodeToString(encryptedBytes);
+    }
+
+}
+

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

@@ -0,0 +1,129 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+import java.util.Date;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 18 11 35
+ **/
+@Slf4j
+@Service
+public class RongYiDaCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.RongYiDa;
+    }
+
+    //撞库
+    @Data
+    private static class CheckInfo {
+        private String phoneNo;//md5 的手机号
+
+    }
+
+    @Data
+    private static class RquestParam {
+        private String data;
+        private String merchantNo;
+        private String timestamp;
+        private String reqId;
+
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RongYiDaCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("融易达对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneNo(phoneMd5);
+            RquestParam requestParam=new RquestParam();
+            requestParam.setTimestamp(DateUtil.getFormatDate(new Date(), "yyyy-MM-dd HH:mm:ss"));
+            requestParam.setData(encrypt( config.getString("key"),config.getString("iv"),JSON.toJSONString(checkInfo)));
+            requestParam.setReqId(config.getString("reqId"));
+            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;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, requestParam, String.class);
+            } catch (Exception e) {
+                log.error("融易达准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RongYiDaCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("dealStatus").equals("0000")) {
+                return DataVo.success(0, "融易达撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "融易达撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("融易达撞库失败", e);
+            return DataVo.fail(1, "融易达撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    public static String encrypt(String key, String initVector, String value) throws Exception {
+        IvParameterSpec iv = new IvParameterSpec(initVector.getBytes(StandardCharsets.UTF_8));
+        SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
+
+        byte[] encrypted = cipher.doFinal(value.getBytes());
+        return Base64.getEncoder().encodeToString(encrypted);
+    }
+
+    public static String decrypt(String key, String initVector, String encrypted) throws Exception {
+        IvParameterSpec iv = new IvParameterSpec(initVector.getBytes(StandardCharsets.UTF_8));
+        SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
+        cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
+
+        byte[] original = cipher.doFinal(Base64.getDecoder().decode(encrypted));
+
+        return new String(original);
+    }
+}

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

@@ -0,0 +1,84 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+
+import javax.annotation.Resource;
+
+
+/**
+ * 融客贷API接单
+ */
+@Service
+@Slf4j
+public class RongkedaiCreditService implements LoanDockingApi {
+
+    private final String qualityCheckPath = "/admin/pushApi/check_mobile";
+    private final String applyPath = "/admin/pushApi/import_tttg";
+
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Rongkedai;
+    }
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {"url":"http://47.106.81.101:8811"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RongkedaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            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;
+            try{
+                HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
+                response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class);
+            }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) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            return JSON.parseObject(response.getBody()).getInteger("code") ==0 ? DataVo.success(0, "融客贷撞库成功", product.getPlanId())
+                    : DataVo.fail("撞库失败", product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("融客贷撞库失败", e);
+            return DataVo.fail(1, "融客贷撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

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

@@ -0,0 +1,380 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
+import java.security.*;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.Random;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/2/8
+ * @Version V1.0
+ **/
+@Service
+@Slf4j
+public class RongshengCreditService implements LoanDockingApi {
+
+    private final static String checkPath = "ad/h5/tripartite/v1/cs2";
+    private final static String applyPath = "ad/h5/tripartite/v1/ps";
+
+    private final static String RedisKey = "Rongsheng:api:%s";
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Data
+    private static class CheckInfo {
+        private String channelCode;
+        private String bizData;
+        private String miAesKey;
+    }
+
+    @Data
+    private static class Result {
+        private Integer code;
+        private String msg;
+        private JSONObject data;
+        private Long timestamp;
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RongshengCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("荣晟对接参数:{}", JSON.toJSONString(config));
+            String md5Phone = userInfo.getUserMobileMD5();
+            String aesKey = AesUtil.getKey();
+            String miAesKey = RsaUtil.encryptByPublicKey(aesKey, config.getString("publicKey"));
+            String bizData = AesUtil.encrypt(md5Phone, aesKey);
+
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setBizData(bizData);
+            checkInfo.setMiAesKey(miAesKey);
+            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;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+            } catch (Exception e) {
+                log.error("荣晟准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RongshengCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+
+            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 userRedisKey = String.format(RedisKey, md5Phone);
+                redisUtil.set(userRedisKey, applyId + "_" + key, 300, TimeUnit.SECONDS);
+                return DataVo.success(0, "荣晟撞库成功", product.getPlanId());
+            }
+
+            return DataVo.fail(response.getMsg(), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("荣晟撞库失败", e);
+            return DataVo.fail(1, "荣晟撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.RongSheng;
+    }
+
+    public static class AesUtil {
+
+        /**
+         * 加密
+         *
+         * @param sSrc 加密数据
+         * @param sKey aeskey
+         * @return : java.lang.String
+         * @date : 2021/3/30
+         */
+        public static String encrypt(String sSrc, String sKey) throws Exception {
+            if (sKey == null) {
+                return null;
+            }
+            // 判断 Key 是否为 16 位
+            if (sKey.length() != 16) {
+                return null;
+            }
+
+            byte[] raw = sKey.getBytes("utf-8");
+            SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+            // "算法/模式/补码方式"
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+            byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+            // 此处使用 BASE64 做转码功 能,同时能起到 2 次加密的作用。
+            return new Base64().encodeToString(encrypted);
+        }
+
+        /**
+         * 解密
+         *
+         * @param sSrc 加密数据
+         * @param sKey aeskey
+         * @return : java.lang.String
+         * @date : 2021/3/30
+         */
+        public static String decrypt(String sSrc, String sKey) throws Exception {
+            try {
+                // 判断 Key 是否正确
+                if (sKey == null) {
+                    return null;
+                }
+                // 判断 Key 是否为 16 位
+                if (sKey.length() != 16) {
+                    return null;
+                }
+                byte[] raw = sKey.getBytes("utf-8");
+                SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+                Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+                cipher.init(Cipher.DECRYPT_MODE, skeySpec);
+                // 先用 base64 解密
+                byte[] encrypted1 = new Base64().decode(sSrc);
+                try {
+                    byte[] original = cipher.doFinal(encrypted1);
+                    return new String(original, "utf-8");
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    return null;
+                }
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                return null;
+            }
+        }
+
+        /**
+         * 获取key
+         */
+        public static String getKey() {
+            StringBuilder uid = new StringBuilder();
+            //产生16位的强随机数
+            Random rd = new SecureRandom();
+            for (int i = 0; i < 16; i++) {
+                //产生0-2的3位随机数
+                int type = rd.nextInt(3);
+                switch (type) {
+                    case 0:
+                        //0-9的随机数
+                        uid.append(rd.nextInt(10));
+                        break;
+                    case 1:
+                        //ASCII在65-90之间为大写,获取大写随机
+                        uid.append((char) (rd.nextInt(25) + 65));
+                        break;
+                    case 2:
+                        //ASCII在97-122之间为小写,获取小写随机
+                        uid.append((char) (rd.nextInt(25) + 97));
+                        break;
+                    default:
+                        break;
+                }
+            }
+            return uid.toString();
+        }
+    }
+
+
+    public static class RsaUtil {
+
+        private static final String KEY_ALGORITHM = "RSA";
+        public static final String DEFAULT_ALGORITHM = "MD5withRSA";
+        private static final String DEFAULT_ENCODING = "UTF-8";
+
+        public static String sign(String privateKey, String dataSrc) {
+            return sign(privateKey, dataSrc, DEFAULT_ALGORITHM);
+        }
+
+        /**
+         * 签名
+         *
+         * @param privateKey:私钥
+         * @param dataSrc:源
+         * @param algorithm:签名算法
+         * @return 签名
+         */
+        public static String sign(
+                String privateKey,
+                String dataSrc,
+                String algorithm
+        ) {
+            try {
+                PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(
+                        Base64.decodeBase64(privateKey)
+                );
+                KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
+                PrivateKey myPrivateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec);
+                Signature signature = Signature.getInstance(algorithm);
+                signature.initSign(myPrivateKey);
+                signature.update(dataSrc.getBytes(DEFAULT_ENCODING));
+                byte[] signed = signature.sign();
+                return Base64.encodeBase64String(signed);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            return null;
+        }
+
+        /**
+         * 签名验证
+         *
+         * @param publicKey:公钥
+         * @param dataSrc:源
+         * @param sign:签名结果串
+         * @return 验签结果
+         */
+        public static boolean checkSign(
+                String publicKey,
+                String dataSrc,
+                String sign
+        ) throws Exception {
+            X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(
+                    Base64.decodeBase64(publicKey)
+            );
+            KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
+            PublicKey myPublicKey = keyFactory.generatePublic(x509EncodedKeySpec);
+            byte[] signed = Base64.decodeBase64(sign);
+            Signature signature = Signature.getInstance(
+                    DEFAULT_ALGORITHM
+            );
+            signature.initVerify(myPublicKey);
+            signature.update(dataSrc.getBytes(DEFAULT_ENCODING));
+            return signature.verify(signed);
+        }
+
+        private static PublicKey getPublicKey(String idRsaPub) throws NoSuchAlgorithmException, InvalidKeySpecException {
+            X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(
+                    Base64.decodeBase64(idRsaPub)
+            );
+            KeyFactory keyFactory;
+            keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
+            return keyFactory.generatePublic(x509EncodedKeySpec);
+        }
+
+        private static PrivateKey getPrivateKey(String idRsa) throws NoSuchAlgorithmException, InvalidKeySpecException {
+            PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(
+                    Base64.decodeBase64(idRsa)
+            );
+            KeyFactory keyFactory1;
+            keyFactory1 = KeyFactory.getInstance(KEY_ALGORITHM);
+            return keyFactory1.generatePrivate(pkcs8EncodedKeySpec);
+        }
+
+        private static byte[] decryptByPrivateKey(byte[] encryptedData, String idRsa)
+                throws Exception {
+            Cipher cipher = Cipher.getInstance(KEY_ALGORITHM);
+            cipher.init(2, getPrivateKey(idRsa));
+            int inputLen = encryptedData.length;
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            int offSet = 0;
+
+            for (int i = 0; inputLen - offSet > 0; offSet = i * 256) {
+                byte[] cache;
+                if (inputLen - offSet > 256) {
+                    cache = cipher.doFinal(encryptedData, offSet, 256);
+                } else {
+                    cache = cipher.doFinal(encryptedData, offSet, inputLen - offSet);
+                }
+
+                out.write(cache, 0, cache.length);
+                ++i;
+            }
+
+            byte[] decryptedData = out.toByteArray();
+            out.close();
+            return decryptedData;
+        }
+
+        public static String decryptByPrivateKey(String data, String idRsa) throws Exception {
+            byte[] encryptedData = Base64.decodeBase64(data);
+            byte[] result = decryptByPrivateKey(encryptedData, idRsa);
+            if (result == null) {
+                return null;
+            }
+            return new String(result, StandardCharsets.UTF_8);
+        }
+
+        public static String encryptByPublicKey(String data, String idRsaPub) throws Exception {
+            byte[] encryptedData = data.getBytes(StandardCharsets.UTF_8);
+            byte[] result = encryptByPublicKey(encryptedData, idRsaPub);
+            if (result == null) {
+                return null;
+            }
+            return Base64.encodeBase64String(result);
+        }
+
+        private static byte[] encryptByPublicKey(byte[] data, String idRsaPub)
+                throws Exception {
+            PublicKey publicKey = getPublicKey(idRsaPub);
+            Cipher cipher = Cipher.getInstance(publicKey.getAlgorithm());
+            cipher.init(1, publicKey);
+            int inputLen = data.length;
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            int offSet = 0;
+
+            for (int i = 0; inputLen - offSet > 0; offSet = i * 244) {
+                byte[] cache;
+                if (inputLen - offSet > 244) {
+                    cache = cipher.doFinal(data, offSet, 244);
+                } else {
+                    cache = cipher.doFinal(data, offSet, inputLen - offSet);
+                }
+
+                out.write(cache, 0, cache.length);
+                ++i;
+            }
+            byte[] encryptedData = out.toByteArray();
+            out.close();
+            return encryptedData;
+        }
+    }
+
+
+}

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

@@ -0,0 +1,150 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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 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;
+
+import javax.annotation.Resource;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.*;
+
+/**
+ * 荣西子API接单
+ */
+@Service
+@Slf4j
+public class RongxiziCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    private final String qualityCheckPath = "https://admin.qxd-wh.com/home/Api/checkTel";
+
+    private final String applyPath = "http://47.111.167.41:8009/customer/import";
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Rongxizi;
+    }
+
+
+    @Data
+    private static class ResultHt{
+        private String code;
+        private String msg;
+    }
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     * {"token":"UWDSdzJHCq3KnrLwuBaPBBGX8Hs0oEY3","vender_name":"birong","appid":"20076","appkey":"05xduuQdn6r46giJji91aXDlzEeOT5Be"}
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+            log.info("credit RongxiziCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            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;
+            try{
+                ResponseEntity<String> responseEntity = httpRestTemplate.restTemplate().postForEntity(url, requestBody, String.class);
+                res = responseEntity.getBody();
+            }catch (Exception e){
+                log.error("荣西子准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            if (res == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject result = JSONObject.parseObject(res);
+            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 ) {
+                    return DataVo.success(0, "荣西子撞库成功", product.getPlanId());
+                }
+            }
+            return DataVo.fail(1, result.getString("message"), product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("荣西子撞库失败", e);
+            return DataVo.fail(1, "荣西子撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    private static String buildPreSign(Map map){
+
+        //将参数转换为map
+
+        Set<String> keys = map.keySet();
+        List<String> list = new ArrayList<>();
+        for (String key : keys) {
+            if(!StringUtils.isEmpty(map.get(key))){
+                list.add(key);
+            }
+        }
+        //排序key
+        Collections.sort(list);
+        //遍历封装排序后key的list,拼接字符串
+        StringBuilder sb = new StringBuilder("");
+        for (int i=0;i<list.size();i++) {
+            if (i==0){
+                sb.append(list.get(i)).append("=").append(map.get(list.get(i)));
+            }else {
+                sb.append("&");
+                sb.append(list.get(i)).append("=").append(map.get(list.get(i)));
+            }
+
+        }
+        return sb.toString();
+    }
+
+    private static String sha1(String text){
+
+        // 获取指定摘要算法的messageDigest对象
+        MessageDigest messageDigest = null; // 此处的sha代表sha1
+        try {
+            messageDigest = MessageDigest.getInstance("SHA");
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        }
+
+        // 调用digest方法,进行加密操作
+        byte[] cipherBytes = messageDigest.digest(text.getBytes());
+
+        return Hex.encodeHexString(cipherBytes);
+    }
+}

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

@@ -0,0 +1,90 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 10 12 10 44
+ * 润美API
+ **/
+@Slf4j
+@Service
+public class RunMeiXinYiRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.RunMei;
+    }
+    @Data
+    private static class CheckInfo{
+        private String channelcode;//渠道号
+        private String phone_md5;//手 机 号 md5 小 写
+        private String city;//申请人所在城市,如上海市
+        private String sign;//键按照升序组合,加上秘钥(URSolKiBSlcxUuAVtbEO)md5
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit RunMeiXinYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("润美对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPhone_md5(phoneMd5);
+            checkInfo.setCity(userInfo.getCityAllName());
+            checkInfo.setChannelcode(config.getString("channelCode"));
+            String sign="channelcode="+config.getString("channelCode")+"&city="+userInfo.getCityAllName()+"&phone_md5="+phoneMd5+config.getString("appKey");
+
+            checkInfo.setSign(Md5Util.encoderByMd5(sign));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck RunMeiXinYiRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("润美准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RunMeiXinYiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 200) {
+                return DataVo.success(0, "润美撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "润美撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("润美撞库失败", e);
+            return DataVo.fail(1, "润美撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,116 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/4/17
+ * @Version V1.0
+ **/
+@Slf4j
+@Service
+public class RxkCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    private final static String CHECK_URL="/xxb-filter/api/filter/md5";
+    private final static String REGISTER_URL="/xxb/api/source/clue_data/consumer";
+
+
+    private final static String CHECK_URL_PRIVATE="/youka/api/user_filter/md5";
+    private final static String REGISTER_URL_PRIVATE="/youka/api/clue_data/accept";
+
+
+    @Data
+    private static class CheckInfo {
+        private String sourceCode;
+
+        private String accessKey;
+
+        private String phoneMd5;
+    }
+
+    @Data
+    private static class Result {
+        private Integer code;
+        private String msg;
+        private JSONObject data;
+        private boolean success;
+    }
+
+    @Data
+    private static class ResultRegister {
+        private String code;
+        private String msg;
+        private String data;
+        private boolean success;
+    }
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
+        log.info("credit RxkCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+        try {
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("融享客对接参数:{}", JSON.toJSONString(config));
+
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setPhoneMd5(userInfo.getUserMobileMD5());
+            checkInfo.setSourceCode(config.getString("sourceCode"));
+            checkInfo.setAccessKey(config.getString("accessKey"));
+            String url;
+            if(null !=config.get("private") && config.getBoolean("private")){
+                url = config.getString("domain")+CHECK_URL_PRIVATE;
+            }else {
+                url = config.getString("domain")+CHECK_URL;
+            }
+            log.info("credit qualityCheck RxkCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            Result response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, Result.class);
+            } catch (Exception e) {
+                log.error("融享客准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck RxkCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            return
+                    Objects.equals(1, response.getCode())
+                            && Objects.equals(true, response.isSuccess())
+                            && Objects.equals(false, response.getData().getBoolean("phoneMd5Exist")) ?
+                            DataVo.success(0, "融享客撞库成功", product.getPlanId())
+                            : DataVo.fail("融享客-"+product.getPlanName()+"撞库失败", product.getPlanId());
+
+        } catch (Exception e) {
+            log.error("融享客撞库失败", e);
+            return DataVo.fail(1, "融享客撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.CRM_RXK;
+    }
+
+}

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

@@ -0,0 +1,157 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.util.HashMap;
+import java.util.Map;
+/**
+ * @Author Liu Tao
+ * @Date 2023 09 18 13 40
+ **/
+@Slf4j
+@Service
+public class ShanDongBangBangDaiCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShanDongBangBangDai;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile_md5;//md5 的手机号
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ShanDongBangBangDaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("山东帮帮代对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile_md5(phoneMd5);
+            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;
+            try{
+                response =httpRestTemplate.restTemplate().getForObject(url, String.class);
+            }catch (Exception e){
+                log.error("山东帮帮代准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShanDongBangBangDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "山东帮帮代撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "山东帮帮代撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("山东帮帮代撞库失败", e);
+            return DataVo.fail(1, "山东帮帮代撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+    public static class AESUtil {
+
+        // mode_key:Cipher
+        private static final Map<String, Cipher> CIPHERMAP_MAP = new HashMap<String, Cipher>();
+
+        // constants
+        private static final String DEFAULT_CHARSET = "utf-8";
+        private static final String ALGORITHM_NAME = "AES";
+        private static final String ALGORITHM_STR = ALGORITHM_NAME + "/CBC/PKCS5Padding";
+        private static final String IV = "0000000000000000";
+
+        /**
+         * get cipher
+         *
+         * @param mode
+         * @param key
+         * @param charset
+         * @return
+         * @throws Exception
+         */
+        private static Cipher getCipher(int mode, String key, String charset) throws Exception {
+            Cipher cipher = CIPHERMAP_MAP.get(mode + "_" + key);
+            if (cipher != null) {
+                return cipher;
+            }
+
+            // secretKeySpec
+            SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(charset), ALGORITHM_NAME);
+            // ivParameterSpec
+            IvParameterSpec ivParameterSpec = new IvParameterSpec(IV.getBytes(charset));
+            // cipher
+            cipher = Cipher.getInstance(ALGORITHM_STR);
+            cipher.init(mode, secretKeySpec, ivParameterSpec);
+            // return
+            CIPHERMAP_MAP.put(mode + "_" + key, cipher);
+            return cipher;
+        }
+
+        public static String encrypt(String a, String key, String charset) throws Exception {
+            Cipher cipher = getCipher(Cipher.ENCRYPT_MODE, key, charset);
+            byte[] resultByte = cipher.doFinal(a.getBytes(charset));
+            return base64BytesToString(resultByte, charset);
+        }
+
+        public static String encrypt(String a, String key) throws Exception {
+            return encrypt(a, key, DEFAULT_CHARSET);
+        }
+
+        public static String decrypt(String a, String key, String charset) throws Exception {
+            Cipher cipher = getCipher(Cipher.DECRYPT_MODE, key, charset);
+            byte[] inputByte = base64stringToBytes(a, charset);
+            byte[] resultByte = cipher.doFinal(inputByte);
+            return new String(resultByte, charset);
+        }
+
+        public static String decrypt(String a, String key) throws Exception {
+            return decrypt(a, key, DEFAULT_CHARSET);
+        }
+
+        private static String base64BytesToString(byte[] bytes, String charset) throws Exception {
+            return new String(Base64.encodeBase64(bytes), charset);
+        }
+
+        private static byte[] base64stringToBytes(String string, String charset) throws Exception {
+            return Base64.decodeBase64(string.getBytes(charset));
+        }
+
+
+    }
+}

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

@@ -0,0 +1,126 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 11 01 17 49
+ **/
+@Slf4j
+@Service
+public class ShanXiHengShengDaiCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShanXiHengSheng;
+    }
+    @Data
+    private static class CheckInfo{
+        private String md5mobile;//md5 的手机号
+        private String brand;//品牌对应数字(比如 6)
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+    {
+    "checkUrl": "https://www2.zhudaicms.com/sem/check_canindb.html",
+    "applyUrl": "https://www2.zhudaicms.com/sem/loan_do_aes_cbc_new.html",
+    "source": "hsjf-hryk",
+    "brand": "609",
+    "publickey": "zhudai#aes#cbc#1",
+    "iv": "2022042215123456"
+    }
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ShanXiHengShengDaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("山西恒昇对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMd5mobile(phoneMd5);
+            checkInfo.setBrand(config.getString("brand"));
+            String url = config.getString("checkUrl");
+            MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>();
+            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;
+            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();
+            }catch (Exception e){
+                log.error("山西恒昇准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShanXiHengShengDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            if (response.equals("1")) {
+                return DataVo.success(0, "山西恒昇撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "山西恒昇撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("山西恒昇撞库失败", e);
+            return DataVo.fail(1, "山西恒昇撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    public static String encrypt(String plainText, String key, String iv) throws Exception {
+        // 将 key 转换为 SecretKey 对象
+        SecretKey secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
+        // 将 IV 字符串转换为字节数组
+        byte[] ivBytes = iv.getBytes(StandardCharsets.UTF_8);
+        // 生成 IV
+        // 创建 Cipher 对象
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(ivBytes));
+        // 加密明文
+        byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8));
+        // 将加密后的字节转换为 Base64 编码
+        return Base64.getEncoder().encodeToString(encryptedBytes);
+    }
+}

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

@@ -0,0 +1,122 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 22 14 13
+ **/
+@Service
+@Slf4j
+public class ShanXiMingDePuHuiCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShanXiMingDePuHui;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String tel;// 明文电话号码Md5加密值(小写),用于判断是否重复
+    }
+
+
+
+    @Data
+    private static class RequestData {
+
+        private String data;
+        private String source;
+        private String sourceName;
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ShanXiMingDePuHuiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("陕西明德普惠对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = config.getString("checkUrl");
+
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setTel(phoneMd5);
+
+            log.info("credit qualityCheck ShanXiMingDePuHuiCreditService request userId:{}, url:{}, CheckInfo:{}", userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("陕西明德普惠准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShanXiMingDePuHuiCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code").equals(200) && jsonObject.getBoolean("isSuccess")) {
+                return DataVo.success(0, "陕西明德普惠撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "陕西明德普惠撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("陕西明德普惠撞库失败", e);
+            return DataVo.fail(1, "陕西明德普惠撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    /**
+     * AES 加密
+     *
+     * @param str 待加密内容
+     * @param key 加密key
+     * @return 加密内容
+     */
+    public static String encryptAES(String str, String key) {
+        try {
+            byte[] raw = key.getBytes(StandardCharsets.UTF_8);
+            SecretKeySpec secretKeySpec = new SecretKeySpec(raw, "AES");
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec);
+            byte[] encrypted = cipher.doFinal(str.getBytes(StandardCharsets.UTF_8));
+            return Base64.encodeBase64String(encrypted);
+        } catch (Exception e) {
+            log.error("AES 加密异常", e);
+            throw new RuntimeException(e);
+        }
+    }
+
+
+}

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

@@ -0,0 +1,85 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 05 14 46
+ **/
+@Slf4j
+@Component
+public class ShangHaiHanGeCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShangHaiHanGe;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String MobilePhone;// 手机号(32位MD5加密字符串)
+    }
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("上海晗各对接参数:{}", JSONObject.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = config.getString("checkUrl");
+            log.info("上海晗各开始撞库,请求地址:{},md5:{}", url, phoneMd5);
+            MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>();
+            params.add("MobilePhone", phoneMd5);
+            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();
+            } catch (Exception e) {
+                log.error("上海晗各准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("上海晗各撞库响应:{},md5:{}", response, phoneMd5);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject.getString("Ret").equals("0")&&jsonObject.getString("Code").equals("100")) {
+                return DataVo.success(0, "上海晗各撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "上海晗各撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail(1, "上海晗各撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,84 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+/**
+ * @Author Liu Tao
+ * @Date 2024 04 01 16 08
+ **/
+@Slf4j
+@Service
+public class ShangHaiJuHuiRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShangHaiJuHuiRongCreditService;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String mobile;//md5 的手机号
+        private String ditchCode;//渠道编码
+        private String city; //城市
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ShangHaiJuHuiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("上海聚汇融对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMobile(phoneMd5);
+            checkInfo.setCity(userInfo.getCityAllName());
+            checkInfo.setDitchCode(config.getString("ditchCode"));
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck ShangHaiJuHuiRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("上海聚汇融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShangHaiJuHuiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("200")) {
+                return DataVo.success(0, "上海聚汇融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "上海聚汇融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("上海聚汇融撞库失败", e);
+            return DataVo.fail(1, "上海聚汇融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}
+

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

@@ -0,0 +1,97 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 17 15 21
+ **/
+@Slf4j
+@Component
+public class ShenLuoJinFuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShenLuoJinFu;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String account_key;//account_key值需接口方提供
+        private String tel_m;//手机号(MD5加密的32位小写)
+        private String city;//城市,例如(上海或上海市)
+        private String repeat_system;//指定系统撞库(需接口方提供)
+    }
+
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("盛略金服对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            Map<String, String> requestData = new HashMap<>();
+            requestData.put("tel_m", phoneMd5);
+            requestData.put("account_key", config.getString("account_key"));
+            requestData.put("city",userInfo.getCityAllName());
+            if (config.getString("repeat_system")!=null){
+                requestData.put("repeat_system", config.getString("repeat_system"));
+            }
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck ShenLuoJinFuCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            JSONObject 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);
+            }catch (Exception e){
+                log.error("盛略金服准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShenLuoJinFuCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (response.getInteger("code")==1) {
+                return DataVo.success(0, "盛略金服撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "盛略金服撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("盛略金服撞库失败", e);
+            return DataVo.fail(1, "盛略金服撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,111 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
+import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 04 29 10 55
+ **/
+@Slf4j
+@Service
+public class ShenYangHengXinCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShenYangHengXin;
+    }
+    @Data
+    private static class CheckInfo{
+        private String mobile;// 手机号md5
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo)  {
+        try {
+            log.info("credit ShenYangHengXinCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("沈阳恒信对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            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 = "";
+            try{
+                HttpResponse response = httpRestTemplate.restTemplate().postForObject(url, null, null, header, null, requestData);
+                res = EntityUtils.toString(response.getEntity());
+                jsonObject = JSON.parseObject(res);
+            }catch (Exception e){
+                log.error("沈阳恒信准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShenYangHengXinCreditService response userId:{}, result:{}",userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("0")) {
+                return DataVo.success(0, "沈阳恒信撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "沈阳恒信撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            return DataVo.fail(1, "沈阳恒信撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+    /**
+     * 加密
+     * @param sSrc 需要加密的字符串
+     * @param sKey 此处使用AES-128-ECB加密模式,key需要为16位。
+     * @return
+     * @throws Exception
+     */
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+
+        // 判断Key是否为16位
+        if (sKey.length() != 16) {
+            System.out.print("Key长度不是16位");
+            return null;
+        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        return new Base64().encodeToString(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+    }
+}

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

@@ -0,0 +1,90 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 10 10 15 09
+ * 沈阳信易融APi
+ **/
+
+@Slf4j
+@Service
+public class ShenYangXinYiRongCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShenYangXinYiRong;
+    }
+
+
+    @Data
+    private static class CheckInfo{
+        private String mobile_md5;//md5 的手机号
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ShenYangXinYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("沈阳信易融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMobile_md5(phoneMd5);
+            String checkUrl = config.getString("checkUrl");
+            String url=checkUrl+"?company="+config.getInteger("checkCompany")+"&mobile_md5="+checkInfo.getMobile_md5();
+            log.info("credit qualityCheck ShenYangXinYiRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("沈阳信易融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShenYangXinYiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "沈阳信易融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "沈阳信易融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("沈阳信易融撞库失败", e);
+            return DataVo.fail(1, "沈阳信易融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,168 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Base64;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 03 12 14 03
+ **/
+@Slf4j
+@Service
+public class ShiYueCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShiYue;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private Integer app_id;//渠道编码
+        private String timestamp;//时间戳
+        private String sign;//签名
+        private String mobile;//md5加密后的手机号,32位小写
+    }
+    /*
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ShiYueCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("司跃对接参数:{}", JSON.toJSONString(config));
+
+            Map<String, String> map = new HashMap<>();
+            map.put("app_id",config.getString("app_id"));
+            map.put("mobile",(userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5()));
+            map.put("timestamp",System.currentTimeMillis()/1000+"");
+            String sign = makeSign(map, config.getString("token"));
+            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;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,map, String.class);
+            }catch (Exception e){
+                log.error("司跃准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShiYueCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("code") .equals("20000")) {
+                return DataVo.success(0, "司跃撞库成功", product.getPlanId());
+            } else {
+                return  DataVo.fail(1, "司跃撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("司跃撞库失败", e);
+            return DataVo.fail(1, "司跃撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+
+    public static String makeSign(Map<String, String> args, String token) {
+        if (args == null || token == null) {
+            return "";
+        }
+
+        Map<String, String> sortedArgs = new TreeMap<>(args);
+
+        StringBuilder signStr = new StringBuilder();
+        for (Map.Entry<String, String> entry : sortedArgs.entrySet()) {
+            String key = entry.getKey();
+            String value = entry.getValue();
+            if (value != null && !value.isEmpty()) {
+                signStr.append(key).append(value);
+            }
+        }
+
+        System.out.println(signStr.toString());
+
+        return md5(md5(signStr.toString()) + token).toUpperCase();
+    }
+
+    private static String md5(String str) {
+        try {
+            MessageDigest md = MessageDigest.getInstance("MD5");
+            md.update(str.getBytes());
+            byte[] digest = md.digest();
+
+            StringBuilder sb = new StringBuilder();
+            for (byte b : digest) {
+                sb.append(String.format("%02x", b & 0xff));
+            }
+
+            return sb.toString();
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+            return "";
+        }
+    }
+
+    // 加密
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+        if (sKey == null) {
+            System.out.print("Key为空null");
+            return null;
+        }
+        // 判断Key是否为16位
+        if (sKey.length() != 16) {
+            System.out.print("Key长度不是16位");
+            return null;
+        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        return Base64.getEncoder().encodeToString(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+    }
+
+
+}

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

@@ -0,0 +1,94 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 06 06 17 11
+ **/
+@Slf4j
+@Service
+public class ShuRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ShuRong;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String mobile;//手机号, MD5加密(32位小写)
+        private String city;//城市:例如:北京
+        private String source;//固定值,具体需要和对接人确定
+    }
+
+
+    @Data
+    private static class ApplyInfoRequst {
+       private String is_jm;
+       private String source;
+       private String data;
+    }
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit ShuRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("速融对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMobile(phoneMd5);
+            checkInfo.setSource(config.getString("source"));
+            checkInfo.setCity(userInfo.getCityAllName());
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck ShuRongCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, phoneMd5);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("速融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck ShuRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("100")) {
+                return DataVo.success(0, "速融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "速融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("速融撞库失败", e);
+            return DataVo.fail(1, "速融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+}

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

@@ -0,0 +1,152 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 09 07 15 26
+ **/
+@Slf4j
+@Service
+public class SiChuangRuiCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.SiChuangRui;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone;//md5 的手机号
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     *  {
+     * 	"checkUrl": "http://47.242.43.151/Home/EncryptApi/checkRegister",
+     * 	"applyUrl": "http://47.242.43.151/Home/EncryptApi/reg",
+     * 	"source": "HuiRongYK",
+     * 	"channel": "BiRong",
+     * 	"publicKey": "hxW7zT4BI9siImpE"
+     * }
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit SiChuangRuiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("思创瑞对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setPhone(phoneMd5);
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck SiChuangRuiCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("思创瑞准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck SiChuangRuiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 200 && jsonObject.getJSONObject("data")!=null && jsonObject.getJSONObject("data").getInteger("isRegistered")==0) {
+                return DataVo.success(0, "思创瑞撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "思创瑞撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("思创瑞撞库失败", e);
+            return DataVo.fail(1, "思创瑞撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+    private static class ApiAesUtil {
+        public static String encrypt(String sSrc, String sKey) throws Exception {
+            if (sKey == null) {
+                System.out.print("Key为空null");
+                return null;
+            }
+            if (sKey.length() != 16) {
+                System.out.print("Key长度不是16位");
+                return null;
+            }
+            byte[] raw = sKey.getBytes("utf-8");
+            SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+            cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+            byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+            return Base64.encodeBase64String(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+        }
+
+        public static String Decrypt(String sSrc, String sKey) throws Exception {
+            try {
+                if (sKey == null) {
+                    System.out.print("Key为空null");
+                    return null;
+                }
+                if (sKey.length() != 16) {
+                    System.out.print("Key长度不是16位");
+                    return null;
+                }
+                byte[] raw = sKey.getBytes("utf-8");
+                SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+                Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+                cipher.init(Cipher.DECRYPT_MODE, skeySpec);
+                byte[] encrypted1 = Base64.decodeBase64(sSrc);//先用base64解密
+                try {
+                    byte[] original = cipher.doFinal(encrypted1);
+                    String originalString = new String(original,"utf-8");
+                    return originalString;
+                } catch (Exception e) {
+                    System.out.println(e.toString());
+                    return null;
+                }
+            } catch (Exception ex) {
+                System.out.println(ex.toString());
+                return null;
+            }
+        }
+
+    }
+
+}

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

@@ -0,0 +1,170 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+import java.security.Key;
+import java.util.Base64;
+/**
+ * @Author Liu Tao
+ * @Date 2024 03 20 13 50
+ **/
+@Slf4j
+@Service
+public class SouYuJinFuCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.SouYuJinFu;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String phone;//手机号码md5(32位,字母小写)
+    }
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit SouYuJinFuCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("授渔金服对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            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);
+            } catch (Exception e) {
+                log.error("授渔金服准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck SouYuJinFuCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            log.info("credit qualityCheck SouYuJinFuCreditService response userId:{}, jsonObject:{}", userInfo.getUserId(), jsonObject);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("businessCode").equals("200")) {
+                return DataVo.success(0, "授渔金服撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "授渔金服撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("授渔金服撞库失败", e);
+            return DataVo.fail(1, "授渔金服撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+    public static class DESUtil {
+
+        private static final Logger log = LoggerFactory.getLogger(DESUtil.class);
+
+        /**
+         * 偏移变量,固定占8位字节
+         */
+        private final static String IV_PARAMETER = "12345678";
+
+        private static final String ALGORITHM = "DES";
+
+        private static final String CIPHER_ALGORITHM = "DES/CBC/PKCS5Padding";
+
+        private static final String CHARSET = "utf-8";
+
+        /**
+         * 解密
+         * @param key 密钥
+         * @param data 密文
+         * @return  解密后的内容
+         */
+        public static String decrypt(String key, String data) {
+            if(StringUtils.isBlank(key))
+                throw new RuntimeException("缺少key");
+            if(StringUtils.isBlank(data))
+                throw new RuntimeException("加密对象空的");
+            try {
+                Key secretKey = generateKey(key);
+                Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
+                IvParameterSpec iv = new IvParameterSpec(IV_PARAMETER.getBytes(CHARSET));
+                cipher.init(Cipher.DECRYPT_MODE, secretKey,iv);
+                return new String(cipher.doFinal(Base64.getDecoder().decode(data.getBytes(CHARSET))), CHARSET);
+            } catch (Exception e) {
+                log.error("key-{},data-{},DES解密异常:{}-{}",key,data,e.getMessage(),e);
+                return null;
+            }
+        }
+
+
+        /**
+         * 加密
+         * @param key 密钥
+         * @param data 待加密的内容
+         * @return 密文
+         */
+        public static String encrypt(String key, String data) {
+            if (key== null || key.length() < 8) {
+                throw new RuntimeException("加密失败,key不能小于8位");
+            }
+            if (data == null)
+                return null;
+            try {
+                Key secretKey = generateKey(key);
+                Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
+                IvParameterSpec iv = new IvParameterSpec(IV_PARAMETER.getBytes(CHARSET));
+                cipher.init(Cipher.ENCRYPT_MODE, secretKey,iv);
+                byte[] bytes = cipher.doFinal(data.getBytes(CHARSET));
+                //JDK1.8及以上可直接使用Base64,JDK1.7及以下可以使用BASE64Encoder
+                //Android平台可以使用android.util.Base64
+                return new String(Base64.getEncoder().encode(bytes));
+            } catch (Exception e) {
+                log.error("key-{},data-{},DES加密异常:{}-{}",key,data,e.getMessage(),e);
+                return null;
+            }
+        }
+
+        /**
+         * 生成key
+         *
+         * @param password
+         * @return
+         * @throws Exception
+         */
+        private static Key generateKey(String password) throws Exception {
+            DESKeySpec dks = new DESKeySpec(password.getBytes(CHARSET));
+            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM);
+            return keyFactory.generateSecret(dks);
+        }
+    }
+}

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

@@ -0,0 +1,98 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author zjc
+ * @Date 2024 07 09 16 36
+ **/
+@Slf4j
+@Service
+public class SuZhouJianYiRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.SuZhouJianYiRong;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private String md5_mobile;//md5加密后的手机号,32位小写
+    }
+
+
+    @Data
+    private static class RquestParam {
+        private String source;//渠道来源
+        private String file_id;//
+        private String data;//	AES加密 (AES/ECB/PKCS5Padding)
+        private String sign;
+        private String timestamp;
+
+
+    }
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit SuZhouJianYiRongCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("苏州简易融对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMd5_mobile(phoneMd5);
+
+
+            String url = config.getString("checkUrl");
+
+            log.info("credit qualityCheck SuZhouJianYiRongCreditService request userId:{}, url:{}, checkInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("苏州简易融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck SuZhouJianYiRongCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") ==0 ) {
+                return DataVo.success(0, "苏州简易融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "苏州简易融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("苏州简易融撞库失败", e);
+            return DataVo.fail(1, "苏州简易融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+
+}

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

@@ -0,0 +1,144 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * @Author Tianli
+ * @Date 2023 11 08.
+ * 苏州昌硕API接单
+ **/
+@Service
+@Slf4j
+public class SuzhouchangshuoCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.Suzhouchangshuo;
+    }
+
+    @Data
+    public static class CheckData{
+        private String tel;
+    }
+
+    /*@Data
+    private static class CheckInfo{
+        private String phoneMd5;
+
+        private String sign;
+
+        private String areaName;
+
+
+    }*/
+    @Data
+    private static class ResultHt{
+        private String code;
+        private String msg;
+    }
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit SuzhouchangshuoCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("苏州昌硕对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            /*checkInfo.setPhoneMd5(phoneMd5);
+            AreaCity cityInfoByCode = cityService.getCityInfoByCode(userInfo.getCityCode());
+            checkInfo.setAreaName(cityInfoByCode.getCityName());
+//实体类转为JSONObject
+            JSONObject jsons = JSONObject.parseObject(JSON.toJSONString(checkInfo));
+            jsons.remove("sign");
+            String sign = getSign(jsons,config.getString("signKey"));
+            checkInfo.setSign(MSDSUtils.MD5.EncoderByMd5(sign));
+            CheckData checkData = new CheckData();
+            checkData.setParams(AESencrypt(JSONObject.toJSONString(checkInfo),config.getString("encKey")));
+            checkData.setMerNo(config.getString("merNo"));*/
+            CheckData checkData = new CheckData();
+            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);
+            }catch (Exception e){
+                log.error("苏州昌硕准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck SuzhouchangshuoCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "苏州昌硕撞库成功", product.getPlanId());
+            }else if (jsonObject.getInteger("code") == 1) {
+                return DataVo.fail(1, "苏州昌硕撞库失败,该数据对方已存在", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "苏州昌硕撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("苏州昌硕撞库失败", e);
+            return DataVo.fail(1, "苏州昌硕撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+
+        // 判断Key是否为16位
+        if (sKey.length() != 16) {
+            System.out.print("Key长度不是16位");
+            return null;
+        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        return new Base64().encodeToString(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+    }
+
+
+
+
+
+
+}

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

@@ -0,0 +1,81 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 22 14 13
+ **/
+@Service
+@Slf4j
+public class TangShanRongYangCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.ThangSanRongYang;
+    }
+
+    @Data
+    private static class CheckInfo {
+        private String md5_phone;// Md5(mobile)
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit TangShanRongYangCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("唐山融扬对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String url = config.getString("checkUrl");
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5_phone(phoneMd5);
+            log.info("credit qualityCheck TangShanRongYangCreditService request userId:{}, url:{}, CheckInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try {
+                response = httpRestTemplate.restTemplate().postForObject(url, checkInfo, String.class);
+            } catch (Exception e) {
+                log.error("唐山融扬准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck TangShanRongYangCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("resStatus").equals("1")) {
+                return DataVo.success(0, "唐山融扬撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "唐山融扬撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("唐山融扬撞库失败", e);
+            return DataVo.fail(1, "唐山融扬撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+}

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

@@ -0,0 +1,113 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 11 22 17 52
+ **/
+@Slf4j
+@Service
+public class TianJingJiaYiCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.TianJingJiaYi;
+    }
+    @Data
+    private static class CheckInfo{
+        private Integer channel_code;//渠道编码,由系统负责人提供
+        private String channel_secret_key;//渠道密钥,由系统负责人提供
+        private String md5_phone;//手机号码MD5值(32位小写)
+    }
+
+    /**
+     * 撞库 实现单个用户撞库
+     *
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit TianJingJiaYiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("天津佳亿对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMd5_phone(phoneMd5);//md5
+            checkInfo.setChannel_code(config.getInteger("channelCode"));//渠道编码
+            checkInfo.setChannel_secret_key(config.getString("channelSecretKey"));//渠道密钥
+            String url = config.getString("checkUrl");
+            log.info("credit qualityCheck TianJingJiaYiCreditService request userId:{}, url:{}, checkInfo:{}",userInfo.getUserId(), url, checkInfo);
+            String response = null;
+            try{
+                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+            }catch (Exception e){
+                log.error("天津佳亿准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck TianJingJiaYiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(),product.getPlanName());
+            }
+            JSONObject jsonObject=JSONObject.parseObject(response);
+
+            if (jsonObject == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (jsonObject.getString("code").equals("0")) {
+                return DataVo.success(0, "天津佳亿撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "天津佳亿撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("天津佳亿撞库失败", e);
+            return DataVo.fail(1, "天津佳亿撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+
+        // 判断Key是否为16位
+        if (sKey.length() != 16) {
+            System.out.print("Key长度不是16位");
+            return null;
+        }
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+
+        return new Base64().encodeToString(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+    }
+}

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

@@ -0,0 +1,76 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.Md5Util;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author Liu Tao
+ * @Date 2023 12 13 16 07
+ **/
+@Slf4j
+@Service
+public class TianShuiShuYiRongCreditService implements LoanDockingApi {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.TianShuiShuYiRong;
+    }
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit TianShuiShuYiRongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("天水速易融对接参数:{}", JSON.toJSONString(config));
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            String checkUrl = config.getString("checkUrl");
+            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);
+            } catch (Exception e) {
+                log.error("天水速易融准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck TianShuiShuYiRongCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            JSONObject jsonObject = JSONObject.parseObject(response);
+            if (jsonObject.getInteger("code") == 0) {
+                return DataVo.success(0, "天水速易融撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "天水速易融撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("天水速易融撞库失败", e);
+            return DataVo.fail(1, "天水速易融撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,130 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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 lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+import java.util.Objects;
+
+/**
+ * @Descrption
+ * @Author: chend
+ * @Date: 2023/2/16
+ * @Version V1.0
+ **/
+@Service
+@Slf4j
+public class TuoBaoRongCreditService implements LoanDockingApi {
+
+    private static final String checkPath = "api/check";
+    private static final String applyPath = "api/apply";
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+
+    @Data
+    private static class CheckInfo {
+        private String trafficsources;
+        private String md5_mobile;
+    }
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.TuoBaoRong;
+    }
+
+
+
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit TuoBaoRongCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
+//            XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
+
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("拓宝荣对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            checkInfo.setMd5_mobile(userInfo.getUserMobileMD5());
+            checkInfo.setTrafficsources(config.getString("channelSource"));
+
+            JSONObject param = new JSONObject() {{
+                put("data", encrypt(JSON.toJSONString(checkInfo), config.getString("secret")));
+            }};
+
+            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);
+            } catch (Exception e) {
+                log.error("拓宝荣准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck TuoBaoRongCreditService response userId:{}, result:{}", userInfo.getUserId(), response);
+            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());
+
+        } catch (Exception e) {
+            log.error("拓宝荣撞库失败", e);
+            return DataVo.fail(1, "拓宝荣撞库失败,请联系系统管理员", product.getPlanId());
+        }
+    }
+
+
+    public static String encrypt(String sSrc, String sKey) throws Exception {
+        if (sKey == null) {
+            return null;
+        }
+        // 判断 Key 是否为 16 位
+        if (sKey.length() != 16) {
+            return null;
+        }
+
+        byte[] raw = sKey.getBytes("utf-8");
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        // "算法/模式/补码方式"
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+        return bytesToHexString(encrypted);
+    }
+
+
+    public static String bytesToHexString(byte[] src) {
+        StringBuilder stringBuilder = new StringBuilder("");
+        if (src == null || src.length <= 0) {
+            return null;
+        }
+        for (int i = 0; i < src.length; i++) {
+            int v = src[i] & 0xFF;
+            String hv = Integer.toHexString(v);
+            if (hv.length() < 2) {
+                stringBuilder.append(0);
+            }
+            stringBuilder.append(hv);
+        }
+        return stringBuilder.toString();
+    }
+
+}

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

@@ -0,0 +1,103 @@
+package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+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.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;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * @Author Liu Tao
+ * @Date 2024 07 03 16 14
+ **/
+@Slf4j
+@Service
+public class WeiFangHuaShenCreditService implements LoanDockingApi {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+
+
+    @Override
+    public ServerCodeEnums getType() {
+        return ServerCodeEnums.WeiFangHuaShenCreditService;
+    }
+
+    @Data
+    private static class CheckInfo{
+        private Integer channel_code;//渠道编码,由负责人提供
+        private String md5_phone;//md5加密后的手机号,32位小写
+    }
+
+
+
+    /**
+     * 助贷对接模板2,撞库,需要form表单提交
+     * @param userInfo
+     * @param product
+     * @return
+     */
+    @Override
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+        try {
+            log.info("credit WeiFangHuaShenCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
+          
+            byte[] requestConfig = configInfo.getRequestConfig();
+            Object deserialize = HessianUtils.deserialize(requestConfig);
+            JSONObject config = JSONObject.parseObject(deserialize.toString());
+            log.info("潍坊华盛对接参数:{}", JSON.toJSONString(config));
+            CheckInfo checkInfo = new CheckInfo();
+            String phoneMd5 = userInfo.getUserMobileMD5() == null ? Md5Util.encoderByMd5(userInfo.getUserMobile()) : userInfo.getUserMobileMD5();
+            checkInfo.setMd5_phone(phoneMd5);
+            checkInfo.setChannel_code(config.getInteger("channel_code"));
+
+            Map<String, String> requestData = new HashMap<>();
+            requestData.put("channel_code", String.valueOf(checkInfo.getChannel_code()));
+            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;
+            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);
+            }catch (Exception e){
+                log.error("潍坊华盛准入异常,异常信息:{}", e.getMessage(), e);
+            }
+            log.info("credit qualityCheck WeiFangHuaShenCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
+            if (response == null) {
+                return DataVo.timeout(product.getPlanId(), product.getPlanName());
+            }
+            if (response.getInteger("code")==0) {
+                return DataVo.success(0, "潍坊华盛撞库成功", product.getPlanId());
+            } else {
+                return DataVo.fail(1, "潍坊华盛撞库失败,请联系系统管理员", product.getPlanId());
+            }
+        } catch (Exception e) {
+            log.error("潍坊华盛撞库失败", e);
+            return DataVo.fail(1, "潍坊华盛撞库失败,请联系系统管理员", product.getPlanId());
+        }
+
+    }
+
+}

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません