瀏覽代碼

update check

GITZYY 1 周之前
父節點
當前提交
29a8a550a2
共有 100 個文件被更改,包括 1750 次插入11911 次删除
  1. 1171 1171
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/GenerateCheckIntoHttpApiConfigCmdExe.java
  2. 134 135
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/GenerateCheckIntoHttpApiConfigV2CmdExe.java
  3. 128 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/client/vo/DataVo.java
  4. 8 0
      egress-gateway-service-domain/pom.xml
  5. 0 183
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/HttpApi.java
  6. 1 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/LoanDockingApi.java
  7. 15 11
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/AnHuiHengDaoCreditService.java
  8. 6 13
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/customized/threedocking/impl/BaiXinShunTaiCreditService.java
  9. 16 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/guide/http/HttpApiRequestConfig.java
  10. 1 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/guide/resolver/payload/ApiPayloadResolverManage.java
  11. 72 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/BeanCopyUtils.java
  12. 196 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/DateUtil.java
  13. 2 1
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/Md5Util.java
  14. 0 1
      egress-gateway-service-infrastructure/pom.xml
  15. 0 35
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/LoanDockingApi.java
  16. 0 163
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/AnHuiHengDaoCreditService.java
  17. 0 173
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/BaiXinShunTaiCreditService.java
  18. 0 152
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/BaiYiJinFuCreditService.java
  19. 0 260
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/BeiJingChongHeCreditService.java
  20. 0 111
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/CangZhouSuYiRonogCreditService.java
  21. 0 178
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/CheYouRongCreditService.java
  22. 0 138
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChengDuYiHeShengCreditService.java
  23. 0 134
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChengHongHuiCreditService.java
  24. 0 152
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChongQinDongRunCreditService.java
  25. 0 148
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChongQingRuiShangXinCreditService.java
  26. 0 120
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChongQingYiYueCreditService.java
  27. 0 103
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChuanjinCreditService.java
  28. 0 110
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeLuoXuanAesCreditService.java
  29. 0 108
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeLuoXuanCreditService.java
  30. 0 116
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeZhouXinYiRongCreditService.java
  31. 0 112
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeZhouXinYiRongV2CreditService.java
  32. 0 35
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DfrzwCreditService.java
  33. 0 133
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FangxinwangiCreditService.java
  34. 0 121
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FuChengCreditService.java
  35. 0 91
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FuZhouBeiJiuCreditService.java
  36. 0 132
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FuZhouBeiYinJinRongCreditService.java
  37. 0 108
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GexinjinfuCreditService.java
  38. 0 102
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuanZhouPuHuiCreditService.java
  39. 0 105
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuangDongHaoEnCreditService.java
  40. 0 94
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuangDongHongZhanCreditService.java
  41. 0 131
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuangZhouHuaXinCreditService.java
  42. 0 115
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HamiguaCreditService.java
  43. 0 114
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HaohanwuyinCreditService.java
  44. 0 94
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HeFeiShenDaiCreditService.java
  45. 0 100
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HeZeRongXinCreditService.java
  46. 0 124
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HengYangJiuZhenCreditService.java
  47. 0 149
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HengaiCreditService.java
  48. 0 106
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HongShengJinFuCreditService.java
  49. 0 119
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HongXinPuHuiCreditService.java
  50. 0 117
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuNanDiShuiYanCreditService.java
  51. 0 105
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuirongCrmCreditService.java
  52. 0 133
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuixinCreditService.java
  53. 0 164
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuizhongCreditService.java
  54. 0 150
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JianZhanCreditService.java
  55. 0 93
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JiechengCreditService.java
  56. 0 95
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JilingHuiRongCreditService.java
  57. 0 152
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinDieV2CreditService.java
  58. 0 98
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinDieV3CreditService.java
  59. 0 80
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinDieV4CreditService.java
  60. 0 122
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinZhuLiCreditService.java
  61. 0 96
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JindieCreditService.java
  62. 0 94
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JiuXinKeCreditService.java
  63. 0 98
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiYiRongCreditService.java
  64. 0 100
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiCreditService.java
  65. 0 101
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiFourToOneCreditService.java
  66. 0 107
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiNightCreditService.java
  67. 0 105
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiV2CreditService.java
  68. 0 93
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KunMingXiaoSongShuCreditService.java
  69. 0 86
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/LeXiangRongCreditService.java
  70. 0 131
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/LianKeYunKongCreditService.java
  71. 0 103
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/LiaoChengXinYiDaiCreditService.java
  72. 0 131
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/MoGuTouCreditService.java
  73. 0 107
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/NanTongXingChengCreditService.java
  74. 0 87
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/NiYouKeCreditService.java
  75. 0 102
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/NingBoTianChengCreditService.java
  76. 0 93
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/OpenApiAesCreditService.java
  77. 0 96
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/OpenApiCreditService.java
  78. 0 141
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/PingDingShanCreditService.java
  79. 0 161
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/PingXunCreditService.java
  80. 0 43
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/PubNoCheckCreditService.java
  81. 0 82
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingDaoAoSengCreditService.java
  82. 0 81
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingDaoAoSengV2CreditService.java
  83. 0 194
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingyuCreditService.java
  84. 0 153
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingyuV2CreditService.java
  85. 0 143
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingyuV3CreditService.java
  86. 0 130
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongChuangJinFuCreditService.java
  87. 0 139
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongXiangDaChangShaCreditService.java
  88. 0 141
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongXiangKeBuShuCreditService.java
  89. 0 139
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongXiangKeV2CreditService.java
  90. 0 129
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongYiDaCreditService.java
  91. 0 84
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongkedaiCreditService.java
  92. 0 380
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongshengCreditService.java
  93. 0 150
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongxiziCreditService.java
  94. 0 90
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RunMeiXinYiRongCreditService.java
  95. 0 116
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RxkCreditService.java
  96. 0 157
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShanDongBangBangDaiCreditService.java
  97. 0 126
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShanXiHengShengDaiCreditService.java
  98. 0 122
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShanXiMingDePuHuiCreditService.java
  99. 0 85
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShangHaiHanGeCreditService.java
  100. 0 84
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShangHaiJuHuiRongCreditService.java

+ 1171 - 1171
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/GenerateCheckIntoHttpApiConfigCmdExe.java

@@ -1,1204 +1,1204 @@
-package com.hrsk.cloud.eg.app.loan.executor;
-
-import com.hrsk.cloud.eg.client.constant.BusinessPrefixEnum;
-import com.hrsk.cloud.eg.domain.api.*;
-import com.hrsk.cloud.eg.domain.api.common.ApiPayloadTypeEnum;
-import com.hrsk.cloud.eg.domain.api.common.ValueObjectTypeEnum;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgressApiDo;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiChannelService;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
-import lombok.extern.slf4j.Slf4j;
-import net.minidev.json.JSONObject;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author zhangyy
- * @version 1.0
- * @description: GenerateHttpApiConfig 迁移api配置的处理类
- * @date 2024/8/29 17:54
- */
-@Component
-@Slf4j
-public class GenerateCheckIntoHttpApiConfigCmdExe {
-
-    @Resource
-    private EgApiService egApiService;
-
-    @Resource
-    private EgApiChannelService egApiChannelService;
-
-    /**
-     * @description:  原始惠融对接api转化
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/8/29 17:58
-     */
-    public void  generateHuiRonHuiRonApiConfig(String huiRonApiConfig){
-        EgressApiDo egApiDo=new EgressApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":HUIRONG_CRM:9");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(huiRonApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        egApiEndpointDo.setApiId(egApiDo.getId());
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /**
-     * @description: 对接我们openapiRsa文档转化
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/4 10:42
-     */
-    public void  generateOpenApiRSAConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":OPEN_API:1");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createOpenApiRsaCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /**
-     * @description: 对接我们openapiAes文档转化
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/4 10:42
-     */
-    public void  generateOpenApiAesConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":OPEN_API_AES:13");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createOpenApiAesCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /** 
-     * @description: 庆鱼api转化 !!!暂时不支持
-     * @param:
-     * @return:  
-     * @author zhangyy
-     * @date: 2024/9/4 14:58
-     */ 
-    public void  generateQinYuConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_QY:4");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createQinYuCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /**
-     * @description: 鑫鹿api对接方式
-     * @author zhangyy
-     * @date 2024/9/5 11:06
-     * @version 1.0
-     */
-    public void generateXinLuConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_XL:7");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        egApiEndpointDo.setApiId(egApiDo.getId());
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /**
-     * @description: 享可达 api配置对接方式
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/5 14:31
-     */
-    public void generateXkdConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_XKD:10");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createXkdApiCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /**
-     * @description:锦碟 api配置对接方式
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/5 14:31
-     */
-    public void generateJinDieConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_JD:5");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createJinDieCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createJinDieCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("CheckUrl"));
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("Appid",jsonObject.getString("Appid"));
-        body.put("Appkey",jsonObject.getString("AppKey"));
-        body.put("Userphone","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]==400?0:1");
+//package com.hrsk.cloud.eg.app.loan.executor;
+//
+//import com.hrsk.cloud.eg.client.constant.BusinessPrefixEnum;
+//import com.hrsk.cloud.eg.domain.api.*;
+//import com.hrsk.cloud.eg.domain.api.common.ApiPayloadTypeEnum;
+//import com.hrsk.cloud.eg.domain.api.common.ValueObjectTypeEnum;
+//import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
+//import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgressApiDo;
+//import com.hrsk.cloud.eg.infrastructure.service.EgApiChannelService;
+//import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+//import lombok.extern.slf4j.Slf4j;
+//import net.minidev.json.JSONObject;
+//import org.springframework.stereotype.Component;
+//
+//import javax.annotation.Resource;
+//import java.util.ArrayList;
+//import java.util.List;
+//
+///**
+// * @author zhangyy
+// * @version 1.0
+// * @description: GenerateHttpApiConfig 迁移api配置的处理类
+// * @date 2024/8/29 17:54
+// */
+////@Component
+////@Slf4j
+//public class GenerateCheckIntoHttpApiConfigCmdExe {
+//
+//    @Resource
+//    private EgApiService egApiService;
+//
+//    @Resource
+//    private EgApiChannelService egApiChannelService;
+//
+//    /**
+//     * @description:  原始惠融对接api转化
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/8/29 17:58
+//     */
+//    public void  generateHuiRonHuiRonApiConfig(String huiRonApiConfig){
+//        EgressApiDo egApiDo=new EgressApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":HUIRONG_CRM:9");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(huiRonApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description: 对接我们openapiRsa文档转化
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/4 10:42
+//     */
+//    public void  generateOpenApiRSAConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":OPEN_API:1");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createOpenApiRsaCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description: 对接我们openapiAes文档转化
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/4 10:42
+//     */
+//    public void  generateOpenApiAesConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":OPEN_API_AES:13");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createOpenApiAesCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description: 庆鱼api转化 !!!暂时不支持
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/4 14:58
+//     */
+//    public void  generateQinYuConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_QY:4");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createQinYuCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description: 鑫鹿api对接方式
+//     * @author zhangyy
+//     * @date 2024/9/5 11:06
+//     * @version 1.0
+//     */
+//    public void generateXinLuConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_XL:7");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description: 享可达 api配置对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/5 14:31
+//     */
+//    public void generateXkdConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_XKD:10");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createXkdApiCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description:锦碟 api配置对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/5 14:31
+//     */
+//    public void generateJinDieConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_JD:5");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createJinDieCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createJinDieCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("CheckUrl"));
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("Appid",jsonObject.getString("Appid"));
+//        body.put("Appkey",jsonObject.getString("AppKey"));
+//        body.put("Userphone","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]==400?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatus");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("xkd api  {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:锦碟 api配置对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/5 14:31
+//     */
+//    public void generateJinDieV3Config(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_JDV3:12");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createJinDieCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createJinDieV3CheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("CheckUrl"));
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("Appid",jsonObject.getString("Appid"));
+//        body.put("Appkey",jsonObject.getString("AppKey"));
+//        body.put("Userphone","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]");
 //        List<FunctionObject> functionObjects = Lists.newArrayList();
 //        FunctionObject functionObject = new FunctionObject();
-//        functionObject.setCode("resultCodeConvertStatus");
+//        functionObject.setCode("resultCodeConvertStatusInteger");
 //        functionObjects.add(functionObject);
 //        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("xkd api  {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:锦碟 api配置对接方式
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/5 14:31
-     */
-    public void generateJinDieV3Config(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_JDV3:12");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createJinDieCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createJinDieV3CheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("CheckUrl"));
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("Appid",jsonObject.getString("Appid"));
-        body.put("Appkey",jsonObject.getString("AppKey"));
-        body.put("Userphone","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("resultCodeConvertStatusInteger");
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("xkd api  {}",jsonString);
-        return httpApiConfig;
-    }
-
-
-    /**
-     * @description:融享客 api配置对接方式
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/5 14:31
-     */
-    public void generateRxkConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_RXK:6");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createRxkCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createRxkCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        if(null !=jsonObject.getString("private") && jsonObject.getBoolean("private")){
-            httpApiConfig.setUrl(jsonObject.getString("domain")+"/youka/api/user_filter/md5");
-        }else {
-            httpApiConfig.setUrl(jsonObject.getString("domain")+"/xxb-filter/api/filter/md5");
-        }
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("sourceCode",jsonObject.getString("sourceCode"));
-        body.put("accessKey",jsonObject.getString("accessKey"));
-        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("combinationCodeSuccessIsExit");
-        List<ValueObject> valueObjectList= Lists.newArrayList();
-        ValueObject valueObject = new ValueObject();
-        valueObject.setType(ValueObjectTypeEnum.SPEL.getType());
-        valueObject.setValue("#root[code]");
-        valueObjectList.add(valueObject);
-        ValueObject valueObject1 = new ValueObject();
-        valueObject1.setType(ValueObjectTypeEnum.SPEL.getType());
-        valueObject1.setValue("#root[success]");
-        valueObjectList.add(valueObject1);
-
-        ValueObject valueObject2 = new ValueObject();
-        valueObject2.setType(ValueObjectTypeEnum.SPEL.getType());
-        valueObject2.setValue("#root[data][phoneMd5Exist]");
-        valueObjectList.add(valueObject2);
-
-        functionObject.setArgs(valueObjectList);
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("rxk api  {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:  享可达 api转化
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/5 14:32
-     */
-    private HttpApiConfig createXkdApiCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("checkUrl"));
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
-        body.put("type",2);
-        body.put("tenantId",jsonObject.getString("tenantId"));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("resultCodeConvertStatusInteger");
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("xkd api  {}",jsonString);
-        return httpApiConfig;
-    }
-
-
-    /**
-     * @description: 鑫鹿api转化
-     * @author zhangyy
-     * @date 2024/9/5 11:07
-     * @version 1.0
-     */
-    private HttpApiConfig createXinLuApiCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("checkUrl"));
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
-        body.put("type",2);
-        body.put("tenantId",jsonObject.getString("tenantId"));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("resultCodeConvertStatusInteger");
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("xinLu api  {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description: 庆鱼创建api !!! 暂时不支持
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/4 14:58
-     */
-    private HttpApiConfig createQinYuCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"/openapi/interface/query/phones");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-
-        KeyValueObject data=new KeyValueObject();
-        data.setType("spel");
-        JSONObject dataJson=new JSONObject();
-        List<JSONObject> attackPhone=new ArrayList<>();
-        JSONObject phoneJson=new JSONObject();
-        phoneJson.put("phone","#param.user.phoneMd5");
-        attackPhone.add(phoneJson);
-        dataJson.put("customers",attackPhone);
-        dataJson.put("tenantId",jsonObject.getString("tenantId"));
-        data.setValue("#"+JSONObject.toJSONString(dataJson));
-        FunctionObject functionObject=new FunctionObject();
-        functionObject.setCode("outPrint");
-        data.setFunctions(Lists.newArrayList(functionObject));
-//        log.info("qin yu input {}", JSONObject.toJSONString(data));
-        body.put("trafficPlatformId",jsonObject.getString("trafficPlatformId"));
-        body.put("data","#"+JSONObject.toJSONString(data));
-        List<ValueObject> args=Lists.newArrayList();
-        ValueObject valueObject=new ValueObject();
-        valueObject.setValue("#param.content.data");
-        args.add(valueObject);
-        ValueObject valueObject1=new ValueObject();
-        valueObject1.setValue("#param.content.trafficPlatformId");
-        args.add(valueObject1);
-        ValueObject valueObject2=new ValueObject();
-        valueObject1.setValue(jsonObject.getString("key"));
-        args.add(valueObject2);
-        FunctionObject functionObject1=new FunctionObject();
-        functionObject1.setCode("md5Sign");
-        functionObject1.setArgs(args);
-        body.put("sign","#"+JSONObject.toJSONString(functionObject1));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[data][status]");
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("qin yu api  {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description: openapi Rsa 信息
-     * @author zhangyy
-     * @date 2024/9/4 10:56
-     * @version 1.0
-     */
-    private HttpApiConfig createOpenApiAesCheckIntoBean(String param) {
-        JSONObject jsonObject=JSONObject.parseObject(param);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("openapiCheckUrl"));
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        KeyValueObject merchantNo=new KeyValueObject();
-        merchantNo.setType("spel");
-        merchantNo.setValue("#param.user.companyCity");
-        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
-        body.put("city","#"+JSONObject.toJSONString(merchantNo));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[data][status]");
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("open api  rsa{}",jsonString);
-        return httpApiConfig;
-    }
-    /**
-     * @description: openapi Rsa 信息
-     * @author zhangyy
-     * @date 2024/9/4 10:56
-     * @version 1.0
-     */
-    private HttpApiConfig createOpenApiRsaCheckIntoBean(String param) {
-        JSONObject jsonObject=JSONObject.parseObject(param);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("openapiCheckUrl"));
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        KeyValueObject merchantNo=new KeyValueObject();
-        merchantNo.setType("spel");
-        merchantNo.setValue("#param.user.companyCity");
-        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
-        body.put("city","#"+JSONObject.toJSONString(merchantNo));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[data][status]");
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("open api  rsa{}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description: 创建撞库httpApi信息
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/8/30 09:31
-     */
-    public HttpApiConfig createHuiRonCheckIntoBean(String param){
-        JSONObject jsonObject=JSONObject.parseObject(param);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("checkUrl"));
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        KeyValueObject merchantNo=new KeyValueObject();
-        merchantNo.setType("spel");
-        merchantNo.setValue("#param.plan.bid");
-        body.put("attackPhone","#"+JSONObject.toJSONString(attackPhone));
-        body.put("merchantNo","#"+JSONObject.toJSONString(merchantNo));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[data][status]");
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("huiRon api {}",jsonString);
-         return httpApiConfig;
-    }
-
-    /** 
-     * @description:  惠众api对接方式
-     * @param:  
-     * @return:  
-     * @author zhangyy
-     * @date: 2024/9/9 10:07
-     */ 
-    public void generateHuiZhongConfig(String openApiConfig){
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Huizhong");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHuiZhongCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /**
-     * @description:
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/9 10:08
-     */
-    private HttpApiConfig createHuiZhongCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/user/check");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("channelSource",jsonObject.getString("channelSource"));
-        body.put("phoneNo","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]=='0000'?0:1");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("xkd api  {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//
+//    /**
+//     * @description:融享客 api配置对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/5 14:31
+//     */
+//    public void generateRxkConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":CRM_RXK:6");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createRxkCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createRxkCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        if(null !=jsonObject.getString("private") && jsonObject.getBoolean("private")){
+//            httpApiConfig.setUrl(jsonObject.getString("domain")+"/youka/api/user_filter/md5");
+//        }else {
+//            httpApiConfig.setUrl(jsonObject.getString("domain")+"/xxb-filter/api/filter/md5");
+//        }
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("sourceCode",jsonObject.getString("sourceCode"));
+//        body.put("accessKey",jsonObject.getString("accessKey"));
+//        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("");
 //        List<FunctionObject> functionObjects = Lists.newArrayList();
 //        FunctionObject functionObject = new FunctionObject();
-//        functionObject.setCode("resultCodeConvertStatusInteger");
+//        functionObject.setCode("combinationCodeSuccessIsExit");
+//        List<ValueObject> valueObjectList= Lists.newArrayList();
+//        ValueObject valueObject = new ValueObject();
+//        valueObject.setType(ValueObjectTypeEnum.SPEL.getType());
+//        valueObject.setValue("#root[code]");
+//        valueObjectList.add(valueObject);
+//        ValueObject valueObject1 = new ValueObject();
+//        valueObject1.setType(ValueObjectTypeEnum.SPEL.getType());
+//        valueObject1.setValue("#root[success]");
+//        valueObjectList.add(valueObject1);
+//
+//        ValueObject valueObject2 = new ValueObject();
+//        valueObject2.setType(ValueObjectTypeEnum.SPEL.getType());
+//        valueObject2.setValue("#root[data][phoneMd5Exist]");
+//        valueObjectList.add(valueObject2);
+//
+//        functionObject.setArgs(valueObjectList);
 //        functionObjects.add(functionObject);
 //        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("huizhong api {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:  银华api对接方式
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/9 10:07
-     */
-    public void generateYinHuaConfig(String openApiConfig){
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":YinHua");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYinHuaCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createYinHuaCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"api/channel/clue/md5/_check");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        KeyValueObject head1=new KeyValueObject();
-        head1.setKey("channel");
-        head1.setType(ValueObjectTypeEnum.BASIC.getType());
-        head1.setValue(jsonObject.getString("channel"));
-        headers.add(head);
-        headers.add(head1);
-
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-//        body.put("channelSource",jsonObject.getString("channelSource"));
-        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("resultCodeConvertStatusString");
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("yinhua api {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * 汇鑫对接方式
-     * @param threeSystemConfig
-     */
-    public void generateHuixinConfig(String threeSystemConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Huixin");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(threeSystemConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHuixinCheckIntoBean(threeSystemConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createHuixinCheckIntoBean(String threeSystemConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(threeSystemConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"pushdata.ashx?type=CheckMobilePhone");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("combinationCodeSuccessIsExit");
-        List<ValueObject> valueObjectList= Lists.newArrayList();
-        ValueObject valueObject = new ValueObject();
-        valueObject.setType(ValueObjectTypeEnum.SPEL.getType());
-        valueObject.setValue("#root[code]");
-        valueObjectList.add(valueObject);
-        ValueObject valueObject1 = new ValueObject();
-        valueObject1.setType(ValueObjectTypeEnum.SPEL.getType());
-        valueObject1.setValue("#root[status]");
-        valueObjectList.add(valueObject1);
-
-
-        functionObject.setArgs(valueObjectList);
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("huixin api  {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:  惠众直贷api对接方式
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/9 10:07
-     */
-    public void generateHuiZhongZhiConfig(String openApiConfig){
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Huizhong01");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHuiZhongCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    /**
-     * @description: 惠众直贷api Config
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/9 10:08
-     */
-    private HttpApiConfig createHuiZhongZhiCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/user/check");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("channelSource",jsonObject.getString("channelSource"));
-        body.put("phoneNo","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]");
-        List<FunctionObject> functionObjects = Lists.newArrayList();
-        FunctionObject functionObject = new FunctionObject();
-        functionObject.setCode("resultCodeConvertStatusInteger");
-        functionObjects.add(functionObject);
-        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("huizhong api {}",jsonString);
-        return httpApiConfig;
-    }
-
-
-    /**
-     * @description:  愉快花api对接方式
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/9 10:07
-     */
-    public void generateYuKuaiHuaConfig(String openApiConfig){
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":YuKuaiHua");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYuKuaiHuaCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createYuKuaiHuaCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"api/External/hit_library");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        JSONObject body=new  JSONObject();
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-//        body.put("channelSource",jsonObject.getString("channelSource"));
-        body.put("userPhone","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]==1?0:1");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("rxk api  {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  享可达 api转化
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/5 14:32
+//     */
+//    private HttpApiConfig createXkdApiCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("checkUrl"));
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
+//        body.put("type",2);
+//        body.put("tenantId",jsonObject.getString("tenantId"));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]");
 //        List<FunctionObject> functionObjects = Lists.newArrayList();
 //        FunctionObject functionObject = new FunctionObject();
 //        functionObject.setCode("resultCodeConvertStatusInteger");
 //        functionObjects.add(functionObject);
 //        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("YuKuaiHua api {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:  易借 api生成配置
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/9 15:16
-     */
-    public void generateYinJieConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":YiJie");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYinJieCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createYinJieCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"api/third/check_loan?server=1");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-
-        JSONObject body=new  JSONObject();
-
-//        body.put("channelSource",jsonObject.getString("channelSource"));
-        body.put("channel",jsonObject.getString("channel"));
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        JSONObject data=new  JSONObject();
-        data.put("type",102);
-        data.put("mobileMd5","#"+JSONObject.toJSONString(attackPhone));
-        body.put("data","#"+JSONObject.toJSONString(data));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]==0?0:1");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("xkd api  {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//
+//    /**
+//     * @description: 鑫鹿api转化
+//     * @author zhangyy
+//     * @date 2024/9/5 11:07
+//     * @version 1.0
+//     */
+//    private HttpApiConfig createXinLuApiCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("checkUrl"));
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
+//        body.put("type",2);
+//        body.put("tenantId",jsonObject.getString("tenantId"));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]");
 //        List<FunctionObject> functionObjects = Lists.newArrayList();
 //        FunctionObject functionObject = new FunctionObject();
 //        functionObject.setCode("resultCodeConvertStatusInteger");
 //        functionObjects.add(functionObject);
 //        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("YinJie api {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:  有融对接api
-     * @author zhangyy
-     * @date 2024/9/9 15:40
-     * @version 1.0
-     */
-    public void generateYouRonConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Yourong");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYouRonCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createYouRonCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"channel/openapi/checkuser");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-
-        JSONObject body=new  JSONObject();
-
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("xinLu api  {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description: 庆鱼创建api !!! 暂时不支持
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/4 14:58
+//     */
+//    private HttpApiConfig createQinYuCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"/openapi/interface/query/phones");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//
+//        KeyValueObject data=new KeyValueObject();
+//        data.setType("spel");
+//        JSONObject dataJson=new JSONObject();
+//        List<JSONObject> attackPhone=new ArrayList<>();
+//        JSONObject phoneJson=new JSONObject();
+//        phoneJson.put("phone","#param.user.phoneMd5");
+//        attackPhone.add(phoneJson);
+//        dataJson.put("customers",attackPhone);
+//        dataJson.put("tenantId",jsonObject.getString("tenantId"));
+//        data.setValue("#"+JSONObject.toJSONString(dataJson));
+//        FunctionObject functionObject=new FunctionObject();
+//        functionObject.setCode("outPrint");
+//        data.setFunctions(Lists.newArrayList(functionObject));
+////        log.info("qin yu input {}", JSONObject.toJSONString(data));
+//        body.put("trafficPlatformId",jsonObject.getString("trafficPlatformId"));
+//        body.put("data","#"+JSONObject.toJSONString(data));
+//        List<ValueObject> args=Lists.newArrayList();
+//        ValueObject valueObject=new ValueObject();
+//        valueObject.setValue("#param.content.data");
+//        args.add(valueObject);
+//        ValueObject valueObject1=new ValueObject();
+//        valueObject1.setValue("#param.content.trafficPlatformId");
+//        args.add(valueObject1);
+//        ValueObject valueObject2=new ValueObject();
+//        valueObject1.setValue(jsonObject.getString("key"));
+//        args.add(valueObject2);
+//        FunctionObject functionObject1=new FunctionObject();
+//        functionObject1.setCode("md5Sign");
+//        functionObject1.setArgs(args);
+//        body.put("sign","#"+JSONObject.toJSONString(functionObject1));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[data][status]");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("qin yu api  {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description: openapi Rsa 信息
+//     * @author zhangyy
+//     * @date 2024/9/4 10:56
+//     * @version 1.0
+//     */
+//    private HttpApiConfig createOpenApiAesCheckIntoBean(String param) {
+//        JSONObject jsonObject=JSONObject.parseObject(param);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("openapiCheckUrl"));
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        KeyValueObject merchantNo=new KeyValueObject();
+//        merchantNo.setType("spel");
+//        merchantNo.setValue("#param.user.companyCity");
+//        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
+//        body.put("city","#"+JSONObject.toJSONString(merchantNo));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[data][status]");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("open api  rsa{}",jsonString);
+//        return httpApiConfig;
+//    }
+//    /**
+//     * @description: openapi Rsa 信息
+//     * @author zhangyy
+//     * @date 2024/9/4 10:56
+//     * @version 1.0
+//     */
+//    private HttpApiConfig createOpenApiRsaCheckIntoBean(String param) {
+//        JSONObject jsonObject=JSONObject.parseObject(param);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("openapiCheckUrl"));
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        KeyValueObject merchantNo=new KeyValueObject();
+//        merchantNo.setType("spel");
+//        merchantNo.setValue("#param.user.companyCity");
+//        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
+//        body.put("city","#"+JSONObject.toJSONString(merchantNo));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[data][status]");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("open api  rsa{}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description: 创建撞库httpApi信息
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/8/30 09:31
+//     */
+//    public HttpApiConfig createHuiRonCheckIntoBean(String param){
+//        JSONObject jsonObject=JSONObject.parseObject(param);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("checkUrl"));
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        KeyValueObject merchantNo=new KeyValueObject();
+//        merchantNo.setType("spel");
+//        merchantNo.setValue("#param.plan.bid");
+//        body.put("attackPhone","#"+JSONObject.toJSONString(attackPhone));
+//        body.put("merchantNo","#"+JSONObject.toJSONString(merchantNo));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[data][status]");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("huiRon api {}",jsonString);
+//         return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  惠众api对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 10:07
+//     */
+//    public void generateHuiZhongConfig(String openApiConfig){
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Huizhong");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHuiZhongCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description:
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 10:08
+//     */
+//    private HttpApiConfig createHuiZhongCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/user/check");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
 //        body.put("channelSource",jsonObject.getString("channelSource"));
-        body.put("channelCode",jsonObject.getString("channelCode"));
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]==0?0:1");
+//        body.put("phoneNo","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]=='0000'?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("huizhong api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  银华api对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 10:07
+//     */
+//    public void generateYinHuaConfig(String openApiConfig){
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":YinHua");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYinHuaCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createYinHuaCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"api/channel/clue/md5/_check");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        KeyValueObject head1=new KeyValueObject();
+//        head1.setKey("channel");
+//        head1.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head1.setValue(jsonObject.getString("channel"));
+//        headers.add(head);
+//        headers.add(head1);
+//
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+////        body.put("channelSource",jsonObject.getString("channelSource"));
+//        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]");
 //        List<FunctionObject> functionObjects = Lists.newArrayList();
 //        FunctionObject functionObject = new FunctionObject();
-//        functionObject.setCode("resultCodeConvertStatusInteger");
+//        functionObject.setCode("resultCodeConvertStatusString");
 //        functionObjects.add(functionObject);
 //        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("YouRon api {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:  哈蜜瓜 对接api 配置
-     * @author zhangyy
-     * @date 2024/9/9 16:05
-     * @version 1.0
-     */
-    public void generateHamiguaConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Hamigua");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHamiguaCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createHamiguaCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"v1/api/customer/repeat/check");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-
-        JSONObject body=new  JSONObject();
-
-//        body.put("channelSource",jsonObject.getString("channelSource"));
-//        body.put("channelCode",jsonObject.getString("channelCode"));
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("mobile_md5","#"+JSONObject.toJSONString(attackPhone));
-
-        KeyValueObject city=new KeyValueObject();
-        city.setType("spel");
-        city.setValue("#param.user.companyCity");
-        body.put("city","#"+JSONObject.toJSONString(city));
-
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]==10?0:1");
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("yinhua api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * 汇鑫对接方式
+//     * @param threeSystemConfig
+//     */
+//    public void generateHuixinConfig(String threeSystemConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Huixin");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(threeSystemConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHuixinCheckIntoBean(threeSystemConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createHuixinCheckIntoBean(String threeSystemConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(threeSystemConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"pushdata.ashx?type=CheckMobilePhone");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("phoneMd5","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
 //        List<FunctionObject> functionObjects = Lists.newArrayList();
 //        FunctionObject functionObject = new FunctionObject();
-//        functionObject.setCode("resultCodeConvertStatusInteger");
+//        functionObject.setCode("combinationCodeSuccessIsExit");
+//        List<ValueObject> valueObjectList= Lists.newArrayList();
+//        ValueObject valueObject = new ValueObject();
+//        valueObject.setType(ValueObjectTypeEnum.SPEL.getType());
+//        valueObject.setValue("#root[code]");
+//        valueObjectList.add(valueObject);
+//        ValueObject valueObject1 = new ValueObject();
+//        valueObject1.setType(ValueObjectTypeEnum.SPEL.getType());
+//        valueObject1.setValue("#root[status]");
+//        valueObjectList.add(valueObject1);
+//
+//
+//        functionObject.setArgs(valueObjectList);
 //        functionObjects.add(functionObject);
 //        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("Hamigua api {}",jsonString);
-        return httpApiConfig;
-    }
-    
-    /**
-     * @description:  灏瀚无崟
-     * @author zhangyy
-     * @date 2024/9/9 16:22 
-     * @version 1.0 
-     */
-    public void generateHaohanwuyinConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Haohanwuyin");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        
-        egApiEndpointDo.setApiId(egApiDo.getId());
-       
-        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHaohanwuyinCheckIntoBean(openApiConfig)));
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createHaohanwuyinCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/customer/collisionLibrary");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/json");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-
-        JSONObject body=new  JSONObject();
-
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("huixin api  {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  惠众直贷api对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 10:07
+//     */
+//    public void generateHuiZhongZhiConfig(String openApiConfig){
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Huizhong01");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHuiZhongCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    /**
+//     * @description: 惠众直贷api Config
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 10:08
+//     */
+//    private HttpApiConfig createHuiZhongZhiCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/user/check");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
 //        body.put("channelSource",jsonObject.getString("channelSource"));
-//        body.put("channelCode",jsonObject.getString("channelCode"));
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("md5_phone","#"+JSONObject.toJSONString(attackPhone));
-        body.put("channel_code",jsonObject.getString("channelCode"));
-        body.put("channel_secret_key",jsonObject.getString("channelSecretKey"));
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[code]==0?0:1");
+//        body.put("phoneNo","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]");
 //        List<FunctionObject> functionObjects = Lists.newArrayList();
 //        FunctionObject functionObject = new FunctionObject();
 //        functionObject.setCode("resultCodeConvertStatusInteger");
 //        functionObjects.add(functionObject);
 //        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("Haohanwuyin api {}",jsonString);
-        return httpApiConfig;
-    }
-}
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("huizhong api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//
+//    /**
+//     * @description:  愉快花api对接方式
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 10:07
+//     */
+//    public void generateYuKuaiHuaConfig(String openApiConfig){
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":YuKuaiHua");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYuKuaiHuaCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createYuKuaiHuaCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"api/External/hit_library");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//        JSONObject body=new  JSONObject();
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+////        body.put("channelSource",jsonObject.getString("channelSource"));
+//        body.put("userPhone","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]==1?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("YuKuaiHua api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  易借 api生成配置
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 15:16
+//     */
+//    public void generateYinJieConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":YiJie");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYinJieCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createYinJieCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"api/third/check_loan?server=1");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//
+//        JSONObject body=new  JSONObject();
+//
+////        body.put("channelSource",jsonObject.getString("channelSource"));
+//        body.put("channel",jsonObject.getString("channel"));
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        JSONObject data=new  JSONObject();
+//        data.put("type",102);
+//        data.put("mobileMd5","#"+JSONObject.toJSONString(attackPhone));
+//        body.put("data","#"+JSONObject.toJSONString(data));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]==0?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("YinJie api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  有融对接api
+//     * @author zhangyy
+//     * @date 2024/9/9 15:40
+//     * @version 1.0
+//     */
+//    public void generateYouRonConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Yourong");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createYouRonCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createYouRonCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"channel/openapi/checkuser");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//
+//        JSONObject body=new  JSONObject();
+//
+////        body.put("channelSource",jsonObject.getString("channelSource"));
+//        body.put("channelCode",jsonObject.getString("channelCode"));
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]==0?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("YouRon api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  哈蜜瓜 对接api 配置
+//     * @author zhangyy
+//     * @date 2024/9/9 16:05
+//     * @version 1.0
+//     */
+//    public void generateHamiguaConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Hamigua");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHamiguaCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createHamiguaCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"v1/api/customer/repeat/check");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//
+//        JSONObject body=new  JSONObject();
+//
+////        body.put("channelSource",jsonObject.getString("channelSource"));
+////        body.put("channelCode",jsonObject.getString("channelCode"));
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("mobile_md5","#"+JSONObject.toJSONString(attackPhone));
+//
+//        KeyValueObject city=new KeyValueObject();
+//        city.setType("spel");
+//        city.setValue("#param.user.companyCity");
+//        body.put("city","#"+JSONObject.toJSONString(city));
+//
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]==10?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("Hamigua api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  灏瀚无崟
+//     * @author zhangyy
+//     * @date 2024/9/9 16:22
+//     * @version 1.0
+//     */
+//    public void generateHaohanwuyinConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Haohanwuyin");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//
+//        egApiEndpointDo.setRequestConfig(HessianUtils.serialize(createHaohanwuyinCheckIntoBean(openApiConfig)));
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createHaohanwuyinCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/customer/collisionLibrary");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/json");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+//
+//        JSONObject body=new  JSONObject();
+//
+////        body.put("channelSource",jsonObject.getString("channelSource"));
+////        body.put("channelCode",jsonObject.getString("channelCode"));
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("md5_phone","#"+JSONObject.toJSONString(attackPhone));
+//        body.put("channel_code",jsonObject.getString("channelCode"));
+//        body.put("channel_secret_key",jsonObject.getString("channelSecretKey"));
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[code]==0?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("Haohanwuyin api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//}

+ 134 - 135
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/GenerateCheckIntoHttpApiConfigV2CmdExe.java

@@ -1,12 +1,13 @@
 package com.hrsk.cloud.eg.app.loan.executor;
 
-import com.alibaba.fastjson2.JSONObject;
 import com.google.common.collect.Lists;
 import com.hrsk.cloud.eg.client.constant.BusinessPrefixEnum;
 import com.hrsk.cloud.eg.domain.api.HttpApiConfig;
 import com.hrsk.cloud.eg.domain.api.KeyValueObject;
 import com.hrsk.cloud.eg.domain.api.common.ApiPayloadTypeEnum;
 import com.hrsk.cloud.eg.domain.api.common.ValueObjectTypeEnum;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgressApiChannelDo;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgressApiDo;
 import com.hrsk.cloud.eg.infrastructure.service.EgApiChannelService;
 import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
 import lombok.extern.slf4j.Slf4j;
@@ -21,110 +22,42 @@ import java.util.List;
  * @description: GenerateCheckIntoHttpApiConfigV2Service
  * @date 2024/9/9 16:35
  */
-@Slf4j
-@Component
-public class GenerateCheckIntoHttpApiConfigV2CmdExe {
-    @Resource
-    private EgApiService egApiService;
-
-    @Resource
-    private EgApiChannelService egApiChannelService;
-    /**
-     * @description:  灏瀚无崟
-     * @author zhangyy
-     * @date 2024/9/9 16:22
-     * @version 1.0
-     */
-    public void generateGexinjinfuConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+ BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Gexinjinfu");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        egApiEndpointDo.setApiId(egApiDo.getId());
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createGexinjinfuCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/rsatg/checkmobile");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/x-www-form-urlencoded; charset=UTF-8");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
-        List<KeyValueObject> search = Lists.newArrayList();
-        KeyValueObject searchKey=new KeyValueObject();
-        searchKey.setType(ValueObjectTypeEnum.SPEL.getType());
-        searchKey.setKey("mobnum_md5");
-        searchKey.setValue("#param.user.phoneMd5");
-        search.add(searchKey);
-        httpApiConfig.setSearch(search);
-//        JSONObject body=new  JSONObject();
-//        body.put("channelSource",jsonObject.getString("channelSource"));
-//        body.put("channelCode",jsonObject.getString("channelCode"));
-//        KeyValueObject attackPhone=new KeyValueObject();
-//        attackPhone.setType("spel");
-//        attackPhone.setValue("#param.user.phoneMd5");
-//        body.put("md5_phone","#"+JSONObject.toJSONString(attackPhone));
-//        body.put("channel_code",jsonObject.getString("channelCode"));
-//        body.put("channel_secret_key",jsonObject.getString("channelSecretKey"));
-//        //主体
-//        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        httpApiConfig.setContent("");
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[status]==200?0:1");
-//        List<FunctionObject> functionObjects = Lists.newArrayList();
-//        FunctionObject functionObject = new FunctionObject();
-//        functionObject.setCode("resultCodeConvertStatusInteger");
-//        functionObjects.add(functionObject);
-//        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("Gexinjinfu api {}",jsonString);
-        return httpApiConfig;
-    }
-
-    /**
-     * @description:  快亿贷 api配置
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/9 18:06
-     */
-    public void generateKuaiyidaiConfig(String openApiConfig) {
-        EgApiDo egApiDo=new EgApiDo();
-        egApiDo.setApiCode("EG:"+ BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Kuaiyidai");
-        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
-        egApiService.save(egApiDo);
-        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
-        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
-        egApiEndpointDo.setApiId(egApiDo.getId());
-        egApiChannelService.save(egApiEndpointDo);
-    }
-
-    private HttpApiConfig createKuaiyidaiCheckIntoBean(String openApiConfig) {
-        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
-        HttpApiConfig httpApiConfig = new HttpApiConfig();
-        httpApiConfig.setUrl(jsonObject.getString("url")+"/Admin/UserIncomeApi/comparePhoneMonitor");
-        httpApiConfig.setMethod("POST");
-        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_X_WWW_FORM_URLENCODED.getCode());
-        List<KeyValueObject> headers = Lists.newArrayList();
-        KeyValueObject head=new KeyValueObject();
-        head.setType(ValueObjectTypeEnum.BASIC.getType());
-        head.setKey("Content-Type");
-        head.setValue("application/x-www-form-urlencoded; charset=UTF-8");
-        headers.add(head);
-        httpApiConfig.setHeader(headers);
+//@Component
+//public class GenerateCheckIntoHttpApiConfigV2CmdExe {
+//    @Resource
+//    private EgApiService egApiService;
+//
+//    @Resource
+//    private EgApiChannelService egApiChannelService;
+//    /**
+//     * @description:  灏瀚无崟
+//     * @author zhangyy
+//     * @date 2024/9/9 16:22
+//     * @version 1.0
+//     */
+//    public void generateGexinjinfuConfig(String openApiConfig) {
+//        EgressApiDo egApiDo=new EgressApiDo();
+//        egApiDo.setApiCode("EG:"+ BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Gexinjinfu");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        EgressApiChannelDo egApiEndpointDo=new EgressApiChannelDo();
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createGexinjinfuCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"/api/rsatg/checkmobile");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/x-www-form-urlencoded; charset=UTF-8");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
 //        List<KeyValueObject> search = Lists.newArrayList();
 //        KeyValueObject searchKey=new KeyValueObject();
 //        searchKey.setType(ValueObjectTypeEnum.SPEL.getType());
@@ -132,33 +65,99 @@ public class GenerateCheckIntoHttpApiConfigV2CmdExe {
 //        searchKey.setValue("#param.user.phoneMd5");
 //        search.add(searchKey);
 //        httpApiConfig.setSearch(search);
-        JSONObject body=new  JSONObject();
-        body.put("qdName",jsonObject.getString("qdName"));
-        KeyValueObject attackPhone=new KeyValueObject();
-        attackPhone.setType("spel");
-        attackPhone.setValue("#param.user.phoneMd5");
-        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
-        KeyValueObject city=new KeyValueObject();
-        city.setType("spel");
-        city.setValue("#param.user.cityAllName");
-        body.put("city","#"+JSONObject.toJSONString(city));
-
-        //主体
-        httpApiConfig.setContent(JSONObject.toJSONString(body));
-        httpApiConfig.setContent("");
-        JSONObject resultObj=new  JSONObject();
-        KeyValueObject status=new KeyValueObject();
-        status.setType("spel");
-        status.setValue("#root[status]==200?0:1");
-//        List<FunctionObject> functionObjects = Lists.newArrayList();
-//        FunctionObject functionObject = new FunctionObject();
-//        functionObject.setCode("resultCodeConvertStatusInteger");
-//        functionObjects.add(functionObject);
-//        status.setFunctions(functionObjects);
-        resultObj.put("status","#"+JSONObject.toJSONString(status));
-        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
-        String jsonString = JSONObject.toJSONString(httpApiConfig);
-        log.info("Kuaiyidai api {}",jsonString);
-        return httpApiConfig;
-    }
-}
+////        JSONObject body=new  JSONObject();
+////        body.put("channelSource",jsonObject.getString("channelSource"));
+////        body.put("channelCode",jsonObject.getString("channelCode"));
+////        KeyValueObject attackPhone=new KeyValueObject();
+////        attackPhone.setType("spel");
+////        attackPhone.setValue("#param.user.phoneMd5");
+////        body.put("md5_phone","#"+JSONObject.toJSONString(attackPhone));
+////        body.put("channel_code",jsonObject.getString("channelCode"));
+////        body.put("channel_secret_key",jsonObject.getString("channelSecretKey"));
+////        //主体
+////        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        httpApiConfig.setContent("");
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[status]==200?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("Gexinjinfu api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//
+//    /**
+//     * @description:  快亿贷 api配置
+//     * @param:
+//     * @return:
+//     * @author zhangyy
+//     * @date: 2024/9/9 18:06
+//     */
+//    public void generateKuaiyidaiConfig(String openApiConfig) {
+//        EgApiDo egApiDo=new EgApiDo();
+//        egApiDo.setApiCode("EG:"+ BusinessPrefixEnum.CHECK_INTO_PREFIX.getCode()+":Kuaiyidai");
+//        egApiDo.setApiName(BusinessPrefixEnum.CHECK_INTO_PREFIX.getMsg());
+//        egApiService.save(egApiDo);
+//        JSONObject jsonObject = JSONObject.parseObject(openApiConfig);
+//        EgApiEndpointDo egApiEndpointDo=new EgApiEndpointDo();
+//        egApiEndpointDo.setApiId(egApiDo.getId());
+//        egApiChannelService.save(egApiEndpointDo);
+//    }
+//
+//    private HttpApiConfig createKuaiyidaiCheckIntoBean(String openApiConfig) {
+//        JSONObject jsonObject=JSONObject.parseObject(openApiConfig);
+//        HttpApiConfig httpApiConfig = new HttpApiConfig();
+//        httpApiConfig.setUrl(jsonObject.getString("url")+"/Admin/UserIncomeApi/comparePhoneMonitor");
+//        httpApiConfig.setMethod("POST");
+//        httpApiConfig.setContentType(ApiPayloadTypeEnum.APPLICATION_X_WWW_FORM_URLENCODED.getCode());
+//        List<KeyValueObject> headers = Lists.newArrayList();
+//        KeyValueObject head=new KeyValueObject();
+//        head.setType(ValueObjectTypeEnum.BASIC.getType());
+//        head.setKey("Content-Type");
+//        head.setValue("application/x-www-form-urlencoded; charset=UTF-8");
+//        headers.add(head);
+//        httpApiConfig.setHeader(headers);
+////        List<KeyValueObject> search = Lists.newArrayList();
+////        KeyValueObject searchKey=new KeyValueObject();
+////        searchKey.setType(ValueObjectTypeEnum.SPEL.getType());
+////        searchKey.setKey("mobnum_md5");
+////        searchKey.setValue("#param.user.phoneMd5");
+////        search.add(searchKey);
+////        httpApiConfig.setSearch(search);
+//        JSONObject body=new  JSONObject();
+//        body.put("qdName",jsonObject.getString("qdName"));
+//        KeyValueObject attackPhone=new KeyValueObject();
+//        attackPhone.setType("spel");
+//        attackPhone.setValue("#param.user.phoneMd5");
+//        body.put("phone","#"+JSONObject.toJSONString(attackPhone));
+//        KeyValueObject city=new KeyValueObject();
+//        city.setType("spel");
+//        city.setValue("#param.user.cityAllName");
+//        body.put("city","#"+JSONObject.toJSONString(city));
+//
+//        //主体
+//        httpApiConfig.setContent(JSONObject.toJSONString(body));
+//        httpApiConfig.setContent("");
+//        JSONObject resultObj=new  JSONObject();
+//        KeyValueObject status=new KeyValueObject();
+//        status.setType("spel");
+//        status.setValue("#root[status]==200?0:1");
+////        List<FunctionObject> functionObjects = Lists.newArrayList();
+////        FunctionObject functionObject = new FunctionObject();
+////        functionObject.setCode("resultCodeConvertStatusInteger");
+////        functionObjects.add(functionObject);
+////        status.setFunctions(functionObjects);
+//        resultObj.put("status","#"+JSONObject.toJSONString(status));
+//        httpApiConfig.setResult(JSONObject.toJSONString(resultObj));
+//        String jsonString = JSONObject.toJSONString(httpApiConfig);
+//        log.info("Kuaiyidai api {}",jsonString);
+//        return httpApiConfig;
+//    }
+//}

+ 128 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/client/vo/DataVo.java

@@ -0,0 +1,128 @@
+package com.hrsk.cloud.eg.client.vo;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: DataVo
+ * @date 2024/11/16 11:07
+ */
+public class DataVo<T> implements Serializable {
+
+    private Integer status;
+    private String msg;
+    private T data;
+
+    public DataVo(Integer status, String msg) {
+        this.status = status;
+        this.msg = msg;
+    }
+
+    public DataVo() {
+    }
+
+    public DataVo(Integer status, String msg, T data) {
+        this.status = status;
+        this.msg = msg;
+        this.data = data;
+    }
+
+    public static <T> DataVo<T> dataVo(Integer status, String msg, T data) {
+        return createDefaulDataVo(status, msg, data);
+    }
+
+    public static <T> DataVo<T> success(String msg, T data) {
+        return createDefaulDataVo(0, msg, data);
+    }
+
+    public static <T> DataVo<T> success(Integer status, String msg, T data) {
+        return createDefaulDataVo(status, msg, data);
+    }
+
+    public static <T> DataVo<T> fail(String msg, T data) {
+        return createDefaulDataVo(1, msg, data);
+    }
+
+
+
+    public static <T> DataVo<T> fail(Integer status, String msg, T data) {
+        return createDefaulDataVo(status, msg, data);
+    }
+
+    public static <T> DataVo<T> createDefaulDataVo(Integer code, String message, T data) {
+        DataVo<T> responseVo = new DataVo();
+        if (code != null) {
+            responseVo.setStatus(code);
+        }
+
+        if (!Objects.isNull(message)) {
+            responseVo.setMsg(message);
+        }
+
+        if (data != null) {
+            responseVo.setData(data);
+        }
+
+        return responseVo;
+    }
+
+    public static DataVo timeout(String msg) {
+        return new DataVo(2, msg);
+    }
+
+    public static <T> DataVo<T> timeout(T data, String msg) {
+        return new DataVo(2, msg, data);
+    }
+
+    public static DataVo success() {
+        return new DataVo(0, "撞库成功");
+    }
+
+    public static DataVo success(String msg) {
+        return new DataVo(0, msg);
+    }
+
+    public static DataVo success(Integer status, String msg) {
+        return new DataVo(status, msg);
+    }
+
+    public static DataVo success(Integer status) {
+        return new DataVo(status, "成功");
+    }
+
+    public static DataVo fail() {
+        return new DataVo(1, "撞库失败");
+    }
+
+    public static DataVo fail(String msg) {
+        return new DataVo(1, msg + "撞库失败");
+    }
+
+    public Integer getStatus() {
+        return this.status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getMsg() {
+        return this.msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public T getData() {
+        return this.data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+
+}

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

@@ -65,5 +65,13 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-expression</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 0 - 183
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/HttpApi.java

@@ -1,183 +0,0 @@
-package com.hrsk.cloud.eg.domain.api;
-
-import com.alibaba.cola.domain.Entity;
-import com.alibaba.cola.exception.BizException;
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONArray;
-import com.alibaba.fastjson2.JSONObject;
-import com.google.gson.JsonObject;
-import com.hrsk.cloud.eg.domain.api.common.ApiPayloadTypeEnum;
-import com.hrsk.cloud.eg.domain.api.resolver.payload.ApiPayloadResolverManage;
-import com.hrsk.cloud.eg.domain.api.resolver.result.ApiResultResolverManage;
-import com.hrsk.cloud.eg.vo.response.DataVo;
-import com.hrsk.cloud.eg.vo.response.DefaultResponseVo;
-import lombok.Getter;
-import lombok.ToString;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.util.CollectionUtils;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * @author: bianlanzhou
- * @create: 2024-07-26 17:59
- * @description: HTTP API
- **/
-@Slf4j
-@ToString
-@Entity
-public class HttpApi implements Api {
-    /**
-     * url分隔符
-     */
-    private static final String URL_SEPARATOR = "/";
-
-    /**
-     * search分隔符
-     */
-    private static final String URL_SEARCH_SEPARATOR = "&";
-
-    /**
-     * 等于号
-     */
-    private static final String _EQUAL = "=";
-    /**
-     * search标记符
-     */
-    private static final String URL_SEARCH = "?";
-
-    @Override
-    public String getType() {
-        return "http";
-    }
-
-    /**
-     * url地址
-     */
-    @Getter
-    private String url;
-    /**
-     * 请求方法
-     */
-    @Getter
-    private String method;
-    /**
-     * http api配置
-     */
-    private HttpApiConfig httpApiConfig;
-    /**
-     * header数据
-     */
-    @Getter
-    private final Map<String, Object> header = new HashMap<>();
-    /**
-     * 请求payload数据
-     */
-    @Getter
-    private Object payload;
-
-
-    /**
-     * 加载
-     * @param httpApiConfig http api 配置
-     */
-    public void load(HttpApiConfig httpApiConfig,Object input){
-        this.httpApiConfig = httpApiConfig;
-        ApiContext context = new ApiContext(input);
-        this.method = httpApiConfig.getMethod();
-        loadCompleteUrl(context);
-        loadHeader(context);
-        loadBody(context);
-    }
-
-    /**
-     * @description: 加载返回值配置
-     * @author zhangyy
-     * @date 2024/9/2 15:58
-     * @version 1.0
-     */
-    public Object loadResult(HttpApiConfig config,Object output){
-        this.httpApiConfig = config;
-         Map<String,Object> params =JSONObject.parseObject(output.toString(),Map.class);
-         return doLoadResult(params);
-    }
-
-
-    /**
-     * 加载path,包含path和search
-     * @param context 上下文
-     */
-    private void loadCompleteUrl(ApiContext context){
-        StringBuilder urlSb = new StringBuilder(httpApiConfig.getUrl());
-        for(ValueObject valueObject : httpApiConfig.getPath()){
-            urlSb.append(URL_SEPARATOR).append(valueObject.compile(context).getRealValue());
-        }
-        if(!CollectionUtils.isEmpty(httpApiConfig.getSearch())){
-            StringBuilder searchSb = new StringBuilder();
-            for(KeyValueObject keyValueObject : httpApiConfig.getSearch()){
-                searchSb.append(URL_SEARCH_SEPARATOR).append(keyValueObject.getKey()).append(_EQUAL).append(keyValueObject.compile(context).getRealValue());
-            }
-            urlSb.append(URL_SEARCH).append(searchSb.toString().replaceFirst(URL_SEARCH_SEPARATOR,""));
-        }
-        url = urlSb.toString();
-    }
-
-    /**
-     * 加载header
-     * @param context 上下文
-     */
-    private void loadHeader(ApiContext context){
-        for(KeyValueObject keyValueObject : httpApiConfig.getHeader()){
-            this.header.put(keyValueObject.getKey(),  keyValueObject.compile(context).getRealValue().toString());
-        }
-    }
-
-
-
-
-    /**
-     * 加载请求体
-     * @param context 上下文
-     */
-    private void loadBody(ApiContext context){
-        if(StringUtils.equals(httpApiConfig.getContentType(), ApiPayloadTypeEnum.APPLICATION_JSON.getCode())
-        ||StringUtils.equals(httpApiConfig.getContentType(),ApiPayloadTypeEnum.APPLICATION_X_WWW_FORM_URLENCODED.getCode())
-        ){
-            payload = Objects.toString(ApiPayloadResolverManage.getInstance().resolve(httpApiConfig.getContentType(),httpApiConfig.getContent(),context),"");
-        }else{
-            throw new BizException("不支持的请求体类型!");
-        }
-    }
-    /**
-     * @description:  解析返回值
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/2 16:01
-     */
-    private Object doLoadResult(Map<String,Object> output) {
-
-        try {
-            //判断是否存在这个返回信息的配置
-//            if(StringUtils.equals(httpApiConfig.getContentType(), ApiPayloadTypeEnum.APPLICATION_JSON.getCode())){
-//               if (Objects.isNull(httpApiConfig.getResultHandle())) {
-//                   result=Objects.toString(ApiPayloadResolverManage.getInstance().resolve(httpApiConfig.getContentType(),httpApiConfig.getResult(),output),"");
-//               }
-//                JSONArray resultHandleJson=JSON.parseObject(httpApiConfig.getResultHandle(),JSONArray.class);
-//               if (CollectionUtils.isEmpty(resultHandleJson)) {
-//                   result=Objects.toString(ApiPayloadResolverManage.getInstance().resolve(httpApiConfig.getContentType(),httpApiConfig.getResult(),output),"");
-//               }
-               return Objects.toString(ApiResultResolverManage.getInstance().resolve(httpApiConfig.getContentType(),httpApiConfig.getResult(),output),"");
-//            }
-        }catch (Exception e){
-            //下面这种方式是默认和统一的返回
-            log.error("Api 统一返回值解析异常",e);
-            return null;
-        }
-
-    }
-
-
-}

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

@@ -4,7 +4,7 @@ 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.client.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;

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

@@ -2,19 +2,22 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
 import com.hrsk.cloud.eg.client.dto.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.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.common.ServerCodeEnums;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequestConfig;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
+import com.hrsk.cloud.eg.domain.common.HessianUtils;
+import com.hrsk.cloud.eg.domain.common.Md5Util;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
-import javax.annotation.Resource;
 import java.time.Instant;
 import java.util.*;
 
@@ -22,8 +25,8 @@ import java.util.*;
  * @Author Liu Tao
  * @Date 2023 11 09 09 49
  **/
-@Service
 @Slf4j
+@Service
 public class AnHuiHengDaoCreditService implements LoanDockingApi {
 
 
@@ -73,7 +76,7 @@ public class AnHuiHengDaoCreditService implements LoanDockingApi {
      * @param product
      * @return
      */
-    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo) {
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd    configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc) {
         try {
             log.info("credit AnHuiHengDaoCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
            
@@ -95,9 +98,10 @@ public class AnHuiHengDaoCreditService implements LoanDockingApi {
             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;
+            HttpApiResponse response = null;
             try{
-                response =httpRestTemplate.restTemplate().postForObject(url,checkInfo, String.class);
+                HttpApiRequest request=new HttpApiRequest(HttpApiRequestConfig.postRequest(JSON.toJSONString(checkInfo),"post",url));
+                response =httpClientFunc.apply(request);
             }catch (Exception e){
                 log.error("安徽恒道准入异常,异常信息:{}", e.getMessage(), e);
             }
@@ -105,7 +109,7 @@ public class AnHuiHengDaoCreditService implements LoanDockingApi {
             if (response == null) {
                 return DataVo.timeout(product.getPlanName());
             }
-            JSONObject jsonObject=JSONObject.parseObject(response);
+            JSONObject jsonObject=JSONObject.parseObject(response.getData().toString());
             if (jsonObject == null) {
                 return DataVo.timeout(product.getPlanName());
             }

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

@@ -2,21 +2,18 @@ package com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.base.Function;
 import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
 import com.hrsk.cloud.eg.client.dto.plan.command.PlanCmd;
 import com.hrsk.cloud.eg.client.dto.user.command.UserBaseInfoCmd;
-import com.hrsk.cloud.eg.clinet.vo.DataVo;
-import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
-import com.hrsk.cloud.eg.infrastructure.utils.DateUtil;
-import com.hrsk.cloud.eg.infrastructure.utils.Md5Util;
+import com.hrsk.cloud.eg.client.vo.DataVo;
+import com.hrsk.cloud.eg.domain.api.channel.customized.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiRequest;
+import com.hrsk.cloud.eg.domain.api.channel.guide.http.HttpApiResponse;
 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;
@@ -37,11 +34,7 @@ import java.util.Date;
 @Service
 public class BaiXinShunTaiCreditService implements LoanDockingApi {
     public static String code = "UTF-8";
-    @Resource
-    private RetryRestTemplate httpRestTemplate;
 
-    @Resource
-    private EgApiService egApiService;
 
     //撞库
     @Data
@@ -87,7 +80,7 @@ public class BaiXinShunTaiCreditService implements LoanDockingApi {
     }
 
     @Override
-    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo)  {
+    public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo, Function<HttpApiRequest, HttpApiResponse> httpClientFunc)  {
         try {
             log.info("credit QingDaoBaiXinShunTaiCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
           

+ 16 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/guide/http/HttpApiRequestConfig.java

@@ -43,4 +43,20 @@ public class HttpApiRequestConfig {
      * body
      */
     private String body;
+
+    /**
+     * @description: post 请求方式的方法
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/11/16 12:07
+     */
+    public static HttpApiRequestConfig postRequest(String body, String method, String url) {
+
+        HttpApiRequestConfig httpApiRequestConfig = new HttpApiRequestConfig();
+        httpApiRequestConfig.setMethod(method);
+        httpApiRequestConfig.setUrl(url);
+        httpApiRequestConfig.setBody(body);
+        return httpApiRequestConfig;
+    }
 }

+ 1 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/channel/guide/resolver/payload/ApiPayloadResolverManage.java

@@ -2,6 +2,7 @@ package com.hrsk.cloud.eg.domain.api.channel.guide.resolver.payload;
 
 import com.google.common.collect.Maps;
 import com.google.gson.JsonObject;
+import com.hrsk.cloud.eg.domain.api.ApiContext;
 import com.hrsk.cloud.eg.domain.api.channel.guide.common.ContentTypeEnum;
 import lombok.extern.slf4j.Slf4j;
 

+ 72 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/BeanCopyUtils.java

@@ -0,0 +1,72 @@
+package com.hrsk.cloud.eg.domain.common;
+
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ *
+ * Author:   zhangyy
+ * Date:     2020/4/3 14:29
+ * Description: BeanCopy工具
+ * History:
+ * describe:
+ **/
+public class BeanCopyUtils {
+
+    /**
+     * 空值不复制
+     *
+     * @param source
+     * @return
+     */
+    public static String[] getNullPropertyNames(Object source) {
+        final BeanWrapper src = new BeanWrapperImpl(source);
+        java.beans.PropertyDescriptor[] pds = src.getPropertyDescriptors();
+
+        Set<String> emptyNames = new HashSet<String>();
+        for (java.beans.PropertyDescriptor pd : pds) {
+            Object srcValue = src.getPropertyValue(pd.getName());
+            if (srcValue == null) emptyNames.add(pd.getName());
+        }
+        String[] result = new String[emptyNames.size()];
+        return emptyNames.toArray(result);
+    }
+
+    /**
+     * 透传数据
+     *
+     * @param <T>
+     */
+    public static <T, K> T copy(final K k, final Class<? extends T> t) {
+        try {
+            T r = t.newInstance();
+            BeanUtils.copyProperties(k, r);
+            return r;
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+    /**
+     * 透传数据
+     *
+     * @param <T>
+     */
+    public static <T, K> List<T> copyList(final List<K> kl, final Class<? extends T> t) {
+        try {
+            List<T> l = new ArrayList<>(kl.size());
+            for (K k : kl) {
+                l.add(copy(k, t));
+            }
+            return l;
+        } catch (Exception e) {
+            return new ArrayList<>();
+        }
+    }
+}

+ 196 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/DateUtil.java

@@ -0,0 +1,196 @@
+package com.hrsk.cloud.eg.domain.common;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: Dateutil
+ * @date 2024/9/10 15:29
+ */
+public class DateUtil {
+
+    /**
+     * Get time string.
+     *
+     * @return the string
+     */
+    public static String getTime() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date date = new Date();
+        return sdf.format(date);
+    }
+
+    public static String getTime(Date date) {
+        if (null == date) {
+            return null;
+        }
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        return sdf.format(date);
+    }
+
+    public static String getDate() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        return sdf.format(date);
+    }
+
+    public static String getYesterday() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        return sdf.format(dayAddNum(date, -1));
+    }
+
+    public static String getTomorrow() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        return sdf.format(dayAddNum(date, 1));
+    }
+
+    public static String getDateTwo() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        return sdf.format(date);
+    }
+
+    public static Date convertString2Date(String date1, String format) {
+        SimpleDateFormat sdf1 = new SimpleDateFormat(format);
+        Date parse = null;
+        try {
+            parse = sdf1.parse(date1);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return parse;
+    }
+
+    public static Date getTimeDate(String format) throws ParseException {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        return sdf.parse(format);
+    }
+
+    public static Date getTimeDateWithDay(String format) throws ParseException {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        return sdf.parse(format);
+    }
+
+    public static String getDayStr(){
+        Date date = new Date();
+        SimpleDateFormat sdf= new SimpleDateFormat("yyyyMMdd");
+        return sdf.format(date);
+    }
+
+    public static String getFormatDate(Date... dates) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        Date date = new Date();
+        if (dates.length > 0) {
+            date = dates[0];
+        }
+        return sdf.format(date);
+    }
+
+    public static String getFormatDate(Date date, String format) {
+        SimpleDateFormat sdf = new SimpleDateFormat(format);
+
+        return sdf.format(date);
+    }
+
+    public static String getFormatDate10(Date date) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        return sdf.format(date);
+    }
+
+    public static String getFormatDate11(Date date) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
+        return sdf.format(date);
+    }
+
+
+    public static String getFormatDate5(Date date) {
+        SimpleDateFormat sdf = new SimpleDateFormat("MM-dd");
+        return sdf.format(date);
+    }
+
+    public static boolean compare(String time1, String time2) throws ParseException {
+        //如果想比较日期则写成"yyyy-MM-dd"就可以了
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        //将字符串形式的时间转化为Date类型的时间
+        Date a = sdf.parse(time1);
+        Date b = sdf.parse(time2);
+        //Date类的一个方法,如果a早于b返回true,否则返回false
+        if (a.before(b))
+            return true;
+        else
+            return false;
+		/*
+		 * 如果你不喜欢用上面这个太流氓的方法,也可以根据将Date转换成毫秒
+		if(a.getTime()-b.getTime()<0)
+			return true;
+		else
+			return false;
+		*/
+    }
+
+    public static boolean compare(String time1, Date b) throws ParseException {
+        //如果想比较日期则写成"yyyy-MM-dd"就可以了
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        //将字符串形式的时间转化为Date类型的时间
+        Date a = sdf.parse(time1);
+
+        //Date类的一个方法,如果a早于b返回true,否则返回false
+        if (a.before(b))
+            return true;
+        else
+            return false;
+    }
+
+    /**
+     * @param time 时间
+     * @param num  加的数,-num就是减去
+     * @return 减去相应的数量的天的日期
+     * @throws ParseException Date
+     */
+    public static Date dayAddNum(Date time, Integer num) {
+        //SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        //Date date = format.parse(time);
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(time);
+        calendar.add(Calendar.DAY_OF_MONTH, num);
+        Date newTime = calendar.getTime();
+        return newTime;
+    }
+
+    /**
+     * @param time 时间
+     * @param num  加的数,-num就是减去
+     * @return 减去相应的数量的天的日期
+     * @throws ParseException Date
+     */
+    public static Date yearAddNum(Date time, Integer num) {
+        //SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        //Date date = format.parse(time);
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(time);
+        calendar.add(Calendar.DAY_OF_YEAR, num);
+        Date newTime = calendar.getTime();
+        return newTime;
+    }
+
+    public static Date monthAddNum(Date time, Integer num) {
+        //SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        //Date date = format.parse(time);
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(time);
+        calendar.add(Calendar.MONTH, num);
+        Date newTime = calendar.getTime();
+        return newTime;
+    }
+
+
+}

+ 2 - 1
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/utils/Md5Util.java → egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/Md5Util.java

@@ -1,6 +1,7 @@
-package com.hrsk.cloud.eg.infrastructure.utils;
+package com.hrsk.cloud.eg.domain.common;
 
 import lombok.extern.slf4j.Slf4j;
+
 import java.security.MessageDigest;
 
 

+ 0 - 1
egress-gateway-service-infrastructure/pom.xml

@@ -46,7 +46,6 @@
             <groupId>com.baomidou</groupId>
             <artifactId>mybatis-plus</artifactId>
         </dependency>
-
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>

+ 0 - 35
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/LoanDockingApi.java

@@ -1,35 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking;
-
-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;
-
-/**
- * @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);
-
-
-    /**
-     * @description: 对接类型
-     * @param:
-     * @return:
-     * @author zhangyy
-     * @date: 2024/9/10 14:33
-     */
-    ServerCodeEnums getType();
-
-}

+ 0 - 163
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/AnHuiHengDaoCreditService.java

@@ -1,163 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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.service.EgApiService;
-import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
-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 {
-
-    @Resource
-     private RetryRestTemplate httpRestTemplate;
-
-    @Resource
-    private EgApiService egApiService;
-
-
-    @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;
-    }
-
-}

+ 0 - 173
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/BaiXinShunTaiCreditService.java

@@ -1,173 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-}
-
-
-
-

+ 0 - 152
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/BaiYiJinFuCreditService.java

@@ -1,152 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-}

+ 0 - 260
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/BeiJingChongHeCreditService.java

@@ -1,260 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-            }
-        }
-
-    }
-
-}

+ 0 - 111
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/CangZhouSuYiRonogCreditService.java

@@ -1,111 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 178
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/CheYouRongCreditService.java

@@ -1,178 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-        }
-    }
-
-
-}

+ 0 - 138
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChengDuYiHeShengCreditService.java

@@ -1,138 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-        }
-
-    }
-
-
-}

+ 0 - 134
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChengHongHuiCreditService.java

@@ -1,134 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-
-}

+ 0 - 152
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChongQinDongRunCreditService.java

@@ -1,152 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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 "";
-        }
-
-    }
-
-
-}

+ 0 - 148
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChongQingRuiShangXinCreditService.java

@@ -1,148 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-}

+ 0 - 120
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChongQingYiYueCreditService.java

@@ -1,120 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-
-}

+ 0 - 103
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ChuanjinCreditService.java

@@ -1,103 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 110
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeLuoXuanAesCreditService.java

@@ -1,110 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-}

+ 0 - 108
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeLuoXuanCreditService.java

@@ -1,108 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 116
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeZhouXinYiRongCreditService.java

@@ -1,116 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.impl;
-
-import com.alibaba.fastjson2.JSONObject;
-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.client.dto.plan.command.PlanCmd;
-import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
-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());
-        }
-
-    }
-
-
-}

+ 0 - 112
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DeZhouXinYiRongV2CreditService.java

@@ -1,112 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

File diff suppressed because it is too large
+ 0 - 35
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/DfrzwCreditService.java


+ 0 - 133
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FangxinwangiCreditService.java

@@ -1,133 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-
-
-}

+ 0 - 121
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FuChengCreditService.java

@@ -1,121 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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次加密的作用。
-    }
-}

+ 0 - 91
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FuZhouBeiJiuCreditService.java

@@ -1,91 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 132
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/FuZhouBeiYinJinRongCreditService.java

@@ -1,132 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-}

+ 0 - 108
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GexinjinfuCreditService.java

@@ -1,108 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 102
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuanZhouPuHuiCreditService.java

@@ -1,102 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 105
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuangDongHaoEnCreditService.java

@@ -1,105 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 94
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuangDongHongZhanCreditService.java

@@ -1,94 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-
-}

+ 0 - 131
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/GuangZhouHuaXinCreditService.java

@@ -1,131 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 115
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HamiguaCreditService.java

@@ -1,115 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 114
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HaohanwuyinCreditService.java

@@ -1,114 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 94
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HeFeiShenDaiCreditService.java

@@ -1,94 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-}

+ 0 - 100
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HeZeRongXinCreditService.java

@@ -1,100 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-
-}

+ 0 - 124
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HengYangJiuZhenCreditService.java

@@ -1,124 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-
-}

+ 0 - 149
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HengaiCreditService.java

@@ -1,149 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-}

+ 0 - 106
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HongShengJinFuCreditService.java

@@ -1,106 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 119
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HongXinPuHuiCreditService.java

@@ -1,119 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.impl;
-
-import com.alibaba.fastjson2.JSONObject;
-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.EgLoanApiConfigInfoCmd;
-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 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());
-        }
-
-    }
-
-
-}

+ 0 - 117
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuNanDiShuiYanCreditService.java

@@ -1,117 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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次加密的作用。
-    }
-
-
-
-}

+ 0 - 105
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuirongCrmCreditService.java

@@ -1,105 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 133
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuixinCreditService.java

@@ -1,133 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-}

+ 0 - 164
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/HuizhongCreditService.java

@@ -1,164 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-            }
-        }
-    }
-}

+ 0 - 150
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JianZhanCreditService.java

@@ -1,150 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 93
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JiechengCreditService.java

@@ -1,93 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-
-}

+ 0 - 95
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JilingHuiRongCreditService.java

@@ -1,95 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 152
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinDieV2CreditService.java

@@ -1,152 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-}

+ 0 - 98
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinDieV3CreditService.java

@@ -1,98 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-}

+ 0 - 80
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinDieV4CreditService.java

@@ -1,80 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 122
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JinZhuLiCreditService.java

@@ -1,122 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-}

+ 0 - 96
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JindieCreditService.java

@@ -1,96 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-}

+ 0 - 94
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/JiuXinKeCreditService.java

@@ -1,94 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 98
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiYiRongCreditService.java

@@ -1,98 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}
-

+ 0 - 100
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiCreditService.java

@@ -1,100 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-}

+ 0 - 101
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiFourToOneCreditService.java

@@ -1,101 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-}

+ 0 - 107
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiNightCreditService.java

@@ -1,107 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-}

+ 0 - 105
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KuaiyidaiV2CreditService.java

@@ -1,105 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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.*;
-
-/**
- * 快易贷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());
-        }
-
-    }
-
-
-}

+ 0 - 93
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/KunMingXiaoSongShuCreditService.java

@@ -1,93 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 86
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/LeXiangRongCreditService.java

@@ -1,86 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-
-}

+ 0 - 131
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/LianKeYunKongCreditService.java

@@ -1,131 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-}

+ 0 - 103
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/LiaoChengXinYiDaiCreditService.java

@@ -1,103 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 131
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/MoGuTouCreditService.java

@@ -1,131 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-}

+ 0 - 107
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/NanTongXingChengCreditService.java

@@ -1,107 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 87
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/NiYouKeCreditService.java

@@ -1,87 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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.Service;
-import com.hrsk.cloud.eg.client.dto.plan.command.EgLoanApiConfigInfoCmd;
-
-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());
-        }
-    }
-
-}

+ 0 - 102
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/NingBoTianChengCreditService.java

@@ -1,102 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-
-    }
-
-}

+ 0 - 93
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/OpenApiAesCreditService.java

@@ -1,93 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-}
-

+ 0 - 96
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/OpenApiCreditService.java

@@ -1,96 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-}

+ 0 - 141
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/PingDingShanCreditService.java

@@ -1,141 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-
-
-}

+ 0 - 161
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/PingXunCreditService.java

@@ -1,161 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-
-}

+ 0 - 43
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/PubNoCheckCreditService.java

@@ -1,43 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-    }
-}

+ 0 - 82
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingDaoAoSengCreditService.java

@@ -1,82 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-}

+ 0 - 81
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingDaoAoSengV2CreditService.java

@@ -1,81 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-}

+ 0 - 194
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingyuCreditService.java

@@ -1,194 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-            }
-        }
-    }
-}

+ 0 - 153
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingyuV2CreditService.java

@@ -1,153 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-
-}

+ 0 - 143
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/QingyuV3CreditService.java

@@ -1,143 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-
-}
-

+ 0 - 130
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongChuangJinFuCreditService.java

@@ -1,130 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-
-}

+ 0 - 139
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongXiangDaChangShaCreditService.java

@@ -1,139 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-
-}

+ 0 - 141
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongXiangKeBuShuCreditService.java

@@ -1,141 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-}

+ 0 - 139
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongXiangKeV2CreditService.java

@@ -1,139 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-
-}
-

+ 0 - 129
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongYiDaCreditService.java

@@ -1,129 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-}

+ 0 - 84
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongkedaiCreditService.java

@@ -1,84 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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.http.*;
-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());
-        }
-
-    }
-
-}

+ 0 - 380
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongshengCreditService.java

@@ -1,380 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-        }
-    }
-
-
-}

+ 0 - 150
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RongxiziCreditService.java

@@ -1,150 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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.alibaba.fastjson2.JSONObject;
-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);
-    }
-}

+ 0 - 90
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RunMeiXinYiRongCreditService.java

@@ -1,90 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}

+ 0 - 116
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/RxkCreditService.java

@@ -1,116 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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;
-    }
-
-}

+ 0 - 157
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShanDongBangBangDaiCreditService.java

@@ -1,157 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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));
-        }
-
-
-    }
-}

+ 0 - 126
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShanXiHengShengDaiCreditService.java

@@ -1,126 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-    }
-}

+ 0 - 122
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShanXiMingDePuHuiCreditService.java

@@ -1,122 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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);
-        }
-    }
-
-
-}

+ 0 - 85
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShangHaiHanGeCreditService.java

@@ -1,85 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-
-}

+ 0 - 84
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/loanMannager/threedocking/impl/ShangHaiJuHuiRongCreditService.java

@@ -1,84 +0,0 @@
-package com.hrsk.cloud.eg.infrastructure.loanMannager.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());
-        }
-    }
-
-}
-

Some files were not shown because too many files changed in this diff