ソースを参照

Merge branch 'feature-butt-joint-2024-08-26' into release-checkinto-241113

GITZYY 1 週間 前
コミット
c62be27d89
100 ファイル変更6092 行追加22 行削除
  1. 1 0
      .gitignore
  2. 83 0
      README.md
  3. 72 0
      db/eg.sql
  4. 6 0
      db/新增eg_api_epoint字段.sql
  5. 1 1
      egress-gateway-service-adapter/pom.xml
  6. 11 0
      egress-gateway-service-adapter/src/main/java/adapter/api/Test.java
  7. 34 0
      egress-gateway-service-adapter/src/main/java/adapter/api/controller/ApiController.java
  8. 0 1
      egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/controller/package-info.java
  9. 0 1
      egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/package-info.java
  10. 2 1
      egress-gateway-service-app/pom.xml
  11. 56 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/api/ApiGatewayService.java
  12. 19 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/cache/TestCacheService.java
  13. 48 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/customize/ApiCustomizeBizHandler.java
  14. 142 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/customize/ApiCustomizeRouteService.java
  15. 36 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/customize/CodeStrategyCmd.java
  16. 32 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/ApiInvokeCmdExe.java
  17. 1206 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/GenerateCheckIntoHttpApiConfigCmdExe.java
  18. 166 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/GenerateCheckIntoHttpApiConfigV2CmdExe.java
  19. 15 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/LoanParallelCheckIntoCmdExe.java
  20. 15 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/LoanSerialCheckIntoCmdExe.java
  21. 19 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/checkInto/CheckCmdExe.java
  22. 38 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/common/CommonCmdExe.java
  23. 17 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/route/EndpointRouteService.java
  24. 51 0
      egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/route/impl/CheckIntoCmd.java
  25. 5 1
      egress-gateway-service-client/pom.xml
  26. 0 1
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/client/package-info.java
  27. 70 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/constant/BusinessPrefixEnum.java
  28. 68 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/constant/GlobalDataStatusEnum.java
  29. 52 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/constant/ResultCodeEnum.java
  30. 18 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/CustomerDTO.java
  31. 45 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/EgLoanApiConfigInfoDto.java
  32. 6 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/ErrorCode.java
  33. 29 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/command/ApiInvokeParamCmd.java
  34. 31 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/command/CheckIntoParamCmd.java
  35. 18 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/common/LocalEnumDTO.java
  36. 48 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/plan/command/EgLoanApiConfigInfoCmd.java
  37. 42 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/plan/command/PlanCmd.java
  38. 55 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserAssetCarInfoCmd.java
  39. 58 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserAssetHouseInfoCmd.java
  40. 52 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserAssetInsuranceInfoCmd.java
  41. 174 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserBaseInfoCmd.java
  42. 77 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionBusinessOwnerCmd.java
  43. 66 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionEcommerceOwnersCmd.java
  44. 67 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionOfficeWorkersCmd.java
  45. 76 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionSelfEmployedCmd.java
  46. 21 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/event/CustomerCreatedEvent.java
  47. 11 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/event/DomainEventConstant.java
  48. 117 0
      egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/vo/DataVo.java
  49. 50 3
      egress-gateway-service-domain/pom.xml
  50. 14 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/Api.java
  51. 16 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/ApiConfig.java
  52. 31 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/ApiContext.java
  53. 59 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/ApiFactory.java
  54. 21 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/ApiGateway.java
  55. 38 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/ApiResult.java
  56. 48 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/FunctionObject.java
  57. 25 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/FunctionParam.java
  58. 183 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/HttpApi.java
  59. 61 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/HttpApiConfig.java
  60. 29 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/KeyValueObject.java
  61. 79 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/ValueObject.java
  62. 33 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ApiPayloadTypeEnum.java
  63. 30 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ApiResultTypeENum.java
  64. 33 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ApiTypeEnums.java
  65. 26 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/DataVoStatusEnum.java
  66. 45 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ThreeplatfromResultCodeEnum.java
  67. 43 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ThreeplatfromResultStringEnum.java
  68. 33 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ValueObjectTypeEnum.java
  69. 129 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/func/EncryptionFunction.java
  70. 69 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/func/ValueObjectFunctionManager.java
  71. 97 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/payload/ApiJsonPayloadResolver.java
  72. 18 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/payload/ApiPayloadResolver.java
  73. 61 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/payload/ApiPayloadResolverManage.java
  74. 151 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/result/ApiJsonResultResolver.java
  75. 23 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/result/ApiResultResolver.java
  76. 62 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/result/ApiResultResolverManage.java
  77. 41 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/BasicTypeValueObjectResolver.java
  78. 60 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/SpelValueObjectResolver.java
  79. 32 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/ValueObjectResolver.java
  80. 88 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/ValueObjectResolverManager.java
  81. 52 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/BusinessServiceEnums.java
  82. 44 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/JoinMethodEnums.java
  83. 52 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/ResultCode.java
  84. 195 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/ServerCodeEnums.java
  85. 45 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgApiTypeEnum.java
  86. 44 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgRouteTypeEnum.java
  87. 32 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgressApiEndpointIntegrationModeEnum.java
  88. 34 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgressApiStatusEnum.java
  89. 36 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/utils/BizPreconditions.java
  90. 24 0
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/utils/GsonUtils.java
  91. 0 3
      egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/package-info.java
  92. 30 10
      egress-gateway-service-infrastructure/pom.xml
  93. 53 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/MyMetaObjectHandler.java
  94. 5 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/DiamondConfig.java
  95. 114 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HessianUtils.java
  96. 52 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HttpTemPlateClient.java
  97. 69 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/RetryRequestConfig.java
  98. 111 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/RetryRestTemplate.java
  99. 63 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/FastJson2RedisSerializer.java
  100. 33 0
      egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/PrefixRedisSerializer.java

+ 1 - 0
.gitignore

@@ -19,6 +19,7 @@ target/
 *.iws
 
 # temp ignore
+logs/
 *.log
 *.cache
 *.diff

+ 83 - 0
README.md

@@ -2,5 +2,88 @@
 
 接出网关工程:egress-gateway-service,提供业务/数据的接出能力。
 
+# 统一返回的信息封装
+1 http/https 统一返回信息实体DataVo
+2 spel 表达式接受并且转化所有的信息为map,map解析的结果用#root “#root” 为map 的根
 
+# eg eg_api
+1 redis key code 编码信息 eg+前缀+'历史loan-web-api对接code值'
 
+# mybatis plus meta handler 
+1 使用 BaseDo 进行填充
+2 BaseDo 添加了    @TableField(fill = FieldFill.INSERT)     @TableField(fill = FieldFill.UPDATE) 注解
+
+
+# http 加载信息 初始化 参考
+```
+ 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.user.merchantNo");
+        body.put("attackPhone",JSONObject.toJSONString(attackPhone));
+        body.put("merchantNo",JSONObject.toJSONString(merchantNo));
+        //主体
+        httpApiConfig.setContent(JSONObject.toJSONString(body));
+        String jsonString = JSONObject.toJSONString(httpApiConfig);
+        log.info("json input data {}",jsonString);
+         return httpApiConfig;
+```
+# 格式化后的http请求格式
+```
+
+//
+//        FunctionObject md5 = new FunctionObject();
+//        md5.setCode("md5");
+//        HttpApiConfig hac = new HttpApiConfig()
+//                .setUrl("https://baidu.com");
+//        hac.setContentType(ApiPayloadTypeEnum.APPLICATION_JSON.getCode());
+//        hac.setType("http");
+//        List<KeyValueObject> h = Lists.newArrayList();
+//        KeyValueObject h1 = new KeyValueObject();
+//        h1.setKey("secretKey");
+//        h1.setType("text");
+//        h1.setValue("Khw99%$l%-2gF7P4jXglp_-jQqQirtYnOY5D");
+//        h.add(h1);
+//        KeyValueObject h2 = new KeyValueObject();
+//        h2.setKey("merchantNo");
+//        h2.setType("spel");
+//        h2.setValue("#param.realName");
+//        h.add(h2);
+//        List<ValueObject> p = Lists.newArrayList();
+//        ValueObject p1 = new ValueObject();
+//        p1.setType("text");
+//        p1.setValue("123");
+//        ValueObject p2 = new ValueObject();
+//        p2.setType("text");
+//        p2.setValue("456");
+//        p2.getFunctions().add(md5);
+//        p.add(p1);
+//        p.add(p2);
+//        List<KeyValueObject> s = Lists.newArrayList();
+//        KeyValueObject s1 = new KeyValueObject();
+//        s1.setKey("username");
+//        s1.setType("spel");
+//        s1.setValue("#param.username");
+//        KeyValueObject s2 = new KeyValueObject();
+//        s2.setKey("channel");
+//        s2.setType("spel");
+//        s2.setValue("#param.channel");
+//        s.add(s2);
+//        hac.setPath(p).setSearch(s).setHeader(h).setMethod("GET");
+//        hac.setContent("{\"merchant\":\"xxxxxxfffff\",\"phone\":\"#{\\\"value\\\":\\\"#param.userMobile\\\",\\\"type\\\": \\\"spel\\\",\\\"functions\\\":[ {\\\"code\\\": \\\"md5\\\"}]}\"}");
+```

+ 72 - 0
db/eg.sql

@@ -0,0 +1,72 @@
+DROP TABLE IF EXISTS eg_api_loan_extend;
+CREATE TABLE eg_api_loan_extend(
+                                   `id` bigint(64) NOT NULL   COMMENT 'id' ,
+                                   `create_uid` VARCHAR(64)    COMMENT '创建人id' ,
+                                   `create_username` VARCHAR(64)    COMMENT '创建人' ,
+                                   `gmt_create` DATETIME    COMMENT '创建时间' ,
+                                   `modify_uid` VARCHAR(32)    COMMENT '更新人' ,
+                                   `modify_username` VARCHAR(64)    COMMENT '修改人' ,
+                                   `gmt_modify` DATETIME    COMMENT '修改时间' ,
+                                   `status` VARCHAR(10)    COMMENT '有效(Y 有效 N 无效)' ,
+                                   `api_id` bigint(64)    COMMENT 'eg_api主键' ,
+                                   `share_range` VARCHAR(255)    COMMENT '共享范围' ,
+                                   `protocol` VARCHAR(255)    COMMENT '协议范围' ,
+                                   `share_purpose` VARCHAR(255)    COMMENT '共享目的' ,
+                                   `need_check` INT(4)    COMMENT '是否需要撞库0:不需要;1:需要' ,
+                                   `share_type` VARCHAR(255)    COMMENT '共享方式' ,
+                                   PRIMARY KEY (id)
+)  COMMENT = '接出助贷api的扩展表';
+
+DROP TABLE IF EXISTS eg_api_product_extend;
+CREATE TABLE eg_api_product_extend(
+                                      `id` bigint(64) NOT NULL   COMMENT 'id' ,
+                                      `create_uid` VARCHAR(64)    COMMENT '创建人id' ,
+                                      `create_username` VARCHAR(64)    COMMENT '创建人' ,
+                                      `gmt_create` DATETIME    COMMENT '创建时间' ,
+                                      `modify_uid` VARCHAR(32)    COMMENT '更新人' ,
+                                      `modify_username` VARCHAR(64)    COMMENT '修改人' ,
+                                      `gmt_modify` DATETIME    COMMENT '修改时间' ,
+                                      `status` VARCHAR(10)    COMMENT '有效(Y 有效 N 无效)' ,
+                                      `api_id` bigint(64)    COMMENT 'eg_api主键' ,
+                                      `share_range` VARCHAR(255)    COMMENT '共享范围' ,
+                                      `protocol` VARCHAR(255)    COMMENT '协议范围' ,
+                                      `share_purpose` VARCHAR(255)    COMMENT '共享目的' ,
+                                      `share_type` VARCHAR(255)    COMMENT '共享方式' ,
+                                      `need_check` INT(4)    COMMENT '是否需要撞库0:不需要;1:需要' ,
+                                      PRIMARY KEY (id)
+)  COMMENT = '接出产品api扩展表';
+
+CREATE TABLE `eg_api` (
+                          `id` bigint(64) NOT NULL COMMENT 'id',
+                          `create_uid` varchar(64) DEFAULT NULL COMMENT '创建人id',
+                          `create_username` varchar(64) DEFAULT NULL COMMENT '创建人',
+                          `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
+                          `modify_uid` varchar(32) DEFAULT NULL COMMENT '更新人',
+                          `modify_username` varchar(64) DEFAULT NULL COMMENT '修改人',
+                          `gmt_modify` datetime DEFAULT NULL COMMENT '修改时间',
+                          `status` varchar(10) DEFAULT NULL COMMENT '有效(Y 有效 N 无效)',
+                          `api_code` varchar(64) DEFAULT NULL COMMENT '业务编码',
+                          `api_name` varchar(64) DEFAULT NULL COMMENT '名称',
+                          `api_type` varchar(20) DEFAULT NULL COMMENT 'api类型',
+                          PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='api信息表';
+
+CREATE TABLE `eg_api_endpoint` (
+                                   `id` bigint(64) NOT NULL,
+                                   `create_uid` varchar(64) DEFAULT NULL COMMENT '乐观锁',
+                                   `create_username` varchar(64) DEFAULT NULL COMMENT '创建人',
+                                   `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
+                                   `modify_uid` varchar(64) DEFAULT NULL COMMENT '更新人',
+                                   `modify_username` varchar(64) DEFAULT NULL COMMENT '更新人',
+                                   `status` varchar(32) DEFAULT NULL COMMENT '有效(Y 有效 N 无效)',
+                                   `api_config` blob COMMENT '配置',
+                                   `api_code` varchar(32) DEFAULT NULL COMMENT 'code配置',
+                                   `desc` varchar(255) DEFAULT NULL COMMENT '描述',
+                                   `api_id` bigint(64) DEFAULT NULL COMMENT 'apiId',
+                                   `gmt_modify` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+                                   `api_name` varchar(255) DEFAULT NULL COMMENT 'api名称',
+                                   `request_config` varchar(255) DEFAULT NULL COMMENT '请求配置',
+                                   `response_config` varchar(255) DEFAULT NULL COMMENT '响应设置',
+                                   `memo` varchar(255) DEFAULT NULL COMMENT '备注',
+                                   PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='api通道表';

+ 6 - 0
db/新增eg_api_epoint字段.sql

@@ -0,0 +1,6 @@
+ALTER TABLE `loan_online`.`eg_api_endpoint`
+    ADD COLUMN `request_config` varchar(255) NULL COMMENT '请求配置' AFTER `api_name`,
+ADD COLUMN `response_config` varchar(255) NULL COMMENT '响应设置' AFTER `request_config`;
+
+ALTER TABLE `loan_online`.`eg_api_endpoint`
+    ADD COLUMN `endpoint_type` varchar(20) NULL COMMENT '对接类型';

+ 1 - 1
egress-gateway-service-adapter/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.hrsk.cloud</groupId>
         <artifactId>egress-gateway-service</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0</version>
     </parent>
 
     <artifactId>egress-gateway-service-adapter</artifactId>

+ 11 - 0
egress-gateway-service-adapter/src/main/java/adapter/api/Test.java

@@ -0,0 +1,11 @@
+package adapter.api;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: Test
+ * @date 2024/9/18 15:11
+ */
+public class Test {
+
+}

+ 34 - 0
egress-gateway-service-adapter/src/main/java/adapter/api/controller/ApiController.java

@@ -0,0 +1,34 @@
+package adapter.api.controller;
+
+import com.hrsk.cloud.eg.app.api.ApiGatewayService;
+import com.hrsk.cloud.eg.clinet.dto.data.command.ApiInvokeParamCmd;
+import com.hrsk.pangu.dto.SingleResponse;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ApiController
+ * @date 2024/11/6 13:47
+ */
+@RestController
+@RequestMapping("/api/eg")
+public class ApiController {
+
+    @Resource
+     private ApiGatewayService apiGatewayService;
+    /**
+     * @description:  接口
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/8/30 14:34
+     */
+    @RequestMapping("/loans/v1")
+    public SingleResponse loans(ApiInvokeParamCmd apiInvokeParamCmd) {
+        return SingleResponse.of(apiGatewayService.invoke(apiInvokeParamCmd));
+    }
+}

+ 0 - 1
egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/controller/package-info.java

@@ -1 +0,0 @@
-package com.hrsk.cloud.eg.adapter.controller;

+ 0 - 1
egress-gateway-service-adapter/src/main/java/com/hrsk/cloud/eg/adapter/package-info.java

@@ -1 +0,0 @@
-package com.hrsk.cloud.eg.adapter;

+ 2 - 1
egress-gateway-service-app/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.hrsk.cloud</groupId>
         <artifactId>egress-gateway-service</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0</version>
     </parent>
 
     <artifactId>egress-gateway-service-app</artifactId>
@@ -23,6 +23,7 @@
         <dependency>
             <groupId>com.hrsk.cloud</groupId>
             <artifactId>egress-gateway-service-client</artifactId>
+            <version>1.0</version>
         </dependency>
     </dependencies>
 

+ 56 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/api/ApiGatewayService.java

@@ -0,0 +1,56 @@
+package com.hrsk.cloud.eg.app.api;
+
+
+import com.alibaba.fastjson2.JSONObject;
+import com.hrsk.cloud.eg.app.loan.executor.checkInto.CheckCmdExe;
+import com.hrsk.cloud.eg.app.route.EndpointRouteService;
+import com.hrsk.cloud.eg.clinet.dto.data.EgLoanApiConfigInfoDto;
+import com.hrsk.cloud.eg.clinet.dto.data.command.ApiInvokeParamCmd;
+import com.hrsk.cloud.eg.clinet.dto.data.command.CheckIntoParamCmd;
+import com.hrsk.cloud.eg.domain.common.constant.BusinessServiceEnums;
+import com.hrsk.cloud.eg.domain.common.constant.egress.EgRouteTypeEnum;
+import com.hrsk.pangu.dto.SingleResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ApiService
+ * @date 2024/11/6 14:07
+ */
+@Slf4j
+@Service
+public class ApiGatewayService {
+
+    @Resource
+    private List<EndpointRouteService> endpointRouteServices;
+
+
+
+    /**
+     * @description:  网管寻找对应的服务
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/11/6 16:19
+     */
+  public   SingleResponse invoke(ApiInvokeParamCmd apiInvokeParamCmd){
+    try {
+       if (EgRouteTypeEnum.CHECK_INTO.getCode().equals(apiInvokeParamCmd.getRoute())){
+           Map<String, EndpointRouteService> collect = endpointRouteServices.stream().collect(Collectors.toMap(EndpointRouteService::getRoute, EndpointRouteService -> EndpointRouteService));
+         return   collect.get(apiInvokeParamCmd.getRoute()).apiEndPoint(apiInvokeParamCmd);
+       }
+    }catch (Exception e){
+      log.error("网关错误",e.getMessage());
+    }
+    return SingleResponse.buildFailure(BusinessServiceEnums.FAIL.getCode(), BusinessServiceEnums.FAIL.getMessage());
+  }
+
+}

+ 19 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/cache/TestCacheService.java

@@ -0,0 +1,19 @@
+package com.hrsk.cloud.eg.app.cache;
+
+import org.springframework.stereotype.Service;
+
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: cache service 操作缓存和 对应业务的代码
+ * @date 2024/8/28 16:53
+ */
+@Service
+public class TestCacheService {
+
+
+
+
+
+}

+ 48 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/customize/ApiCustomizeBizHandler.java

@@ -0,0 +1,48 @@
+package com.hrsk.cloud.eg.app.loan.customize;
+
+import com.hrsk.cloud.eg.domain.common.constant.ServerCodeEnums;
+import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ApiBizHandler
+ * @date 2024/9/13 09:34
+ */
+@Component
+public class ApiCustomizeBizHandler implements ApplicationContextAware {
+
+    private final Map<ServerCodeEnums, LoanDockingApi> bizHandlerMap = new HashMap<>();
+
+
+    public void putBizHandler(ServerCodeEnums  type, LoanDockingApi handler) {
+        bizHandlerMap.put(type, handler);
+    }
+
+    public LoanDockingApi getBizHandler(ServerCodeEnums type) {
+        LoanDockingApi bizHandler = this.bizHandlerMap.get(type);
+        if (bizHandler == null) {
+            throw new RuntimeException("not.found.BizHandler");
+        }
+        return bizHandler;
+    }
+
+    @Override
+    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+        Map<String, LoanDockingApi> beansOfType = applicationContext.getBeansOfType(LoanDockingApi.class);
+        Collection<LoanDockingApi> services = beansOfType.values();
+        for (LoanDockingApi service : services) {
+            ServerCodeEnums type = service.getType();
+            bizHandlerMap.put(type, service);
+        }
+    }
+
+}

+ 142 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/customize/ApiCustomizeRouteService.java

@@ -0,0 +1,142 @@
+package com.hrsk.cloud.eg.app.loan.customize;
+
+import com.hrsk.cloud.eg.clinet.dto.data.command.CheckIntoParamCmd;
+import com.hrsk.cloud.eg.clinet.dto.data.plan.command.PlanCmd;
+import com.hrsk.cloud.eg.clinet.vo.DataVo;
+import com.hrsk.cloud.eg.domain.common.constant.JoinMethodEnums;
+import com.hrsk.cloud.eg.domain.common.constant.ServerCodeEnums;
+import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
+import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.impl.*;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgLoanApiConfigInfoDo;
+import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ApiRouteService
+ * @date 2024/9/13 09:29
+ */
+@Slf4j
+@Service
+public class ApiCustomizeRouteService {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private ApiCustomizeBizHandler apiCustomizeBizHandler;
+
+    @Resource
+    private QingyuCreditService qingyuCreditService;
+
+    @Resource
+    private XinluCreditService xinluCreditService;
+
+    @Resource
+    private OpenApiCreditService openApiCreditService;
+
+    @Resource
+    private QingyuV2CreditService qingyuV2CreditService;
+
+    @Resource
+    private XiangKeDaCreditService xiangKeDaCreditService;
+
+    @Resource
+    private RxkCreditService rxkCreditService;
+
+    @Resource
+    private OpenApiAesCreditService openApiAesCreditService;
+
+    @Resource
+    private HuirongCrmCreditService huirongCrmCreditService;
+
+    @Resource
+    private JinDieV2CreditService jinDieV2CreditService;
+
+    @Resource
+    private JinDieV3CreditService jinDieV3CreditService;
+
+    @Resource
+    private QingyuV3CreditService qingyuV3CreditService;
+
+    @Resource
+    private PubNoCheckCreditService pubNoCheckCreditService;
+
+
+    /**
+     * API 路由
+     *
+     * @param xdProduct
+     * @return
+     */
+    public LoanDockingApi apiRouter(PlanCmd xdProduct) {
+        if (null == xdProduct.getApiId()) return null;
+        EgLoanApiConfigInfoDo apiInfo = egApiService.getApiInfoByRedis(xdProduct.getApiId());
+        LoanDockingApi apiService = null;
+        if (Objects.isNull(apiInfo)&&apiInfo.getNeedCheck()==0){
+             apiService=pubNoCheckCreditService;
+             return apiService;
+        }
+        JoinMethodEnums method = JoinMethodEnums.getByCode(apiInfo.getApiCode());
+        if (null == method) return null;
+        switch (method) {
+            case CRM_QY:
+                apiService = qingyuCreditService;
+                break;
+            case CRM_XL:
+                apiService = xinluCreditService;
+                break;
+            case OPEN_API:
+                apiService = openApiCreditService;
+                break;
+            case CRM_QY_V2:
+                apiService = qingyuV2CreditService;
+                break;
+            case CRM_XKD:
+                apiService = xiangKeDaCreditService;
+                break;
+            case CRM_RXK:
+                apiService = rxkCreditService;
+                break;
+            case HUIRONG_CRM:
+                apiService = huirongCrmCreditService;
+                break;
+            case CRM_EC:
+                break;
+            case CRM_JD:
+                apiService = jinDieV2CreditService;
+                break;
+            case CRM_JDV3:
+                apiService = jinDieV3CreditService;
+                break;
+            case BUSI_API:
+                apiService = apiCustomizeBizHandler.getBizHandler(ServerCodeEnums.map.get(apiInfo.getApiCode()));
+                break;
+            case CRM_QY_V3:
+                apiService = qingyuV3CreditService;
+                break;
+            case OPEN_API_AES:
+                apiService = openApiAesCreditService;
+                break;
+            default:
+                log.error("不支持的对接方式:productId={}", xdProduct.getPlanId());
+        }
+        return apiService;
+    }
+
+    /**
+     * @description:  助贷撞库api
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/9/13 09:59
+     */
+    public DataVo loanCheckInto(CheckIntoParamCmd checkIntoParamCmd){
+        LoanDockingApi loanDockingApi = apiRouter(checkIntoParamCmd.getPlan());
+      return   loanDockingApi.qualityCheck(checkIntoParamCmd.getUser(), checkIntoParamCmd.getPlan(),checkIntoParamCmd.getApiConfigInfo());
+    }
+}

+ 36 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/customize/CodeStrategyCmd.java

@@ -0,0 +1,36 @@
+package com.hrsk.cloud.eg.app.loan.customize;
+
+import com.hrsk.cloud.eg.app.loan.executor.checkInto.CheckCmdExe;
+import com.hrsk.cloud.eg.clinet.dto.data.command.ApiInvokeParamCmd;
+import com.hrsk.cloud.eg.clinet.dto.data.command.CheckIntoParamCmd;
+import com.hrsk.cloud.eg.clinet.vo.DataVo;
+import com.hrsk.cloud.eg.domain.common.constant.egress.EgressApiEndpointIntegrationModeEnum;
+import com.hrsk.pangu.dto.SingleResponse;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: CodeStrategyCmd
+ * @date 2024/11/6 16:14
+ */
+@Service
+public class CodeStrategyCmd implements CheckCmdExe {
+
+    @Resource
+    private ApiCustomizeRouteService apiCustomizeRouteService;
+
+    @Override
+    public SingleResponse route(CheckIntoParamCmd checkIntoParamCmd) {
+        DataVo dataVo = apiCustomizeRouteService.loanCheckInto(checkIntoParamCmd);
+        return SingleResponse.of(dataVo);
+    }
+
+    @Override
+    public String getMode() {
+        return EgressApiEndpointIntegrationModeEnum.CUSTOMIZE.getCode();
+    }
+}

+ 32 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/ApiInvokeCmdExe.java

@@ -0,0 +1,32 @@
+package com.hrsk.cloud.eg.app.loan.executor;
+
+import com.hrsk.cloud.eg.app.api.ApiGatewayService;
+import com.hrsk.cloud.eg.clinet.dto.data.command.ApiInvokeParamCmd;
+import com.hrsk.pangu.dto.SingleResponse;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: CheckIntoCmdExe
+ * @date 2024/11/6 14:18
+ */
+@Component
+public class ApiInvokeCmdExe {
+
+    @Resource
+    private ApiGatewayService apiGatewayService;
+
+    /** 
+     * @description: 执行api请求
+     * @param:  
+     * @return:  
+     * @author zhangyy
+     * @date: 2024/11/6 15:46
+     */ 
+    public SingleResponse execute(ApiInvokeParamCmd apiInvokeParamCmd){
+      return   apiGatewayService.invoke(apiInvokeParamCmd);
+    }
+}

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

@@ -0,0 +1,1206 @@
+package com.hrsk.cloud.eg.app.loan.executor;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.google.common.collect.Lists;
+import com.hrsk.cloud.eg.clinet.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.EgApiDo;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgApiEndpointDo;
+import com.hrsk.cloud.eg.infrastructure.service.EgApiEndpointService;
+import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+import lombok.extern.slf4j.Slf4j;
+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 EgApiEndpointService egApiEndpointService;
+
+    /**
+     * @description:  原始惠融对接api转化
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/8/29 17:58
+     */
+    public void  generateHuiRonHuiRonApiConfig(String huiRonApiConfig){
+        EgApiDo egApiDo=new EgApiDo();
+        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());
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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());
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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");
+//        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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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)));
+        egApiEndpointService.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;
+    }
+}

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

@@ -0,0 +1,166 @@
+package com.hrsk.cloud.eg.app.loan.executor;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.google.common.collect.Lists;
+import com.hrsk.cloud.eg.clinet.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.EgApiDo;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgApiEndpointDo;
+import com.hrsk.cloud.eg.infrastructure.service.EgApiEndpointService;
+import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: GenerateCheckIntoHttpApiConfigV2Service
+ * @date 2024/9/9 16:35
+ */
+@Slf4j
+@Component
+public class GenerateCheckIntoHttpApiConfigV2CmdExe {
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private EgApiEndpointService egApiEndpointService;
+    /**
+     * @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());
+        egApiEndpointService.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());
+        egApiEndpointService.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;
+    }
+}

+ 15 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/LoanParallelCheckIntoCmdExe.java

@@ -0,0 +1,15 @@
+package com.hrsk.cloud.eg.app.loan.executor;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-26 17:35
+ * @description: 贷款并行撞库CMD执行
+ **/
+@Component
+public class LoanParallelCheckIntoCmdExe {
+    public void execute(){
+
+    }
+}

+ 15 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/LoanSerialCheckIntoCmdExe.java

@@ -0,0 +1,15 @@
+package com.hrsk.cloud.eg.app.loan.executor;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-26 17:33
+ * @description: 贷款撞库CMD
+ **/
+@Component
+public class LoanSerialCheckIntoCmdExe {
+    public void execute(){
+
+    }
+}

+ 19 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/checkInto/CheckCmdExe.java

@@ -0,0 +1,19 @@
+package com.hrsk.cloud.eg.app.loan.executor.checkInto;
+
+import com.hrsk.cloud.eg.clinet.dto.data.command.CheckIntoParamCmd;
+import com.hrsk.pangu.dto.SingleResponse;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: CheckCmdExe 撞库
+ * @date 2024/11/6 15:28
+ */
+public interface CheckCmdExe {
+
+
+    SingleResponse route(CheckIntoParamCmd apiInvokeParamCmd);
+
+    String getMode();
+
+}

+ 38 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/loan/executor/common/CommonCmdExe.java

@@ -0,0 +1,38 @@
+package com.hrsk.cloud.eg.app.loan.executor.common;
+
+import com.hrsk.cloud.eg.domain.common.constant.egress.EgApiTypeEnum;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.hrsk.cloud.eg.clinet.dto.data.common.LocalEnumDTO;
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: CommonService 公共信息操作类
+ * @date 2024/9/24 11:48
+ */
+@Component
+public class CommonCmdExe {
+
+    /**
+     * @description:  获取本地枚举返回给前端
+     * @author zhangyy
+     * @date 2024/9/24 11:56
+     * @version 1.0
+     */
+    public List<LocalEnumDTO> getLocalEnumList() {
+        List<LocalEnumDTO> localEnumDtoList = new ArrayList<>();
+        EgApiTypeEnum[] values = EgApiTypeEnum.values();
+        LocalEnumDTO localEnumDto=null;
+        for (int i = 0; i < values.length; i++) {
+            localEnumDto = new LocalEnumDTO();
+            localEnumDto.setCode(values[i].getCode());
+            localEnumDto.setMsg(values[i].getMsg());
+            localEnumDtoList.add(localEnumDto);
+        }
+        return localEnumDtoList;
+    }
+}

+ 17 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/route/EndpointRouteService.java

@@ -0,0 +1,17 @@
+package com.hrsk.cloud.eg.app.route;
+
+import com.hrsk.cloud.eg.clinet.dto.data.command.ApiInvokeParamCmd;
+import com.hrsk.pangu.dto.SingleResponse;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: EndpointService
+ * @date 2024/11/6 16:26
+ */
+public interface EndpointRouteService {
+
+    SingleResponse apiEndPoint(ApiInvokeParamCmd apiInvokeParamCmd);
+
+    String getRoute();
+}

+ 51 - 0
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/route/impl/CheckIntoCmd.java

@@ -0,0 +1,51 @@
+package com.hrsk.cloud.eg.app.route.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.hrsk.cloud.eg.app.loan.executor.checkInto.CheckCmdExe;
+import com.hrsk.cloud.eg.app.route.EndpointRouteService;
+import com.hrsk.cloud.eg.clinet.dto.data.EgLoanApiConfigInfoDto;
+import com.hrsk.cloud.eg.clinet.dto.data.command.ApiInvokeParamCmd;
+import com.hrsk.cloud.eg.clinet.dto.data.command.CheckIntoParamCmd;
+import com.hrsk.cloud.eg.clinet.dto.data.plan.command.EgLoanApiConfigInfoCmd;
+import com.hrsk.cloud.eg.domain.common.constant.egress.EgRouteTypeEnum;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgLoanApiConfigInfoDo;
+import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
+import com.hrsk.cloud.eg.infrastructure.utils.BeanCopyUtils;
+import com.hrsk.pangu.dto.SingleResponse;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: CheckIntoCmd
+ * @date 2024/11/6 16:29
+ */
+@Service
+public class CheckIntoCmd implements EndpointRouteService {
+
+    @Resource
+    private EgApiService egApiService;
+
+    @Resource
+    private List<CheckCmdExe> checkCmdExeList;
+
+    @Override
+    public SingleResponse apiEndPoint(ApiInvokeParamCmd apiInvokeParamCmd) {
+        CheckIntoParamCmd checkIntoParamCmd = JSONObject.parseObject(apiInvokeParamCmd.getParam().toString(), CheckIntoParamCmd.class);
+        EgLoanApiConfigInfoDo loanApiConfigInfo = egApiService.getLoanApiConfigInfo(checkIntoParamCmd.getPlan().getApiId());
+        EgLoanApiConfigInfoCmd configCmd = BeanCopyUtils.copy(loanApiConfigInfo, EgLoanApiConfigInfoCmd.class);
+        Map<String, CheckCmdExe> collect = checkCmdExeList.stream().collect(Collectors.toMap(CheckCmdExe::getMode, CheckCmdExe -> CheckCmdExe));
+
+        return   collect.get(loanApiConfigInfo.getIntegrationMode()).route(checkIntoParamCmd);
+    }
+
+    @Override
+    public String getRoute() {
+        return EgRouteTypeEnum.CHECK_INTO.getCode();
+    }
+}

+ 5 - 1
egress-gateway-service-client/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.hrsk.cloud</groupId>
         <artifactId>egress-gateway-service</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0</version>
     </parent>
 
     <artifactId>egress-gateway-service-client</artifactId>
@@ -20,5 +20,9 @@
             <groupId>com.hrsk.pangu</groupId>
             <artifactId>pangu-component-dto</artifactId>
         </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 0 - 1
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/client/package-info.java

@@ -1 +0,0 @@
-package com.hrsk.cloud.eg.client;

+ 70 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/constant/BusinessPrefixEnum.java

@@ -0,0 +1,70 @@
+package com.hrsk.cloud.eg.clinet.constant;
+
+/**
+ * @description: BusinessPrefixEnum 
+ * @author zhangyy
+ * @date 2024/8/28 14:48
+ * @version 1.0
+ */
+public enum BusinessPrefixEnum {
+    CHECK_INTO_PREFIX("CHECK_INTO","撞库API前缀"),
+    APPLY_PREFIX("APPLY","进件API前缀")
+
+    ;
+    private String code;
+    private String msg;
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    BusinessPrefixEnum (String code,String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    /** 
+     * @description: 获取code
+     * @param:  
+     * @return:
+     * @author zhangyy
+     * @date: 2024/8/28 14:51
+     */ 
+    public static BusinessPrefixEnum getByCode(String code) {
+        for (BusinessPrefixEnum dataStatus : values()) {
+            if (dataStatus.getCode().equals(code)) {
+                return dataStatus;
+            }
+        }
+        return null;
+    }
+
+    /** 
+     * @description: 获取信息 
+     * @param:  
+     * @return:  
+     * @author zhangyy
+     * @date: 2024/8/28 14:51
+     */ 
+    public static String getByMsg(String code) {
+        for (BusinessPrefixEnum prefixEnum : values()) {
+            if (prefixEnum.getCode().equals(code)) {
+                return prefixEnum.getMsg();
+            }
+        }
+        return null;
+    }
+
+}

+ 68 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/constant/GlobalDataStatusEnum.java

@@ -0,0 +1,68 @@
+package com.hrsk.cloud.eg.clinet.constant;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: GlobalDataStatus 全局数据标识是否有效的数据
+ * @date 2024/8/28 14:05
+ */
+public enum GlobalDataStatusEnum {
+    YES("Y","有效"),
+    NO("N","无效");
+    private String code;
+    private String msg;
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+     GlobalDataStatusEnum (String code,String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    /** 
+     * @description: 获取code
+     * @param:  
+     * @return:  
+     * @author zhangyy
+     * @date: 2024/8/28 14:51
+     */ 
+    public static GlobalDataStatusEnum getByCode(String code) {
+        for (GlobalDataStatusEnum dataStatus : values()) {
+            if (dataStatus.getCode().equals(code)) {
+                return dataStatus;
+            }
+        }
+        return null;
+    }
+
+    /** 
+     * @description: 获取描述信息
+     * @param:  
+     * @return:  
+     * @author zhangyy
+     * @date: 2024/8/28 14:50
+     */ 
+    public static String getByMsg(String code) {
+        for (GlobalDataStatusEnum globalDataStatusEnum : values()) {
+            if (globalDataStatusEnum.getCode().equals(code)) {
+                return globalDataStatusEnum.getMsg();
+            }
+        }
+        return null;
+    }
+
+}

+ 52 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/constant/ResultCodeEnum.java

@@ -0,0 +1,52 @@
+package com.hrsk.cloud.eg.clinet.constant;
+
+public enum ResultCodeEnum {
+    // 全局
+    NO_LOGIN(-10,"未登录","未登录"),
+    GLOBAL_REQUEST_OK(0,"请求成功标志","请求成功"),
+    GLOBAL_REQUEST_FAIL(1,"请求失败标志","请求失败"),
+    GLOBAL_PARAM_MISSING(6,"全局参数缺失","不能为空"),
+    GLOBAL_VERIFICATION_ERROR(7,"验证码错误","验证码错误"),
+    GLOBAL_NOT_LOGIN(-130,"未登录标志","请先登录"),
+    GLOBAL_MISS_TOKEN(-130,"token缺失","请先登录"),
+    INFO_DOCUMENT_LIST(300,"暂无素材信息","暂无素材信息"),
+    INFO_FQA_LIST(310,"暂无问答信息","暂无问答信息"),
+    INFO_MSG_LIST(320,"暂无消息信息","暂无消息信息"),
+    INFO_USERFEEDBACK_LIST(340,"暂无意见反馈信息","暂无意见反馈信息"),
+    INFO_APPVERSIONLOG_LIST(350,"暂无APP更新日志信息","暂无APP更新日志信息"),
+    INFO_APPVERSION_LIST(330,"暂无版本更新信息","暂无版本更新信息"),
+    THIRDSERVER_REQUEST_EXCEPTION(100,"第三方接口连接异常","第三方接口连接异常"),
+    THIRDSERVER_RESPONSE_EXCEPTION(100,"第三方接口返回数据异常","第三方接口返回数据异常"),
+    OTHER_DATATYPE_FAIL(94,"数据类错误","数据类型错误"),
+    SYSTEM_EXCEPTION(999,"系统异常,请稍后再试","系统异常,请稍后再试"),
+    GLOBAL_REAL_EXISTS(201,"身份证已经被实名","请求失败"),
+    GLOBAL_REAL_MISMATCH(202,"姓名与身份证号不匹配","请求失败"),
+    GLOBAL_REAL_SERVICE(203,"实名认证接口异常","请求失败"),
+    GLOBAL_REAL_LOCK(204,"密码错误超过三次","密码输出错误锁定5分钟,请稍后再试"),
+    GLOBAL_GO_VERIFYSMS_LOGIN(205,"短信验证登录","短信验证登录"),
+    GLOBAL_INTERFACE_LIMIT(206,"接口访问频繁","接口访问太过频繁,请稍后再试")
+    ;
+    private final int code;
+    private final String description;
+    private final String msg;
+
+    ResultCodeEnum(int code, String description, String msg) {
+        this.code = code;
+        this.description = description;
+        this.msg = msg;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+
+}

+ 18 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/CustomerDTO.java

@@ -0,0 +1,18 @@
+package com.hrsk.cloud.eg.clinet.dto.data;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+
+
+@Data
+public class CustomerDTO{
+    private String customerId;
+    private String memberId;
+    private String customerName;
+    private String customerType;
+    @NotEmpty
+    private String companyName;
+    @NotEmpty
+    private String source;
+}

+ 45 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/EgLoanApiConfigInfoDto.java

@@ -0,0 +1,45 @@
+package com.hrsk.cloud.eg.clinet.dto.data;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: EgApiConfigInfoDo api配置信息类 综合实体
+ * @date 2024/10/21 11:21
+ */
+@Data
+public class EgLoanApiConfigInfoDto implements Serializable {
+    /**
+     * API名称
+     */
+    private String apiName;
+
+    /**
+     * API类型
+     */
+    private String apiType;
+
+    /**
+     * 数据API主键
+     */
+    private Long apiId;
+    /**
+     * 通道类型
+     */
+    private String apiCode;
+
+    /**
+     * 请求配置 对应原始数据表中的 threeConfig
+     */
+    private byte[] requestConfig;
+
+    private byte[] apiConfig;
+
+    /**
+     * 是否需要撞库0:不需要;1:需要
+     */
+    private Integer needCheck;
+}

+ 6 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/ErrorCode.java

@@ -0,0 +1,6 @@
+package com.hrsk.cloud.eg.clinet.dto.data;
+
+
+public class ErrorCode {
+    public static final String B_CUSTOMER_companyNameConflict = "B_CUSTOMER_companyNameConflict";
+}

+ 29 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/command/ApiInvokeParamCmd.java

@@ -0,0 +1,29 @@
+package com.hrsk.cloud.eg.clinet.dto.data.command;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ApiParamCmd
+ * @date 2024/11/6 13:56
+ */
+@Data
+public class ApiInvokeParamCmd  implements Serializable {
+
+    /** 
+     * 定义的路由类型
+     */ 
+    private String route;
+
+
+    /**
+     * 参数
+     */
+    private Object param;
+
+
+}

+ 31 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/command/CheckIntoParamCmd.java

@@ -0,0 +1,31 @@
+package com.hrsk.cloud.eg.clinet.dto.data.command;
+
+import com.hrsk.cloud.eg.clinet.dto.data.plan.command.EgLoanApiConfigInfoCmd;
+import com.hrsk.cloud.eg.clinet.dto.data.plan.command.PlanCmd;
+import com.hrsk.cloud.eg.clinet.dto.data.user.command.UserBaseInfoCmd;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: CheckIntoParamDto
+ * @date 2024/8/30 09:52
+ */
+@Data
+public class CheckIntoParamCmd implements Serializable {
+    /**
+     * 用户信息
+     * */
+    private UserBaseInfoCmd user;
+    /**
+     * 推广计划信息
+     * */
+    private PlanCmd plan;
+
+    /**
+     * api信息配置
+     */
+    private EgLoanApiConfigInfoCmd apiConfigInfo;
+}

+ 18 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/common/LocalEnumDTO.java

@@ -0,0 +1,18 @@
+package com.hrsk.cloud.eg.clinet.dto.data.common;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: LocalEnumDto
+ * @date 2024/9/24 11:53
+ */
+@Data
+public class LocalEnumDTO implements Serializable {
+
+    private String code;
+    private String msg;
+}

+ 48 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/plan/command/EgLoanApiConfigInfoCmd.java

@@ -0,0 +1,48 @@
+package com.hrsk.cloud.eg.clinet.dto.data.plan.command;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: EgApiConfigInfoDo api配置信息类 综合实体
+ * @date 2024/10/21 11:21
+ */
+@Data
+public class EgLoanApiConfigInfoCmd implements Serializable {
+    /**
+     * API名称
+     */
+    private String apiName;
+
+    /**
+     * API类型
+     */
+    private String apiType;
+
+    /**
+     * 数据API主键
+     */
+    private Long apiId;
+    /**
+     * 通道类型
+     */
+    private String apiCode;
+
+    /**
+     * 请求配置 对应原始数据表中的 threeConfig
+     */
+    private byte[] requestConfig;
+
+    /**
+     * 是否需要撞库0:不需要;1:需要
+     */
+    private Integer needCheck;
+
+    /**
+     * api 介入类型代码自定义 还是引导配置
+     */
+    private String integrationMode;
+}

+ 42 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/plan/command/PlanCmd.java

@@ -0,0 +1,42 @@
+package com.hrsk.cloud.eg.clinet.dto.data.plan.command;
+
+import lombok.Data;
+import java.io.Serializable;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: PlanCmd 对外的推广计划Dto
+ * @date 2024/8/29 17:48
+ */
+@Data
+public class PlanCmd implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * apiId
+     *
+     * */
+    private Integer apiId;
+    /**
+     * 推广计划id
+     * */
+    private Integer planId;
+
+
+    /**
+     * 推广计划名称
+     * */
+    private String planName;
+
+
+    /**
+     * 商户信息
+     * */
+    private String bid;
+
+    /**
+     * 主账号
+     * */
+    private String accountName;
+}

+ 55 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserAssetCarInfoCmd.java

@@ -0,0 +1,55 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 信贷经理车产情况表
+ * </p>
+ *
+ * @author zhangyy
+ * @since 2019-09-29
+ */
+@Data
+public class UserAssetCarInfoCmd implements Serializable {
+
+
+    private Integer id;
+
+    private Long userId;
+
+    /**
+     * 车产情况 1.无车产 2.有车可抵押 3. 有车不抵押
+     */
+    private Integer carType;
+
+    /**
+     * 估值 1.5万及以下 2.10万 3.15万 4.20万 5.30万 6.50万 7.80万及以上
+     */
+    private Integer appeasement;
+
+    /**
+     * 是否接受抵押 1. 不接受抵押 2. 可以抵押
+     */
+    private Integer spawn;
+
+
+    private Date createTime;
+
+    private String createBy;
+
+    private Date updateTime;
+
+    private String updateBy;
+
+    /**
+     * 车牌号
+     */
+    private Integer vehiclePurchasePrice;
+
+
+}

+ 58 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserAssetHouseInfoCmd.java

@@ -0,0 +1,58 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 信贷经理房产情况表
+ * </p>
+ *
+ * @author zhangyy
+ * @since 2019-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UserAssetHouseInfoCmd implements Serializable {
+
+
+    private Integer id;
+
+    private Long userId;
+
+    /**
+     * 房产情况 1.商品住宅 2.无房产 3.商铺 4.办公楼 5.厂房 6.经济适用房/限价房 7.房改/危改房 8.小产权房 9.宅基地/自建房 10.军改房 11.商住两用房 12.有房可抵押,13:有房不抵押
+     * */
+    private Integer houseType;
+
+    /**
+     * 估值 1.50万以下 2.100万 3.200万 4.300万 5.500万 6.1000万以上
+     * */
+    private Integer appeasement;
+
+
+    /**
+     * 房产年限 1.10年以下 2.10-20年 3.20-25年 4.25-30年 5.30年以上
+     * */
+    private Integer houseLimit;
+
+    /**
+     * 是否接受抵押 1. 不接受抵押 2. 可以抵押
+     * */
+    private Integer spawn;
+
+    private Date createTime;
+
+    private String createBy;
+
+    private Date updateTime;
+
+    private String updateBy;
+
+
+}

+ 52 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserAssetInsuranceInfoCmd.java

@@ -0,0 +1,52 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 信贷经理寿险保单情况表
+ * </p>
+ *
+ * @author zhangyy
+ * @since 2019-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UserAssetInsuranceInfoCmd implements Serializable {
+
+
+    private Integer id;
+
+    private Long userId;
+
+    /**
+     * 寿险保单情况 1.未投寿险 2.投保6个月以上 3.投保6-12个月 4.投保1-3年 5.投保3-5年 6.投保5-10年 7.投保10年以上 8.有(时间未知)
+     * */
+    private Integer insuranceType;
+
+    /**
+     *  投保公司	1:安邦保险 2:中国平安 3:前海人寿 4:中国人寿 5:太平洋保险 6:泰康人寿 7:新华保险 8:阳光保险 9:招商保险 10:中国太平 11:其他
+     * */
+    private Integer insureCompany;
+
+    /**
+     *  保单估价 1.1万以下 2.1万-5万 3.5万-20万 4.20万-100万 5.100万以上
+     * */
+    private Integer appeasement;
+
+    private Date createTime;
+
+    private String createBy;
+
+    private Date updateTime;
+
+    private String updateBy;
+
+
+}

+ 174 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserBaseInfoCmd.java

@@ -0,0 +1,174 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 13:48
+ * @description: User信息Dto
+ **/
+@Data
+public class UserBaseInfoCmd implements Serializable {
+    /**
+     * 用户ID
+     * */
+    private Long userId;
+    /**
+     * 电话
+     * */
+    private String userMobile;
+    /**
+     * 用户身份证号
+     * */
+    private String idCardNo;
+    /**
+     * 用户真实姓名
+     * */
+    private String realName;
+    /**
+     * ip
+     * */
+    private String ip;
+    /**
+     * 当前操作环境
+     * */
+    private Integer runPlatform;
+    /**
+     * 设备类型
+     * */
+    private String deviceModel;
+    /**
+     * appId
+     * */
+    private Integer appId;
+    /**
+     * 性别
+     * */
+    private String policeSex;
+    /**
+     * 出生日期
+     * */
+    private String policeBirthBate;
+    /**
+     * 年龄
+     * */
+    private Integer age;
+    /**
+     * 城市名称简称数据库中获取 重庆
+     * */
+    private String companyCity;
+
+    /**
+     * 城市名称全称 重庆市
+     * */
+    private String cityAllName;
+    /**
+     * 社保
+     * */
+    private Integer socialSecurity;
+    /**
+     * 公积金
+     * */
+    private Integer accumulation;
+    /**
+     * 信用卡
+     * */
+    private Integer creditCard;
+    /**
+     * 信用额度
+     * */
+    private Integer creditLimit;
+    /**
+     * 芝麻分
+     * */
+    private Integer sesame;
+    /**
+     * 居住地址
+     * */
+    private Integer addressCityCode;
+    /**
+     * 职业
+     * */
+    private Integer profession;
+    /**
+     * 有无逾期
+     * */
+    private Integer overdue;
+    /**
+     * 需求金额
+     * */
+    private Integer borrowMoney;
+    /**
+     * 期限
+     * */
+    private Integer borrowLimit;
+    /**
+     * 贷款用途
+     * */
+    private Integer borrowPurpose;
+    /**
+     * 手机号md5
+     * */
+    private String phoneMd5;
+    /**
+     * 城市名称(对于我们助贷可能是简称)
+     * */
+    private String cityOfWork;
+    /**
+     * 城市code
+     * */
+    private String cityCode;
+    /**
+     * 电话盐
+     * */
+    private String userMobileSalt;
+    /**
+     * 身份证盐
+     * */
+    private String idCardNoSalt;
+    /**
+     * 注册渠道
+     * */
+    private String channelCode;
+    /**
+     * 激活渠道
+     * */
+    private String activeChannelCode;
+
+    /**
+     * 车产
+     * */
+    private UserAssetCarInfoCmd carInfo;
+
+    /**
+     * 房产
+     * */
+    private UserAssetHouseInfoCmd houseInfo;
+
+    /**
+     * 保单
+     * */
+    private UserAssetInsuranceInfoCmd insuranceInfo;
+
+    /**
+     * 电商主
+     * */
+    private UserProfessionBusinessOwnerCmd businessOwner;
+
+    /**
+     * 上班族信息
+     * */
+    private UserProfessionOfficeWorkersCmd officeWorkers;
+
+    /**
+     * 企业主
+     * */
+    private UserProfessionEcommerceOwnersCmd ecommerceOwners;
+
+    /**
+     * 个体户
+     * */
+    private UserProfessionSelfEmployedCmd selfEmployed;
+}

+ 77 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionBusinessOwnerCmd.java

@@ -0,0 +1,77 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 信贷经理职业-企业主信息表
+ * </p>
+ *
+ * @author zhangyy
+ * @since 2019-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UserProfessionBusinessOwnerCmd implements Serializable {
+
+
+    private Integer id;
+
+    private Long userId;
+
+    /**
+     * 企业类型 1.微小型企业一年收入500万以下 2.中小企业一年收入500万-5000万 3.大型企业一年收入5000万以上
+     * */
+    private Integer companyType;
+
+    /**
+     * 企业名称
+     * */
+    private String companyName;
+
+    /**
+     * 企业对公流水 1.5万以下 2.5万-30万 3.30万-100万 4.100万-1000万 5.1000万以上
+     * */
+    private String companyCommWater;
+
+    /**
+     * 企业对私流水 1.1万以下2.1万-5万3.5万-20万4.20万-100万5.100万以上
+     * */
+    private String companyPrivateWater;
+
+    /**
+     * 经营年限 1.6个月以内 2.6-12月 3.1-3年 4.3-5年 5.5年以上
+     * */
+    private Integer workingLimit;
+
+    /**
+     * 经营执照 1.没办理 2.已办理,注册1年以内 3.已办理,注册满1年 4.已办理,注册满2年 5.已办理,注册满3年 6.已办理,注册满4年 7.已办理,注册满5年以上
+     * */
+    private Integer businessLicense;
+
+    private Date createTime;
+
+    private String createBy;
+
+    private Date updateTime;
+
+    private String updateBy;
+
+    /**
+     * 月收入
+     * */
+    private String monthlyBillingIncome;
+
+    /**
+     * 类型 0:企业主 1:工商老板 2, 企业法人
+     * */
+    private Integer type;
+
+
+}

+ 66 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionEcommerceOwnersCmd.java

@@ -0,0 +1,66 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 信贷经理职业-电商主信息表
+ * </p>
+ *
+ * @author zhangyy
+ * @since 2019-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UserProfessionEcommerceOwnersCmd implements Serializable {
+
+
+    private Integer id;
+
+    private Long userId;
+
+    /**
+     *  "入驻平台 1.京东 " +
+     *             "2.淘宝 3.天猫 4.当当 5.eBay 6.amazon 7.其他"
+     *
+     */
+    private Integer ecommercePlatform;
+
+    /**
+     *  "月度营业额 " +
+     *             "1.1万以下 2.1万-5万 3.5万-20万 4.20万-100万 5.100万以上"
+     *
+     */
+    private Integer turnover;
+
+    /**
+     *  "经营年限 " +
+     *             "1.6个月以内 2.6-12月 3.1-3年 4.3-5年 5.5年以上"
+     *
+     */
+    private Integer workingLimit;
+
+    /**
+     *  "是否有营业执照" +
+     *             " 1.没办理 2.已办理,注册1年以内" +
+     *             " 3.已办理,注册满1年 4.已办理,注册满2年 5.已办理,注册满3年 6.已办理,注册满4年" +
+     *             " 7.已办理,注册满5年以上"
+     *
+     */
+    private Integer businessLicense;
+
+    private Date createTime;
+
+    private String createBy;
+
+    private Date updateTime;
+
+    private String updateBy;
+
+
+}

+ 67 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionOfficeWorkersCmd.java

@@ -0,0 +1,67 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 信贷经理职业-上班族信息表
+ * </p>
+ *
+ * @author zhangyy
+ * @since 2019-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UserProfessionOfficeWorkersCmd implements Serializable {
+
+
+    private Integer id;
+
+    private Long userId;
+
+    /**
+     *  "公司类型 " +
+     *             "1.民营企业 2.国企单位 3.事业单位 4.公务员 5.外企 6.其他"
+     * */
+    private Integer companyType;
+
+    /**
+     *  "公司名称"
+     * */
+    private String companyName;
+
+    /**
+     *  " "月收入 " +
+     *             "1.1000以下 2.1000-3000" +
+     *             "  3.3000-5000  4.5000-8000 " +
+     *             " 5.8000-1.2万  6.1.2万-2万  7.2万-5万  8.5万-10万  9.10万以上""
+     * */
+    private Integer monthlyIncome;
+
+    /**
+     *  工资支付方式 1.银行代发 2.转账工资 3.现金发放"
+     * */
+    private Integer salaryPayment;
+
+    /**
+     *  "工作年限 " +
+     *             "1.6个月以内  2.6-12月  3.1-3年  4.3-5年  5.5年以上"
+     * */
+    private Integer workingLimit;
+
+    private Date createTime;
+
+    private String createBy;
+
+    private Date updateTime;
+
+    private String updateBy;
+
+
+}

+ 76 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/data/user/command/UserProfessionSelfEmployedCmd.java

@@ -0,0 +1,76 @@
+package com.hrsk.cloud.eg.clinet.dto.data.user.command;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 信贷经理职业-个体户信息表
+ * </p>
+ *
+ * @author zhangyy
+ * @since 2019-09-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UserProfessionSelfEmployedCmd implements Serializable {
+
+
+    private Integer id;
+
+    private Long userId;
+
+    /**
+     * "经营年限 " +
+     *             " 1.6个月以内  2.6-12月  3.1-3年  4.3-5年  5.5年以上"
+     */
+    private Integer workingLimit;
+
+    /**
+     * "月度营业额  " +
+     *             "1.1000以下 2.1000-3000 3.3000-8000 4.8000-20000 5.20000-50000" +
+     *             " 6.50000-100000 7.100000以上"
+     */
+    private Integer turnover;
+
+    /**
+     *"是否有营业执照 " +
+     *             "1.没办理 2.已办理,注册1年以内 3.已办理,注册满1年 " +
+     *             "4.已办理,注册满2年 5.已办理,注册满3年" +
+     *             " 6.已办理,注册满4年 7.已办理,注册满5年以上"
+     */
+    private Integer businessLicense;
+
+    /**
+     *"pos机使用流水 1.无pos机 2.5万以下 3.5万-30万" +
+     *             " 4.30万-100万 5.100万-1000万 6.1000万以上"
+     */
+    private Integer posUseMoney;
+
+    /**
+     *"pos机使用年限 " +
+     *             "1.无pos机 2.6个月以内 3.6-12月 4.1-3年 5.3-5年 6.5年以上"
+     */
+    private Integer posUseLimit;
+
+    private Date createTime;
+
+    private String createBy;
+
+    private Date updateTime;
+
+    private String updateBy;
+
+    private Integer monthlyBillingIncome;
+
+    private Integer merchantType;
+
+
+
+
+}

+ 21 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/event/CustomerCreatedEvent.java

@@ -0,0 +1,21 @@
+package com.hrsk.cloud.eg.clinet.dto.event;
+
+/**
+ * CustomerCreatedEvent
+ *
+ * @author Frank Zhang
+ * @date 2019-01-04 10:32 AM
+ */
+public class CustomerCreatedEvent{
+
+    private String customerId;
+
+    public String getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(String customerId) {
+        this.customerId = customerId;
+    }
+
+}

+ 11 - 0
egress-gateway-service-client/src/main/java/com/hrsk/cloud/eg/clinet/dto/event/DomainEventConstant.java

@@ -0,0 +1,11 @@
+package com.hrsk.cloud.eg.clinet.dto.event;
+
+/**
+ * @author niexiaolong
+ * @date 2019/4/16
+ */
+public class DomainEventConstant {
+
+	public static final String CUSTOMER_CREATED_TOPIC = "CRM_CUSTOMER_CREATED_DOMAIN_EVENT_TOPIC";
+
+}

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

@@ -0,0 +1,117 @@
+package com.hrsk.cloud.eg.clinet.vo;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+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;
+    }
+}

+ 50 - 3
egress-gateway-service-domain/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.hrsk.cloud</groupId>
         <artifactId>egress-gateway-service</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0</version>
     </parent>
 
     <artifactId>egress-gateway-service-domain</artifactId>
@@ -13,12 +13,15 @@
         <maven.compiler.source>8</maven.compiler.source>
         <maven.compiler.target>8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <guava.version>33.2.1-jre</guava.version>
     </properties>
 
     <dependencies>
+
         <dependency>
-            <groupId>com.hrsk.pangu</groupId>
-            <artifactId>pangu-component-domain-starter</artifactId>
+            <groupId>com.hrsk.cloud</groupId>
+            <artifactId>egress-gateway-service-client</artifactId>
+            <version>1.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>com.hrsk.pangu</groupId>
@@ -28,5 +31,49 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cola</groupId>
+            <artifactId>cola-component-domain-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cola</groupId>
+            <artifactId>cola-component-exception</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-expression</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.apache.commons</groupId>-->
+<!--            <artifactId>commons-pool2</artifactId>-->
+<!--        </dependency>-->
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
     </dependencies>
 </project>

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

@@ -0,0 +1,14 @@
+package com.hrsk.cloud.eg.domain.api;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-26 17:58
+ * @description: API基类
+ **/
+public interface Api {
+    /**
+     * 获取类型
+     * @return 类型
+     */
+    String getType();
+}

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

@@ -0,0 +1,16 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import lombok.Data;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 15:59
+ * @description: API配置
+ **/
+@Data
+public class ApiConfig {
+    /**
+     * 类型
+     */
+    private String type;
+}

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

@@ -0,0 +1,31 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import lombok.Getter;
+import lombok.experimental.Accessors;
+import org.springframework.expression.spel.support.StandardEvaluationContext;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 11:48
+ * @description: API上下文
+ **/
+@Getter
+@Accessors(chain = true)
+public class ApiContext {
+    /**
+     * 入参
+     */
+    private final Object input;
+    /**
+     * spel context
+     */
+    private final StandardEvaluationContext spelContext = new StandardEvaluationContext();
+    /**
+     * 构造函数
+     * @param input 入参
+     */
+    public ApiContext(Object input) {
+        this.input = input;
+        spelContext.setVariable("param",input);
+    }
+}

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

@@ -0,0 +1,59 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.hrsk.cloud.eg.domain.api.common.ApiTypeEnums;
+import com.hrsk.cloud.eg.domain.common.utils.BizPreconditions;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import com.alibaba.cola.domain.DomainFactory;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-26 17:57
+ * @description: API领域对象工厂
+ **/
+@Component
+@Slf4j
+public class ApiFactory {
+    /**
+     * 创建API对象
+     * @param apiConfig api配置
+     * @param input 入参
+     * @return API
+     */
+    public Api createApi(ApiConfig apiConfig,Object input){
+        BizPreconditions.checkArgument(apiConfig!=null,"API配置不能为空!");
+        BizPreconditions.checkArgument(StringUtils.isNotBlank(apiConfig.getType()),"API配置类型不能为空!");
+        if(StringUtils.equals(ApiTypeEnums.HTTP.getType(),apiConfig.getType())
+          ||StringUtils.equals(ApiTypeEnums.HTTPS.getType(), apiConfig.getType())
+         ){
+            return createHttpApi((HttpApiConfig)apiConfig,input);
+        }else {
+            log.error("不支持的API类型:{}!",apiConfig.getType());
+        }
+        return null;
+    }
+
+
+    /**
+     * @description: 构建统一返回值
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/9/2 16:33
+     */
+    public Object createResult(ApiConfig apiConfig,Object output){
+        HttpApi httpApi = DomainFactory.create(HttpApi.class);
+        return httpApi.loadResult((HttpApiConfig) apiConfig,output);
+    }
+    /**
+     * 创建HTTP API
+     * @param httpApiConfig http api config
+     * @return  HTTP API
+     */
+    private Api createHttpApi(HttpApiConfig httpApiConfig,Object input){
+        HttpApi httpApi = DomainFactory.create(HttpApi.class);
+        httpApi.load(httpApiConfig,input);
+        return httpApi;
+    }
+}

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

@@ -0,0 +1,21 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.hrsk.cloud.eg.dto.data.CheckIntoParamDto;
+import com.hrsk.cloud.eg.vo.response.DataVo;
+import com.hrsk.cloud.eg.vo.response.DefaultResponseVo;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 18:14
+ * @description: API防腐层
+ **/
+public interface ApiGateway {
+
+    /**
+     * @description:  撞库请求
+     * @author zhangyy
+     * @date 2024/8/30 14:11
+     * @version 1.0
+     */
+    DefaultResponseVo<DataVo> checkIntoRequest (CheckIntoParamDto param);
+}

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

@@ -0,0 +1,38 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.alibaba.fastjson2.JSONObject;
+import lombok.Getter;
+import lombok.experimental.Accessors;
+import org.springframework.expression.spel.support.StandardEvaluationContext;
+
+import java.util.Map;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ApiResult
+ * @date 2024/8/30 10:54
+ */
+@Getter
+@Accessors(chain = true)
+public class ApiResult {
+
+    /**
+     * 入参
+     */
+    private final Map<String,Object> output;
+    /**
+     * spel context
+     */
+    private final StandardEvaluationContext spelContext = new StandardEvaluationContext();
+
+    /**
+     * 构造函数
+     *
+     * @param output 出参
+     */
+    public ApiResult(JSONObject output) {
+        this.output = output;
+        spelContext.setVariable("param", output);
+    }
+}

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

@@ -0,0 +1,48 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.google.common.collect.Lists;
+import com.hrsk.cloud.eg.domain.api.func.ValueObjectFunctionManager;
+import com.hrsk.cloud.eg.domain.api.resolver.vo.ValueObjectResolverManager;
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-27 11:05
+ * @description: 函数对象,值对象
+ **/
+@ToString
+@Data
+public class FunctionObject implements Serializable {
+    /**
+     * 编码
+     */
+    private String code;
+    /**
+     * 参数
+     */
+    private List<ValueObject> args = Lists.newArrayList();
+
+    /**
+     * 执行
+     */
+    public Object apply(Object value,ApiContext apiContext){
+        FunctionParam functionParam = new FunctionParam().setInput(value);
+        for(ValueObject arg : args){
+            functionParam.getExtArg().add(ValueObjectResolverManager.getInstance().resolve(arg,apiContext));
+        }
+        return ValueObjectFunctionManager.getInstance().apply(code,functionParam);
+    }
+
+    public Object apply(Object value, Map<String,Object> apiContext){
+        FunctionParam functionParam = new FunctionParam().setInput(value);
+        for(ValueObject arg : args){
+            functionParam.getExtArg().add(ValueObjectResolverManager.getInstance().resolve(arg,apiContext));
+        }
+        return ValueObjectFunctionManager.getInstance().apply(code,functionParam);
+    }
+}

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

@@ -0,0 +1,25 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.google.common.collect.Lists;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-30 11:40
+ * @description: 函数参数
+ **/
+@Data
+@Accessors(chain = true)
+public class FunctionParam {
+    /**
+     * 入参
+     */
+    private Object input;
+    /**
+     * 额外参数
+     */
+    private List<Object> extArg = Lists.newArrayList();
+}

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

@@ -0,0 +1,183 @@
+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;
+        }
+
+    }
+
+
+}

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

@@ -0,0 +1,61 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.google.common.collect.Lists;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 15:47
+ * @description: HTTP API配置
+ **/
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Accessors(chain = true)
+public class HttpApiConfig extends ApiConfig implements Serializable {
+    /**
+     * 请求方法
+     */
+    private String method;
+    /**
+     * url地址 http://baidu.com /a/b/c
+     */
+    private String url;
+    /**
+     * header
+     */
+    private List<KeyValueObject> header = Lists.newArrayList();
+    /**
+     * path  a/b/b
+     */
+    private List<ValueObject> path = Lists.newArrayList();
+    /**
+     * search
+     */
+    private List<KeyValueObject> search = Lists.newArrayList();
+    /**
+     * 内容类型
+     */
+    private String contentType;
+    /**
+     * body
+     */
+    private String content;
+
+    /**
+     * result 返回处理
+     */
+    private String resultHandle;
+
+     /**
+     * result 返回值
+     */
+    private String result;
+
+
+
+}

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

@@ -0,0 +1,29 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.hrsk.cloud.eg.domain.common.utils.BizPreconditions;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 16:14
+ * @description: kv对象
+ **/
+@ToString
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class KeyValueObject extends ValueObject {
+    /**
+     * key
+     */
+    private String key;
+    /**
+     * 校验必要参数
+     */
+    void checkParam(){
+        super.checkParam();
+        BizPreconditions.checkArgument(StringUtils.isEmpty(key),"配置中值对象的key不能为空!");
+    }
+}

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

@@ -0,0 +1,79 @@
+package com.hrsk.cloud.eg.domain.api;
+
+import com.hrsk.cloud.eg.domain.api.resolver.vo.ValueObjectResolverManager;
+import com.hrsk.cloud.eg.domain.common.utils.BizPreconditions;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.util.CollectionUtils;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-27 10:21
+ * @description: 值对象
+ **/
+
+@Getter
+@ToString
+public class ValueObject implements Serializable {
+    /**
+     * 类型
+     */
+    @Setter
+    private String type;
+    /**
+     * 值
+     */
+    @Setter
+    private String value;
+    /**
+     * 真实值
+     */
+    private Object realValue;
+    /**
+     * 函数链
+     */
+    @Setter
+    private List<FunctionObject> functions = new ArrayList<>();
+
+    /**
+     * 校验必要参数
+     */
+    void checkParam(){
+        BizPreconditions.checkArgument(StringUtils.isEmpty(type),"配置中值对象的type不能为空!");
+        BizPreconditions.checkArgument(StringUtils.isEmpty(value),"配置中值对象的value不能为空!");
+    }
+
+
+    public ValueObject compile(ApiContext apiContext){
+        this.realValue = ValueObjectResolverManager.getInstance().resolve(this,apiContext);
+        if(CollectionUtils.isEmpty(functions)){
+            return this;
+        }
+        for(FunctionObject function : functions){
+            this.realValue = function.apply(realValue,apiContext);
+        }
+        return this;
+    }
+
+
+    public ValueObject compile(Map<String,Object> apiContext){
+        this.realValue = ValueObjectResolverManager.getInstance().resolve(this,apiContext);
+        if(CollectionUtils.isEmpty(functions)){
+            return this;
+        }
+        for(FunctionObject function : functions){
+            this.realValue = function.apply(realValue,apiContext);
+        }
+        return this;
+    }
+
+
+
+}

+ 33 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ApiPayloadTypeEnum.java

@@ -0,0 +1,33 @@
+package com.hrsk.cloud.eg.domain.api.common;
+
+import lombok.Getter;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 17:38
+ * @description: api payload 类型枚举
+ **/
+@Getter
+public enum ApiPayloadTypeEnum {
+    APPLICATION_JSON("application/json"),
+    APPLICATION_X_WWW_FORM_URLENCODED("application/x-www-form-urlencoded; charset=UTF-8");
+
+    /**
+     * 编码
+     * -- GETTER --
+     *  获取编码
+     *
+     * @return 编码
+
+     */
+    private final String code;
+
+    /**
+     * 构造函数
+     * @param code 编码
+     */
+    ApiPayloadTypeEnum(String code) {
+        this.code = code;
+    }
+
+}

+ 30 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ApiResultTypeENum.java

@@ -0,0 +1,30 @@
+package com.hrsk.cloud.eg.domain.api.common;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ApiResultTypeENum
+ * @date 2024/9/2 18:04
+ */
+public enum ApiResultTypeENum {
+    APPLICATION_JSON("application/json");
+
+    /**
+     * 编码
+     * -- GETTER --
+     *  获取编码
+     *
+     * @return 编码
+
+     */
+    private final String code;
+
+    /**
+     * 构造函数
+     * @param code 编码
+     */
+    ApiResultTypeENum(String code) {
+        this.code = code;
+    }
+
+}

+ 33 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ApiTypeEnums.java

@@ -0,0 +1,33 @@
+package com.hrsk.cloud.eg.domain.api.common;
+
+import lombok.Getter;
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-27 09:46
+ * @description: API类型枚举
+ **/
+@Getter
+public enum ApiTypeEnums {
+
+    HTTP("http","http类型"),
+    HTTPS("https","https类型");
+    ;
+    /**
+     * 类型
+     */
+    private final String type;
+    /**
+     * 描述
+     */
+    private final String description;
+
+    /**
+     * 构造函数
+     * @param type 类型
+     * @param description 描述
+     */
+    ApiTypeEnums(String type, String description) {
+        this.type = type;
+        this.description = description;
+    }
+}

+ 26 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/DataVoStatusEnum.java

@@ -0,0 +1,26 @@
+package com.hrsk.cloud.eg.domain.api.common;
+
+import lombok.Getter;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: DataVoStatusEnum
+ * @date 2024/9/5 12:03
+ */
+@Getter
+public enum DataVoStatusEnum {
+
+   SUCCESS(1,"成功"),
+    FAIL(0,"失败");
+
+   private Integer code;
+   private String msg;
+   DataVoStatusEnum(Integer code, String msg) {
+       this.code = code;
+       this.msg = msg;
+   }
+
+
+
+}

+ 45 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ThreeplatfromResultCodeEnum.java

@@ -0,0 +1,45 @@
+package com.hrsk.cloud.eg.domain.api.common;
+
+import com.google.common.collect.Lists;
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ThreeplatfromResultCodeEnum 对接api或者平台 成功的返回值用来
+ * @date 2024/9/5 13:52
+ */
+@Getter
+public enum ThreeplatfromResultCodeEnum {
+    ONE(200,""),
+    TWO(400,""),
+    THREE(1,""),
+;
+    private Integer code;
+    private String msg;
+
+    ThreeplatfromResultCodeEnum(Integer code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public static ThreeplatfromResultCodeEnum getByCode(Integer code) {
+        for (ThreeplatfromResultCodeEnum result : ThreeplatfromResultCodeEnum.values()) {
+            if (result.getCode().equals(code)) {
+                return result;
+            }
+        }
+        return null;
+    }
+
+    public static List<Integer> getList() {
+        List<Integer> result = Lists.newArrayList();
+        for (ThreeplatfromResultCodeEnum code : ThreeplatfromResultCodeEnum.values()) {
+            result.add(code.getCode());
+        }
+        return result;
+    }
+}

+ 43 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ThreeplatfromResultStringEnum.java

@@ -0,0 +1,43 @@
+package com.hrsk.cloud.eg.domain.api.common;
+
+import com.google.common.collect.Lists;
+import lombok.Getter;
+
+import java.util.List;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: ThreeplatfromResultCodeEnum 对接api或者平台 成功的返回值用来
+ * @date 2024/9/5 13:52
+ */
+@Getter
+public enum ThreeplatfromResultStringEnum {
+    ONE("0000",""),
+
+;
+    private String code;
+    private String msg;
+
+    ThreeplatfromResultStringEnum(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public static ThreeplatfromResultStringEnum getByCode(String code) {
+        for (ThreeplatfromResultStringEnum result : ThreeplatfromResultStringEnum.values()) {
+            if (result.getCode().equals(code)) {
+                return result;
+            }
+        }
+        return null;
+    }
+
+    public static List<String> getList() {
+        List<String> result = Lists.newArrayList();
+        for (ThreeplatfromResultStringEnum code : ThreeplatfromResultStringEnum.values()) {
+            result.add(code.getCode());
+        }
+        return result;
+    }
+}

+ 33 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/common/ValueObjectTypeEnum.java

@@ -0,0 +1,33 @@
+package com.hrsk.cloud.eg.domain.api.common;
+
+import lombok.Getter;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 15:06
+ * @description: 值对象类型枚举
+ **/
+public enum ValueObjectTypeEnum {
+    SPEL("spel","spel类型"),
+    BASIC("basic","");
+    /**
+     * 类型
+     */
+    @Getter
+    private final String type;
+    /**
+     * 描述
+     */
+    @Getter
+    private final String memo;
+
+    /**
+     * 构造函数
+     * @param type 类型
+     * @param memo 描述
+     */
+    ValueObjectTypeEnum(String type, String memo) {
+        this.type = type;
+        this.memo = memo;
+    }
+}

+ 129 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/func/EncryptionFunction.java

@@ -0,0 +1,129 @@
+package com.hrsk.cloud.eg.domain.api.func;
+
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+import com.hrsk.cloud.eg.domain.api.FunctionParam;
+import com.hrsk.cloud.eg.domain.api.common.DataVoStatusEnum;
+import com.hrsk.cloud.eg.domain.api.common.ThreeplatfromResultCodeEnum;
+import com.hrsk.cloud.eg.domain.api.common.ThreeplatfromResultStringEnum;
+import lombok.extern.slf4j.Slf4j;
+
+import java.security.MessageDigest;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 15:58
+ * @description: 加解密函数
+ **/
+@Slf4j
+public class EncryptionFunction {
+    /**
+     * MD5函数
+     * @param functionParam 入参
+     * @return MD字符串
+     */
+    public static String md5(FunctionParam functionParam){
+        String input = Objects.toString(functionParam.getInput(),null);
+        //用于加密的字符
+        char[] md5String = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+                'A', 'B', 'C', 'D', 'E', 'F' };
+        try {
+            //使用平台的默认字符集将此 String 编码为 byte序列,并将结果存储到一个新的 byte数组中
+            byte[] btInput = input.getBytes();
+            //信息摘要是安全的单向哈希函数,它接收任意大小的数据,并输出固定长度的哈希值。
+            MessageDigest mdInst = MessageDigest.getInstance("MD5");
+            //MessageDigest对象通过使用 update方法处理数据, 使用指定的byte数组更新摘要
+            mdInst.update(btInput);
+            // 摘要更新之后,通过调用digest()执行哈希计算,获得密文
+            byte[] md = mdInst.digest();
+            // 把密文转换成十六进制的字符串形式
+            int j = md.length;
+            char[] str = new char[j * 2];
+            int k = 0;
+            for (int i = 0; i < j; i++) {   //  i = 0
+                byte byte0 = md[i];  //95
+                str[k++] = md5String[byte0 >>> 4 & 0xf];    //    5
+                str[k++] = md5String[byte0 & 0xf];   //   F
+            }
+            //返回经过加密后的字符串
+            return new String(str);
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+
+    /**
+     * @description:  第三方返回值进行配置
+     * @param:
+     * @return: Integer
+     * @author zhangyy
+     * @date: 2024/9/5 14:00
+     */
+    public static Integer resultCodeConvertStatusInteger(FunctionParam functionParam) {
+        String value = functionParam.getInput().toString();
+        Integer result = Integer.valueOf(value);
+        if (ThreeplatfromResultCodeEnum.getList().contains(result)) {
+            return DataVoStatusEnum.SUCCESS.getCode();
+        }else  {
+            return DataVoStatusEnum.FAIL.getCode();
+        }
+    }
+
+    /**
+     * @description:  第三方返回值进行配置
+     * @param:
+     * @return: Integer
+     * @author zhangyy
+     * @date: 2024/9/5 14:00
+     */
+    public static Integer resultCodeConvertStatusString(FunctionParam functionParam) {
+        String value = functionParam.getInput().toString();
+        Integer result = Integer.valueOf(value);
+        if (ThreeplatfromResultStringEnum.getList().contains(result)) {
+            return DataVoStatusEnum.SUCCESS.getCode();
+        }else  {
+            return DataVoStatusEnum.FAIL.getCode();
+        }
+    }
+
+    /**
+     * @description:  组合第三方返回值进行配置返回
+     * @param:
+     * @return: Integer
+     * @author zhangyy
+     * @date: 2024/9/5 14:00
+     */
+    public static Integer combinationCodeSuccessIsExit(FunctionParam functionParam) {
+       try {
+
+           List<Object> extArg = functionParam.getExtArg();
+           int size = extArg.size();
+           if (size == 3) {
+               Integer o = (Integer) extArg.get(0);
+               Boolean o1 = (Boolean) extArg.get(1);
+               Boolean o2 = (Boolean) extArg.get(2);
+               if (o.equals(DataVoStatusEnum.SUCCESS.getCode())
+                       && o1&&o2) {
+                   return DataVoStatusEnum.SUCCESS.getCode();
+               }
+           }
+           if (size == 2) {
+               Integer o = (Integer) extArg.get(0);
+               Boolean o1 = Boolean.parseBoolean(extArg.get(1).toString());
+               if (o.equals(DataVoStatusEnum.SUCCESS.getCode())
+                       && o1) {
+                   return DataVoStatusEnum.SUCCESS.getCode();
+               }
+           }
+
+       }catch (Exception e){
+           log.error("组合方式参数校验出现错误{}",e.getMessage(),e);
+           return DataVoStatusEnum.FAIL.getCode();
+       }
+          return DataVoStatusEnum.FAIL.getCode();
+    }
+}

+ 69 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/func/ValueObjectFunctionManager.java

@@ -0,0 +1,69 @@
+package com.hrsk.cloud.eg.domain.api.func;
+
+import com.alibaba.cola.exception.BizException;
+import com.hrsk.cloud.eg.domain.api.FunctionParam;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Function;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 09:48
+ * @description: 值对象函数管理器
+ **/
+@Slf4j
+public class ValueObjectFunctionManager {
+    /**
+     * 函数
+     */
+    private static final Map<String, Function<FunctionParam, Object>> FUNCTIONS = new HashMap<>();
+    /**
+     * 实例
+     */
+    private static final ValueObjectFunctionManager INSTANCE = new ValueObjectFunctionManager();
+
+    static {
+        regist();
+    }
+
+    /**
+     * 构造函数
+     */
+    private ValueObjectFunctionManager(){}
+
+    /**
+     * 获取实例
+     * @return 实例
+     */
+    public static ValueObjectFunctionManager getInstance() {
+        return INSTANCE;
+    }
+
+    /**
+     * 注册函数
+     */
+    private static void regist(){
+        log.info("开始注册值对象函数!");
+        FUNCTIONS.put("md5", EncryptionFunction::md5);
+        FUNCTIONS.put("resultCodeConvertStatusInteger", EncryptionFunction::resultCodeConvertStatusInteger);
+        FUNCTIONS.put("resultCodeConvertStatusString", EncryptionFunction::resultCodeConvertStatusString);
+        FUNCTIONS.put("combinationCodeSuccessIsExit",EncryptionFunction::combinationCodeSuccessIsExit);
+        log.info("函数已注册!");
+    }
+
+    /**
+     * 执行函数
+     * @param code 函数编码
+     * @param functionParam 函数参数
+     * @return 函数执行结果
+     */
+    public Object apply(String code, FunctionParam functionParam){
+        Function<FunctionParam,Object> function = FUNCTIONS.get(code);
+        if(function == null){
+            throw new BizException("不支持的函数编码!");
+        }
+        return function.apply(functionParam);
+    }
+}

+ 97 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/payload/ApiJsonPayloadResolver.java

@@ -0,0 +1,97 @@
+package com.hrsk.cloud.eg.domain.api.resolver.payload;
+
+import com.alibaba.cola.exception.BizException;
+import com.google.gson.*;
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ValueObject;
+import com.hrsk.cloud.eg.domain.common.utils.GsonUtils;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 15:38
+ * @description: json类型payload
+ **/
+public class ApiJsonPayloadResolver implements ApiPayloadResolver {
+    /**
+     * JSON配置最大深度
+     */
+    private static final Integer MAX_DEEP = 10;
+    /**
+     * 配置前缀标记
+     */
+    private static final String CONFIG_PREFIX_SIGN = "#{";
+
+    /**
+     * 配置后缀标记
+     */
+    private static final String CONFIG_END_SIGN = "}";
+
+    @Override
+    public Object resolve(String jsonTemplate, ApiContext context) {
+        if (StringUtils.isBlank(jsonTemplate)) {
+            return new Object();
+        }
+        JsonElement jsonElement = GsonUtils.fromJson(jsonTemplate, JsonElement.class);
+        traverseJson(jsonElement,jsonElement,null,context,0);
+        return jsonElement.toString();
+    }
+
+
+
+    /**
+     * 遍历json
+     * @param jsonElement json元素
+     * @param context 上下文
+     * @param deep 深度
+     */
+    public void traverseJson(JsonElement jsonElement, JsonElement currentElement,String currentKey,ApiContext context,Integer deep) {
+        deep++;
+        if(deep >= MAX_DEEP){
+            throw new BizException(String.format("请求payload的json配置深度达到允许的最大深度[%s]!",MAX_DEEP));
+        }
+        if (jsonElement.isJsonObject()) {
+            JsonObject jsonObject = jsonElement.getAsJsonObject();
+            for (String key : jsonObject.keySet()) {
+                traverseJson(jsonObject.get(key),jsonObject,key,context,deep);
+            }
+        } else if (jsonElement.isJsonArray()) {
+            JsonArray jsonArray = jsonElement.getAsJsonArray();
+            for (JsonElement elem : jsonArray) {
+                traverseJson(elem,currentElement,null,context,deep);
+            }
+        } else {
+            if(jsonElement.isJsonPrimitive() && jsonElement.getAsJsonPrimitive().isString()){
+                String value = jsonElement.getAsString();
+                if(value.startsWith(CONFIG_PREFIX_SIGN)&&value.endsWith(CONFIG_END_SIGN)){
+                    JsonPrimitive newElement = parseSpelConfigToRealValue(jsonElement,context);
+                    if(StringUtils.isNotBlank(currentKey)){
+                        currentElement.getAsJsonObject().add(currentKey,newElement);
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * 将spel表达式转换成真实值
+     * @param jsonElement json元素
+     */
+    private JsonPrimitive parseSpelConfigToRealValue(JsonElement jsonElement, ApiContext context){
+        String value = jsonElement.getAsString();
+        value = StringUtils.replace(value,CONFIG_PREFIX_SIGN,"{",3);
+        ValueObject valueObject = new Gson().fromJson(value,ValueObject.class);
+        Object realValue = valueObject.compile(context).getRealValue();
+        if(realValue instanceof Number){
+            return new JsonPrimitive((Number)realValue);
+        }else if(realValue instanceof String){
+            return new JsonPrimitive((String)realValue);
+        }else if(realValue instanceof Boolean){
+            return new JsonPrimitive((Boolean)realValue);
+        }else if(realValue instanceof Character){
+            return new JsonPrimitive((Character)realValue);
+        }
+        return null;
+    }
+}

+ 18 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/payload/ApiPayloadResolver.java

@@ -0,0 +1,18 @@
+package com.hrsk.cloud.eg.domain.api.resolver.payload;
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 15:37
+ * @description: http api payload
+ **/
+public interface ApiPayloadResolver {
+    /**
+     * 获取payload
+     * @param template payload模版
+     * @param context 上下文
+     */
+    Object resolve(String template, ApiContext context);
+
+
+}

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

@@ -0,0 +1,61 @@
+package com.hrsk.cloud.eg.domain.api.resolver.payload;
+
+import com.google.common.collect.Maps;
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ApiResult;
+import com.hrsk.cloud.eg.domain.api.common.ApiPayloadTypeEnum;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 17:38
+ * @description: api payload 管理器
+ **/
+@Slf4j
+public class ApiPayloadResolverManage {
+    /**
+     * PAYLOAD MAP
+     */
+    private static final Map<String, ApiPayloadResolver> RESOLVER_MAP = Maps.newHashMap();
+    /**
+     * INSTANCE
+     */
+    private static final ApiPayloadResolverManage INSTANCE = new ApiPayloadResolverManage();
+
+    static {
+        regist();
+    }
+
+    private ApiPayloadResolverManage(){}
+
+    /**
+     * 获取实例
+     * @return 实例
+     */
+    public static ApiPayloadResolverManage getInstance(){
+        return INSTANCE;
+    }
+
+    /**
+     * 解析
+     * @param code 编码
+     * @param apiContext 上下文
+     * @return 解析结果
+     */
+    public Object resolve(String code, String template, ApiContext apiContext){
+        return RESOLVER_MAP.get(code).resolve(template,apiContext);
+    }
+
+    /**
+     * 注册
+     */
+    private static void regist(){
+        log.info("开始注册Payload解析器!");
+        RESOLVER_MAP.put(ApiPayloadTypeEnum.APPLICATION_JSON.getCode(),new ApiJsonPayloadResolver());
+        RESOLVER_MAP.put(ApiPayloadTypeEnum.APPLICATION_X_WWW_FORM_URLENCODED.getCode(),new ApiJsonPayloadResolver());
+
+
+    }
+}

+ 151 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/result/ApiJsonResultResolver.java

@@ -0,0 +1,151 @@
+package com.hrsk.cloud.eg.domain.api.resolver.result;
+
+import com.alibaba.cola.exception.BizException;
+import com.google.gson.*;
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ValueObject;
+import com.hrsk.cloud.eg.domain.common.utils.GsonUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 15:38
+ * @description: json类型payload
+ **/
+public class ApiJsonResultResolver implements ApiResultResolver {
+    /**
+     * JSON配置最大深度
+     */
+    private static final Integer MAX_DEEP = 10;
+    /**
+     * 配置前缀标记
+     */
+    private static final String CONFIG_PREFIX_SIGN = "#{";
+
+    /**
+     * 配置后缀标记
+     */
+    private static final String CONFIG_END_SIGN = "}";
+
+
+
+    @Override
+    public Object resolve(String jsonTemplate, Map<String,Object> context) {
+        JsonElement jsonElement = GsonUtils.fromJson(jsonTemplate, JsonElement.class);
+        traverseJson(jsonElement,jsonElement,null,context,0);
+        return jsonElement.toString();
+    }
+    /**
+     * 遍历json
+     * @param jsonElement json元素
+     * @param context 上下文
+     * @param deep 深度
+     */
+    public void traverseJson(JsonElement jsonElement, JsonElement currentElement,String currentKey,Map<String,Object> context,Integer deep) {
+        deep++;
+        if(deep >= MAX_DEEP){
+            throw new BizException(String.format("请求payload的json配置深度达到允许的最大深度[%s]!",MAX_DEEP));
+        }
+        if (jsonElement.isJsonObject()) {
+            JsonObject jsonObject = jsonElement.getAsJsonObject();
+            for (String key : jsonObject.keySet()) {
+                traverseJson(jsonObject.get(key),jsonObject,key,context,deep);
+            }
+        } else if (jsonElement.isJsonArray()) {
+            JsonArray jsonArray = jsonElement.getAsJsonArray();
+            for (JsonElement elem : jsonArray) {
+                traverseJson(elem,currentElement,null,context,deep);
+            }
+        } else {
+            if(jsonElement.isJsonPrimitive() && jsonElement.getAsJsonPrimitive().isString()){
+                String value = jsonElement.getAsString();
+                if(value.startsWith(CONFIG_PREFIX_SIGN)&&value.endsWith(CONFIG_END_SIGN)){
+                    JsonPrimitive newElement = parseSpelConfigToRealValue(jsonElement,context);
+                    if(StringUtils.isNotBlank(currentKey)){
+                        currentElement.getAsJsonObject().add(currentKey,newElement);
+                    }
+                }
+            }
+        }
+    }
+
+
+
+    /**
+     * 遍历json
+     * @param jsonElement json元素
+     * @param context 上下文
+     * @param deep 深度
+     */
+    public void traverseJson(JsonElement jsonElement, JsonElement currentElement,String currentKey,ApiContext context,Integer deep) {
+        deep++;
+        if(deep >= MAX_DEEP){
+            throw new BizException(String.format("请求payload的json配置深度达到允许的最大深度[%s]!",MAX_DEEP));
+        }
+        if (jsonElement.isJsonObject()) {
+            JsonObject jsonObject = jsonElement.getAsJsonObject();
+            for (String key : jsonObject.keySet()) {
+                traverseJson(jsonObject.get(key),jsonObject,key,context,deep);
+            }
+        } else if (jsonElement.isJsonArray()) {
+            JsonArray jsonArray = jsonElement.getAsJsonArray();
+            for (JsonElement elem : jsonArray) {
+                traverseJson(elem,currentElement,null,context,deep);
+            }
+        } else {
+            if(jsonElement.isJsonPrimitive() && jsonElement.getAsJsonPrimitive().isString()){
+                String value = jsonElement.getAsString();
+                if(value.startsWith(CONFIG_PREFIX_SIGN)&&value.endsWith(CONFIG_END_SIGN)){
+                    JsonPrimitive newElement = parseSpelConfigToRealValue(jsonElement,context);
+                    if(StringUtils.isNotBlank(currentKey)){
+                        currentElement.getAsJsonObject().add(currentKey,newElement);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 将spel表达式转换成真实值
+     * @param jsonElement json元素
+     */
+    private JsonPrimitive parseSpelConfigToRealValue(JsonElement jsonElement, Map<String,Object> context){
+        String value = jsonElement.getAsString();
+        value = StringUtils.replace(value,CONFIG_PREFIX_SIGN,"{",3);
+        ValueObject valueObject = new Gson().fromJson(value,ValueObject.class);
+        Object realValue = valueObject.compile(context).getRealValue();
+        if(realValue instanceof Number){
+            return new JsonPrimitive((Number)realValue);
+        }else if(realValue instanceof String){
+            return new JsonPrimitive((String)realValue);
+        }else if(realValue instanceof Boolean){
+            return new JsonPrimitive((Boolean)realValue);
+        }else if(realValue instanceof Character){
+            return new JsonPrimitive((Character)realValue);
+        }
+        return null;
+    }
+
+    /**
+     * 将spel表达式转换成真实值
+     * @param jsonElement json元素
+     */
+    private JsonPrimitive parseSpelConfigToRealValue(JsonElement jsonElement, ApiContext context){
+        String value = jsonElement.getAsString();
+        value = StringUtils.replace(value,CONFIG_PREFIX_SIGN,"{",3);
+        ValueObject valueObject = new Gson().fromJson(value,ValueObject.class);
+        Object realValue = valueObject.compile(context).getRealValue();
+        if(realValue instanceof Number){
+            return new JsonPrimitive((Number)realValue);
+        }else if(realValue instanceof String){
+            return new JsonPrimitive((String)realValue);
+        }else if(realValue instanceof Boolean){
+            return new JsonPrimitive((Boolean)realValue);
+        }else if(realValue instanceof Character){
+            return new JsonPrimitive((Character)realValue);
+        }
+        return null;
+    }
+}

+ 23 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/result/ApiResultResolver.java

@@ -0,0 +1,23 @@
+package com.hrsk.cloud.eg.domain.api.resolver.result;
+
+
+import com.hrsk.cloud.eg.domain.api.ApiResult;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 15:37
+ * @description: http api payload
+ **/
+public interface ApiResultResolver {
+
+
+    /**
+     * @description:  加载返回值模版
+     * @author zhangyy
+     * @date 2024/9/2 15:19
+     * @version 1.0
+     */
+    Object resolve(String template, Map<String,Object> context);
+}

+ 62 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/result/ApiResultResolverManage.java

@@ -0,0 +1,62 @@
+package com.hrsk.cloud.eg.domain.api.resolver.result;
+
+import com.google.common.collect.Maps;
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ApiResult;
+import com.hrsk.cloud.eg.domain.api.common.ApiPayloadTypeEnum;
+import com.hrsk.cloud.eg.domain.api.resolver.payload.ApiJsonPayloadResolver;
+import com.hrsk.cloud.eg.domain.api.resolver.payload.ApiPayloadResolver;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 17:38
+ * @description: api payload 管理器
+ **/
+@Slf4j
+public class ApiResultResolverManage {
+    /**
+     * PAYLOAD MAP
+     */
+    private static final Map<String, ApiResultResolver> RESOLVER_MAP = Maps.newHashMap();
+    /**
+     * INSTANCE
+     */
+    private static final ApiResultResolverManage INSTANCE = new ApiResultResolverManage();
+
+    static {
+        regist();
+    }
+
+    private ApiResultResolverManage(){}
+
+    /**
+     * 获取实例
+     * @return 实例
+     */
+    public static ApiResultResolverManage getInstance(){
+        return INSTANCE;
+    }
+
+
+    /**
+     * 解析
+     * @param code 编码
+     * @param apiResult
+     * @return 解析结果
+     */
+    public Object resolve(String code, String template, Map<String,Object> apiResult){
+        return RESOLVER_MAP.get(code).resolve(template,apiResult);
+    }
+    /**
+     * 注册
+     */
+    private static void regist(){
+        log.info("开始注册Payload解析器!");
+        RESOLVER_MAP.put(ApiPayloadTypeEnum.APPLICATION_JSON.getCode(),new ApiJsonResultResolver());
+        RESOLVER_MAP.put(ApiPayloadTypeEnum.APPLICATION_X_WWW_FORM_URLENCODED.getCode(),new ApiJsonResultResolver());
+
+    }
+}

+ 41 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/BasicTypeValueObjectResolver.java

@@ -0,0 +1,41 @@
+package com.hrsk.cloud.eg.domain.api.resolver.vo;
+
+
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ApiResult;
+import com.hrsk.cloud.eg.domain.api.ValueObject;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 14:35
+ * @description: 基础类型值对象解析器
+ **/
+public class BasicTypeValueObjectResolver implements ValueObjectResolver {
+    /**
+     * 基本类型
+     */
+    public static final String[] BASIC_TYPES = new String[]{"text","string","double","float","boolean"};
+    /**
+     * 解析
+     * @param valueObject 待解析对象
+     * @return 解析后对象
+     */
+    @Override
+    public Object resolve(ValueObject valueObject, ApiContext context) {
+        return valueObject.getValue();
+    }
+
+    /**
+     * @description:  解析map<string,object></string,object>
+     * @author zhangyy
+     * @date 2024/9/3 15:21
+     * @version 1.0
+     */
+    @Override
+    public Object resolve(ValueObject valueObject, Map<String, Object> context) {
+        return valueObject.getValue();
+    }
+
+}

+ 60 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/SpelValueObjectResolver.java

@@ -0,0 +1,60 @@
+package com.hrsk.cloud.eg.domain.api.resolver.vo;
+
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ApiResult;
+import com.hrsk.cloud.eg.domain.api.ValueObject;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.expression.ExpressionParser;
+import org.springframework.expression.spel.standard.SpelExpressionParser;
+import org.springframework.expression.spel.support.StandardEvaluationContext;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 14:38
+ * @description: Spel值对象解析器
+ **/
+@Slf4j
+public class SpelValueObjectResolver  implements ValueObjectResolver{
+    /**
+     * spel parser
+     */
+    private final ExpressionParser parser = new SpelExpressionParser();
+
+    /**
+     * 解析
+     * @param valueObject 解析对象
+     * @param context 上下文
+     * @return 解析结果
+     */
+    @Override
+    public Object resolve(ValueObject valueObject, ApiContext context) {
+        try{
+            return parser.parseExpression(valueObject.getValue()).getValue(context.getSpelContext());
+        }catch (Exception ex){
+            log.error("属性配置错误!",ex);
+            return null;
+        }
+    }
+
+
+    /** 
+     * @description: spel map解析valueObject
+     * @param:  
+     * @return:  
+     * @author zhangyy
+     * @date: 2024/9/3 15:18
+     */ 
+    @Override
+    public Object resolve(ValueObject valueObject, Map<String, Object> context) {
+      try {
+          StandardEvaluationContext standardEvaluationContext = new StandardEvaluationContext(context);
+           return parser.parseExpression(valueObject.getValue()).getValue(standardEvaluationContext);
+      } catch (Exception e) {
+          log.error("属性配置错误!",e);
+          return null;
+      }
+
+    }
+}

+ 32 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/ValueObjectResolver.java

@@ -0,0 +1,32 @@
+package com.hrsk.cloud.eg.domain.api.resolver.vo;
+
+
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ApiResult;
+import com.hrsk.cloud.eg.domain.api.ValueObject;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-31 14:32
+ * @description: 值对象解析器
+ **/
+public interface ValueObjectResolver {
+    /**
+     * 解析
+     * @param valueObject 解析对象
+     * @param context 上下文
+     * @return 解析结果
+     */
+    Object resolve(ValueObject valueObject, ApiContext context);
+
+    /**
+     * 解析
+     * @param valueObject 解析对象
+     * @param context 上下文
+     * @return 解析结果
+     */
+    Object resolve(ValueObject valueObject, Map<String,Object> context);
+}
+

+ 88 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/resolver/vo/ValueObjectResolverManager.java

@@ -0,0 +1,88 @@
+package com.hrsk.cloud.eg.domain.api.resolver.vo;
+
+import com.alibaba.cola.exception.BizException;
+import com.google.common.collect.Maps;
+import com.hrsk.cloud.eg.domain.api.ApiContext;
+import com.hrsk.cloud.eg.domain.api.ApiResult;
+import com.hrsk.cloud.eg.domain.api.ValueObject;
+import com.hrsk.cloud.eg.domain.api.common.ValueObjectTypeEnum;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Map;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 09:53
+ * @description: 值对象处理器管理器
+ **/
+@Slf4j
+public class ValueObjectResolverManager {
+    /**
+     * 解析器映射
+     */
+    private static final Map<String,ValueObjectResolver> RESOLVERS = Maps.newHashMap();
+    /**
+     * INSTANCE
+     */
+    private static final ValueObjectResolverManager INSTANCE = new ValueObjectResolverManager();
+
+    static {
+        regist();
+    }
+
+    /**
+     * 构造函数
+     */
+    private ValueObjectResolverManager(){}
+
+    /**
+     * 获取实例
+     * @return 实例
+     */
+    public static ValueObjectResolverManager getInstance(){
+        return INSTANCE;
+    }
+
+    /**
+     * 解析
+     * @param valueObject 值对象
+     * @param context 上下文
+     * @return 解析结果
+     */
+    public Object resolve(ValueObject valueObject, ApiContext context){
+        String type = valueObject.getType();
+        String key = valueObject.getType();
+        if(StringUtils.equalsAnyIgnoreCase(type, BasicTypeValueObjectResolver.BASIC_TYPES)){
+            key = ValueObjectTypeEnum.BASIC.getType();
+        }
+        if(StringUtils.isBlank(key)){
+            throw new BizException("目前不支持此类型的解析!");
+        }
+        return RESOLVERS.get(key).resolve(valueObject,context);
+    }
+
+    public Object resolve(ValueObject valueObject, Map<String,Object> context){
+        String type = valueObject.getType();
+        String key = valueObject.getType();
+        if(StringUtils.equalsAnyIgnoreCase(type, BasicTypeValueObjectResolver.BASIC_TYPES)){
+            key = ValueObjectTypeEnum.BASIC.getType();
+        }
+        if(StringUtils.isBlank(key)){
+            throw new BizException("目前不支持此类型的解析!");
+        }
+        return RESOLVERS.get(key).resolve(valueObject,context);
+    }
+
+
+    /**
+     * 注册
+     */
+    private static void regist() {
+        log.info("开始注册ValueObject解析器......");
+        RESOLVERS.put(ValueObjectTypeEnum.SPEL.getType(),new SpelValueObjectResolver());
+        RESOLVERS.put(ValueObjectTypeEnum.BASIC.getType(),new BasicTypeValueObjectResolver());
+        log.info("结束注册ValueObject解析器,加载内容:{},{}.",ValueObjectTypeEnum.SPEL.getType(),ValueObjectTypeEnum.BASIC.getType());
+    }
+
+}

+ 52 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/BusinessServiceEnums.java

@@ -0,0 +1,52 @@
+package com.hrsk.cloud.eg.domain.common.constant;
+
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: BusinessServiceEnums
+ * @date 2024/11/6 16:00
+ */
+@Getter
+public enum BusinessServiceEnums {
+
+    ACCESS_DENIED("100009","您没有当前操作权限!"),
+    CAPTCHA_NOT_MATCH("100008","验证码错误!"),
+    NOT_LOGIN("100007","尚未登录,请先登录!"),
+    OTP_NOT_MATCH("100006","验证码错误!"),
+    USER_PASSWORD_RETRY_LIMIT_EXCEED("100005","用户密码重试超过最大次数!"),
+    USER_HAS_DEACTIVATED("100004","用户已经被停用!"),
+    USER_HAS_DELETED("100003","用户已经被删除!"),
+    PASSWORD_NOT_MATCH("100002","用户名密码不匹配!"),
+    USER_NOT_FOUND("100001","用户不存在!"),
+    OK("000000","操作成功!"),
+    FAIL("-999999","操作失败!");
+
+
+    ;
+
+
+    private String code;
+    private String message;
+
+    static Map<String, BusinessServiceEnums> map = new HashMap();
+
+    static {
+        for (BusinessServiceEnums value : BusinessServiceEnums.values()) {
+            map.put(value.code, value);
+        }
+    }
+
+    BusinessServiceEnums(String number, String message) {
+        this.code = number;
+        this.message = message;
+    }
+
+    public static BusinessServiceEnums getByCode(String code) {
+        return map.get(code);
+    }
+}

+ 44 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/JoinMethodEnums.java

@@ -0,0 +1,44 @@
+package com.hrsk.cloud.eg.domain.common.constant;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Getter
+@AllArgsConstructor
+public enum JoinMethodEnums {
+
+    OPEN_API("1", "我方通用API"),
+    BUSI_API("2", "合作方CRM"),
+    CRM_EC("3", "三方CRM(ec)"),
+    CRM_QY("4", "三方CRM(庆鱼)"),
+    CRM_JD("5", "三方CRM(锦蝶)"),
+    CRM_RXK("6", "三方CRM(融享客)"),
+    CRM_XL("7", "三方CRM(鑫鹿)"),
+    CRM_QY_V2("8", "三方CRM(庆鱼2.0)"),
+    CRM_XKD("10", "三方CRM(享客达)"),
+    HUIRONG_CRM("9", "惠融易客CRM"),
+    CRM_QY_V3("11", "三方CRM(庆鱼3.0)"),
+    CRM_JDV3("12", "三方CRM(锦蝶V3)"),
+    OPEN_API_AES("13", "我方通用AES模式");
+
+
+    private String code;
+    private String message;
+
+    static Map<String, JoinMethodEnums> map = new HashMap();
+
+    static {
+        for (JoinMethodEnums value : JoinMethodEnums.values()) {
+            map.put(value.code, value);
+        }
+    }
+
+    public static JoinMethodEnums getByCode(String code) {
+        return map.get(code);
+    }
+
+
+}

+ 52 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/ResultCode.java

@@ -0,0 +1,52 @@
+package com.hrsk.cloud.eg.domain.common.constant;
+
+public enum ResultCode {
+    // 全局
+    NO_LOGIN(-10,"未登录","未登录"),
+    GLOBAL_REQUEST_OK(0,"请求成功标志","请求成功"),
+    GLOBAL_REQUEST_FAIL(1,"请求失败标志","请求失败"),
+    GLOBAL_PARAM_MISSING(6,"全局参数缺失","不能为空"),
+    GLOBAL_VERIFICATION_ERROR(7,"验证码错误","验证码错误"),
+    GLOBAL_NOT_LOGIN(-130,"未登录标志","请先登录"),
+    GLOBAL_MISS_TOKEN(-130,"token缺失","请先登录"),
+    INFO_DOCUMENT_LIST(300,"暂无素材信息","暂无素材信息"),
+    INFO_FQA_LIST(310,"暂无问答信息","暂无问答信息"),
+    INFO_MSG_LIST(320,"暂无消息信息","暂无消息信息"),
+    INFO_USERFEEDBACK_LIST(340,"暂无意见反馈信息","暂无意见反馈信息"),
+    INFO_APPVERSIONLOG_LIST(350,"暂无APP更新日志信息","暂无APP更新日志信息"),
+    INFO_APPVERSION_LIST(330,"暂无版本更新信息","暂无版本更新信息"),
+    THIRDSERVER_REQUEST_EXCEPTION(100,"第三方接口连接异常","第三方接口连接异常"),
+    THIRDSERVER_RESPONSE_EXCEPTION(100,"第三方接口返回数据异常","第三方接口返回数据异常"),
+    OTHER_DATATYPE_FAIL(94,"数据类错误","数据类型错误"),
+    SYSTEM_EXCEPTION(999,"系统异常,请稍后再试","系统异常,请稍后再试"),
+    GLOBAL_REAL_EXISTS(201,"身份证已经被实名","请求失败"),
+    GLOBAL_REAL_MISMATCH(202,"姓名与身份证号不匹配","请求失败"),
+    GLOBAL_REAL_SERVICE(203,"实名认证接口异常","请求失败"),
+    GLOBAL_REAL_LOCK(204,"密码错误超过三次","密码输出错误锁定5分钟,请稍后再试"),
+    GLOBAL_GO_VERIFYSMS_LOGIN(205,"短信验证登录","短信验证登录"),
+    GLOBAL_INTERFACE_LIMIT(206,"接口访问频繁","接口访问太过频繁,请稍后再试")
+    ;
+    private final int code;
+    private final String description;
+    private final String msg;
+
+    ResultCode(int code, String description, String msg) {
+        this.code = code;
+        this.description = description;
+        this.msg = msg;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+
+}

+ 195 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/ServerCodeEnums.java

@@ -0,0 +1,195 @@
+package com.hrsk.cloud.eg.domain.common.constant;
+
+import java.util.HashMap;
+import java.util.Map;
+/**
+ * @description:  对接平台枚举
+ * @param:
+ * @return:
+ * @author zhangyy
+ * @date: 2024/9/10 14:58
+ */
+public enum ServerCodeEnums {
+        Default("dc", "对接我方贷超"),
+        DefaultOne("dc_one", "对接我方贷超(只提供了1.3接口)"),
+        Djd("djd", "大金贷"),
+        Xdw("xdw", "寻单王"),
+        DianTuDai("dianTuDai", "电兔贷"),
+        Sj("sj", "商机"),
+        TgXinDai("tgXinDai", "甜瓜信贷app"),
+        DaLiQiangDan("daLiQiangDan", "大粒抢单"),
+        KuanJie("kuanjie", "款姐"),
+        NoApi("noApi", "无api对接产品"),
+        Ruifeng("ruifeng", "瑞丰"),
+        Huizhong("Huizhong", "惠众"),
+        YinHua("YinHua", "银华咨询"),
+        Huixin("Huixin", "汇鑫"),
+        DongFangRZ("DongFangRZ", "东方融资网"),
+        TuoBaoRong("TuoBaoRong", "拓宝荣"),
+        Huizhong01("Huizhong01", "惠众助贷"),
+        HengAi("HengAi", "恒爱致远"),
+        YuKuaiHua("YuKuaiHua", "愉快花"),
+        Rongxizi("Rongxizi", "荣西子"),
+        RongSheng("RongSheng", "荣晟"),
+        ChuanJin("ChuanJin", "川金"),
+        YiJie("YiJie", "易借"),
+        PingXun("PingXun", "平讯"),
+        Qingyu("Qingyu", "庆鱼"),
+        Jindie("Jindie", "锦蝶"),
+        Rongkedai("Rongkedai", "融客贷"),
+        Jiecheng("Jiecheng", "捷诚"),
+        Xinkedai("Xinkedai", "欣客贷"),
+        Yourong("Yourong", "有融"),
+        HouCheng("HouCheng", "厚诚"),
+        Hamigua("Hamigua", "哈密瓜"),
+
+        Haohanwuyin("Haohanwuyin", "灏瀚无崟"),
+        Gexinjinfu("Gexinjinfu", "格鑫金服"),
+        Xuzhoufuli("Xuzhoufuli", "徐州富丽"),
+        Kuaiyidai("Kuaiyidai", "快易贷"),
+        KuaiyidaiNight("KuaiyidaiNight", "快易贷夜间"),
+        KuaiyidaiFourToOne("KuaiyidaiFourToOne", "快易贷四选一"),
+        KuaiyidaiV2("KuaiyidaiV2", "快易贷尾量"),
+        Xinyidai("Xinyidai", "信易贷"),
+        Fangxinwang("Fangxinwang", "放心网"),
+        YiRong("YiRong", "壹融网"),
+
+        XiangRong("XiangRong", "宁波享融网"),
+        YiQiHua("YiQiHua", "一起花"),
+        DaXiangHuaBei("DaXiangHuaBei", "大象花呗"),
+
+        XveYiRong("XveYiRong","雪易融"),
+        SiChuangRui("SiChuangRui","思创瑞"),
+        //KuaiYiRong("KuaiYiRong","快易溶")
+        JiNingHR("JiNingHR","济宁惠融"),
+        HeZeRongXin("HeZeRongXin","菏泽融信"),
+        WFangYy("WFangYy","潍坊优易"),
+        ShanDongBangBangDai("ShanDongBangBangDai","山东帮帮代"),
+        GuangDongHaoEn("GuangDongHaoEn","广东昊恩"),
+        XiaMenYiJieZhuDai("XiaMenYiJieZhuDai","厦门易捷助代"),
+        DeZhouXinYiRong("DeZhouXinYiRong","德州鑫易融"),
+        ShenYangXinYiRong("ShenYangXinYiRong","沈阳信易融"),
+        RunMei("RunMei","润美"),
+        DeZhouXinYiRongV2("DeZhouXinYiRongV2","德州鑫易融V2"),
+        KunMingXiaoSongShu("KunMingXiaoSongShu","昆明小松鼠"),
+        NingBoTianCheng("NingBoTianCheng", "宁波天澄"),
+        XuzhoufuliV2("XuzhoufuliV2", "徐州富丽V2"),
+        ChongQingRuiShuangXin("ChongQingRuiShuangXin","重庆睿双鑫"),
+        AnHuiHengDao("AnHuiHengDao","安徽恒道"),
+        Suzhouchangshuo("Suzhouchangshuo", "苏州昌硕"),
+        ShanXiHengSheng("ShanXiHengSheng","山西恒昇"),
+        FuZhouBeiYinJinRong("FuZhouBeiYingJinRong","福州北银金融"),
+        RongXiangDaChangSha("RongXiangDaChangSha","融享达长沙"),
+        TianJingJiaYi("TianJingJiaYi","天津佳亿"),
+        WuHanDongYuan("WuHanDongYuan","武汉东远"),
+        KuaiYiRong("KuaiYiRong","快易融"),
+        YuRongFu("YuRongFu","宇融服"),
+        ZhongXinQiFu("ZhongXinQiFu","众鑫企服"),
+        BeiJingChongHe("BeiJingChongHe","北京重和"),
+        YangZhouWanKe("YangZhouWanKe","扬州万客"),
+        XiaoMeiYiRong("XiaoMeiYiRong","小美易融"),
+        HuNanDiShuiYan("HuNanDiShuiYan","湖南滴水岩"),
+        HeFeiShenDai("HeFeiShenDai","合肥盛代"),
+        YiRongWang("YiRongWang","忆融网"),
+        WenZhouYueShangXiang("WenZhouYueShangXiang","温州悦尚祥"),
+        TianShuiShuYiRong("TianShuiShuYiRong","天水速易融"),
+        ZhaoZhuangXinYiRong("ZhaoZhuangXinYiRong","枣庄信易融"),
+        GuanZhouPuHui("GuanZhouPuHui","广州普惠"),
+        WenZhouGaoShen("WenZhouGaoShen","温州高升"),
+        PingDingShan("PingDingShan","平顶山"),
+        ChengHongHui("ChengHongHui","晨宏汇"),
+        ShiYue("ShiYue","司跃"),
+        YunHaiLianDong("YunHaiLianDong","云海联动"),
+        YiLianRong("YiLianRong","易联融"),
+        RongXiangKeV2("RongXiangKeV2","融享客V2"),
+        SouYuJinFu("SouYuJinFu","授渔金服"),
+        YiZhanShiShuZhiPingTai("YiZhanShiShuZhiPingTai","一站式数字平台"),
+        MoGuTou("MoGuTou","蘑菇投"),
+        ShangHaiJuHuiRongCreditService("ShangHaiJuHuiRongCreditService","上海聚汇融"),
+        NanTongXingChengCreditService("NanTongXingChengCreditService","南通星辰"),
+        XinJiangWanHeCreditService("XinJiangWanHeCreditService","新疆万合"),
+        QingDaoBaiXinSHunTaiCreditService("QingDaoBaiXinSHunTaiCreditService","青岛佰信顺泰"),
+        FuCheng("FuCheng","福程"),
+        XingChi("XingChi","星驰"),
+        ShenYangHengXin("ShenYangHengXin","沈阳恒信"),
+        WuHanJingCheng("WuHanJingCheng","武汉锦城"),
+        ChongQinDongRunCreditService("ChongQinDongRunCreditService","重庆东润"),
+        JinDieV4CreditService("JinDieV4CreditService","锦蝶v4"),
+        JianZhan100("JianZhan100","建站100"),
+        ShangHaiHanGe("ShangHaiHanGe","上海晗各"),
+        ShuRong("ShuRong","速融"),
+        NiYouKe("NiYouKe","尼优客"),
+        JinZhuLiCreditService("JinZhuLiCreditService","金助理"),
+        YiBangDaiCreditService("YiBangDaiCreditService","壹帮贷"),
+        DeLuoXuan("DeLuoXuan","德诺轩"),
+        RongYiDa("RongYiDa","融易达"),
+        LianKeYunKong("LianKeYunKong","链客云控"),
+        DeLuoXuanAES("DeLuoXuanAES","德诺轩AES"),
+        RongChuangJinFu("RongChuangJinFu","融创金服"),
+        FuZhouBeiJiu("FuZhouBeiJiu","福州北久"),
+        BaiYiJinFu("BaiYiJinFu","佰亿金服"),
+        JiuXinKe("JiuXinKe","玖欣客"),
+        RongXiangKeBuShu("RongXiangKeBuShu","融享客部署模式"),
+        WeiFangHuaShenCreditService("WeiFangHuaShenCreditService","潍坊华盛"),
+        HongXinPuHui("HongXinPuHui","弘鑫普惠"),
+        ChengDuYiHeSheng("ChengDuYiHeSheng","成都亿禾生"),
+        CangZhouSuYiRong("CangZhouSuYiRong","沧州速易融"),
+        XinChuangYinHui("XinChuangYinHui","信创银辉"),
+        SuZhouJianYiRong("SuZhouJianYiRong","苏州简易融"),
+        QingDaoAoSen("QingDaoAoSen","青岛奥森"),
+        ShenLuoJinFu("ShenLuoJinFu","盛略金服"),
+        LeXiangRong("LeXiangRong","乐享融"),
+        ThangSanRongYang("ThangSanRongYang","唐山融扬"),
+        GuangZhouHuaXin("GuangZhouHuaXin","广州华鑫"),
+        ShanXiMingDePuHui("ShanXiMingDePuHui","陕西明德普惠"),
+        ChongQingYiYue("ChongQingYiYue","重庆易悦"),
+        QingDaoAoSenV2("QingDaoAoSenV2","青岛奥森V2"),
+        GuangDongHongZhan("GuangDongHongZhan","广东鸿展"),
+        FeiLongKe("FeiLongKe","飞隆客"),
+        HengYangJiuZhen("HengYangJiuZhen","衡阳玖臻"),
+        XingZheChangZhi("XingZheChangZhi","行者常至"),
+        HongShengJinFu("HongShengJinFu","弘盛金服"),
+        JiangXiCheYouRong("JiangXiCheYouRong","江西车优融"),
+
+
+        OPEN_API("1", "我方通用API"),
+        BUSI_API("2", "合作方CRM"),
+        CRM_EC("3", "三方CRM(ec)"),
+        CRM_QY("4", "三方CRM(庆鱼)"),
+        CRM_JD("5", "三方CRM(锦蝶)"),
+        CRM_RXK("6", "三方CRM(融享客)"),
+        CRM_XL("7", "三方CRM(鑫鹿)"),
+        CRM_QY_V2("8", "三方CRM(庆鱼2.0)"),
+        CRM_XKD("10", "三方CRM(享客达)"),
+        HUIRONG_CRM("9", "惠融易客CRM"),
+        CRM_QY_V3("11", "三方CRM(庆鱼3.0)"),
+        CRM_JDV3("12", "三方CRM(锦蝶V3)"),
+        NoCheck("NoCheck","不撞库通用"),
+        OPEN_API_AES("13", "我方通用AES模式");
+        ;
+
+        public String code;
+        public String msg;
+
+        ServerCodeEnums(String code, String msg) {
+            this.code = code;
+            this.msg = msg;
+        }
+
+        public String getCode() {
+            return code;
+        }
+
+        public String getMsg() {
+            return msg;
+        }
+
+
+        public static Map<String, ServerCodeEnums> map = new HashMap<>();
+
+        static {
+            for (ServerCodeEnums e : ServerCodeEnums.values()) {
+                map.put(e.code, e);
+            }
+        }
+    }

+ 45 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgApiTypeEnum.java

@@ -0,0 +1,45 @@
+package com.hrsk.cloud.eg.domain.common.constant.egress;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: EgApiTypeEnum
+ * @date 2024/9/23 13:58
+ */
+@Getter
+@AllArgsConstructor
+public enum EgApiTypeEnum {
+    LOAN_API("LOAN_API","助贷api"),
+    INTERBANK_API("INTERBANK_API","同业api"),
+    FAST_LOAN("FAST_LOAN","极速贷api")
+
+    ;
+    static Map<String, EgApiTypeEnum> map = new HashMap();
+
+    static {
+        for (EgApiTypeEnum value : EgApiTypeEnum.values()) {
+            map.put(value.code, value);
+        }
+    }
+
+    public static EgApiTypeEnum getByCode(String code) {
+        return map.get(code);
+    }
+    private String code;
+
+    private String msg;
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+}

+ 44 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgRouteTypeEnum.java

@@ -0,0 +1,44 @@
+package com.hrsk.cloud.eg.domain.common.constant.egress;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: EgApiTypeEnum
+ * @date 2024/9/23 13:58
+ */
+@Getter
+@AllArgsConstructor
+public enum EgRouteTypeEnum {
+    CHECK_INTO("CHECK_INTO","准入"),
+    APPLY("APPLY","注册"),
+
+    ;
+    static Map<String, EgRouteTypeEnum> map = new HashMap();
+
+    static {
+        for (EgRouteTypeEnum value : EgRouteTypeEnum.values()) {
+            map.put(value.code, value);
+        }
+    }
+
+    public static EgRouteTypeEnum getByCode(String code) {
+        return map.get(code);
+    }
+    private String code;
+
+    private String msg;
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+}

+ 32 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgressApiEndpointIntegrationModeEnum.java

@@ -0,0 +1,32 @@
+package com.hrsk.cloud.eg.domain.common.constant.egress;
+
+import lombok.Getter;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-11-04 10:43
+ * @description: 通道接出方式
+ **/
+@Getter
+public enum EgressApiEndpointIntegrationModeEnum {
+    CUSTOMIZE("customize","自定义代码模式"),
+    GUIDE("guide","向导模式");
+    /**
+     * 编码
+     */
+    private String code;
+    /**
+     * 描述
+     */
+    private String desc;
+
+    /**
+     * 构造函数
+     * @param code
+     * @param desc
+     */
+    EgressApiEndpointIntegrationModeEnum(String code, String desc) {
+        this.code = code;
+        this.desc = desc;
+    }
+}

+ 34 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/constant/egress/EgressApiStatusEnum.java

@@ -0,0 +1,34 @@
+package com.hrsk.cloud.eg.domain.common.constant.egress;
+
+import lombok.Getter;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-10-22 10:49
+ * @description: 接出API状态枚举
+ **/
+@Getter
+public enum EgressApiStatusEnum {
+    DRAFT("draft","草稿"),
+    OK("ok","启用"),
+    DEACTIVATE("deactivate","停用"),
+    DELETE("delete","删除");
+    /**
+     * 编码
+     */
+    private String code;
+    /**
+     * 描述
+     */
+    private String desc;
+
+    /**
+     * 构造函数
+     * @param code 编码
+     * @param desc 描述
+     */
+    EgressApiStatusEnum(String code, String desc) {
+        this.code = code;
+        this.desc = desc;
+    }
+}

+ 36 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/utils/BizPreconditions.java

@@ -0,0 +1,36 @@
+package com.hrsk.cloud.eg.domain.common.utils;
+
+
+import com.hrsk.pangu.tool.exception.BizException;
+/**
+ * @author: bianlanzhou
+ * @create: 2024-07-27 10:04
+ * @description: FROM GUAVA PRECONDITION,BIZ业务校验
+ **/
+public class BizPreconditions {
+    /**
+     * 验证参数
+     * @param expression 表达式
+     * @param errorMessage 错误信息
+     */
+    public static void checkArgument(boolean expression,  String errorMessage) {
+        if (!expression) {
+            throw new BizException(errorMessage);
+        }
+    }
+
+    /**
+     * 验证不为空
+     * @param reference 入参
+     * @param errorMessage 错误信息
+     * @return T
+     * @param <T> T
+     */
+    public static <T> T checkNotNull( T reference,  String errorMessage) {
+        if (reference == null) {
+            throw new BizException(errorMessage);
+        } else {
+            return reference;
+        }
+    }
+}

+ 24 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/common/utils/GsonUtils.java

@@ -0,0 +1,24 @@
+package com.hrsk.cloud.eg.domain.common.utils;
+
+import com.google.gson.Gson;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-01 16:58
+ * @description: Gson工具类
+ **/
+public class GsonUtils {
+    /**
+     * gson
+     */
+    public static final Gson GSON = new Gson();
+
+    /**
+     * 转换JSON
+     * @return 实体
+     * @param <T> 范型
+     */
+    public static  <T> T fromJson(String json,Class<T> classz){
+        return GSON.fromJson(json,classz);
+    }
+}

+ 0 - 3
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/package-info.java

@@ -1,3 +0,0 @@
-package com.hrsk.cloud.eg.domain;
-
-xx

+ 30 - 10
egress-gateway-service-infrastructure/pom.xml

@@ -4,7 +4,7 @@
     <parent>
         <groupId>com.hrsk.cloud</groupId>
         <artifactId>egress-gateway-service</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0</version>
     </parent>
 
     <artifactId>egress-gateway-service-infrastructure</artifactId>
@@ -16,31 +16,51 @@
     </properties>
 
     <dependencies>
+
         <dependency>
             <groupId>com.hrsk.cloud</groupId>
             <artifactId>egress-gateway-service-domain</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.hrsk.cloud</groupId>
-            <artifactId>egress-gateway-service-client</artifactId>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.mybatis.spring.boot</groupId>
-            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
         </dependency>
         <dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+            <version>${hessian.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-            <scope>runtime</scope>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
         </dependency>
     </dependencies>
 </project>

+ 53 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/MyMetaObjectHandler.java

@@ -0,0 +1,53 @@
+package com.hrsk.cloud.eg.infrastructure.config;
+
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.hrsk.cloud.eg.clinet.constant.GlobalDataStatusEnum;
+import com.hrsk.cloud.eg.infrastructure.utils.SnowflakeIdWorker;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.BaseDo;
+import org.apache.ibatis.reflection.MetaObject;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * @description: mybatis 默认meta数据填充
+ * @author zhangyy
+ * @date: 2024/8/28 14:30
+ */
+@Component
+public class MyMetaObjectHandler implements MetaObjectHandler {
+    @Override
+    public void insertFill(MetaObject metaObject) {
+//        注释的这种方式只是填充了id和状态
+     //this.strictInsertFill(metaObject,"create_uid",String.class, String.valueOf(SnowflakeIdWorker.nextId()));
+        try {
+            //时间格式的时候不能填充所以使用了这种方式。
+            BaseDo baseDO = (BaseDo) metaObject.getOriginalObject();
+            // 插入操作时的自动填充逻辑
+            if (Objects.isNull(baseDO.getId())) {
+                baseDO.setId(SnowflakeIdWorker.nextId());
+            }
+            baseDO.setStatus(GlobalDataStatusEnum.YES.getCode());
+            baseDO.setGmtModify(new Date());
+            baseDO.setGmtCreate(new Date());
+            baseDO.setModifyUsername("");
+            baseDO.setCreateUsername("");
+//            baseDO.setCreateUid(String.valueOf(baseDO.getId()));
+        } catch (Exception e) {
+            //不处理
+        }
+    }
+
+    @Override
+    public void updateFill(MetaObject metaObject) {
+        // 更新操作时的自动填充逻辑
+        try {
+            BaseDo baseDo = (BaseDo) metaObject.getOriginalObject();
+            baseDo.setGmtModify(new Date());
+        } catch (Exception e) {
+            //不处理
+        }
+    }
+
+}

+ 5 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/DiamondConfig.java

@@ -0,0 +1,5 @@
+package com.hrsk.cloud.eg.infrastructure.config.client;
+
+public class DiamondConfig {
+    public final static String DummyConfig = "DummyConfig";
+}

+ 114 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HessianUtils.java

@@ -0,0 +1,114 @@
+package com.hrsk.cloud.eg.infrastructure.config.client;
+
+import com.alibaba.cola.exception.SysException;
+import com.caucho.hessian.io.Hessian2Input;
+import com.caucho.hessian.io.Hessian2Output;
+import com.google.common.collect.Lists;
+import com.hrsk.cloud.eg.domain.api.FunctionObject;
+import com.hrsk.cloud.eg.domain.api.HttpApiConfig;
+import com.hrsk.cloud.eg.domain.api.KeyValueObject;
+import com.hrsk.cloud.eg.domain.api.ValueObject;
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-02 08:43
+ * @description: hessian工具类
+ **/
+@Slf4j
+public class HessianUtils {
+    public static byte[] serialize(Object object){
+        Hessian2Output ho = null;
+        try{
+            ByteArrayOutputStream bos = new ByteArrayOutputStream();
+            ho = new Hessian2Output(bos);
+            ho.writeObject(object);
+            ho.flush();
+            return bos.toByteArray();
+        } catch (IOException e) {
+            log.error("序列化对象异常!",e);
+            throw new SysException("序列化对象异常!",e);
+        }finally {
+            if(ho !=null){
+                try {
+                    ho.close();
+                } catch (IOException e) {
+                    log.error("序列化流关闭失败!",e);
+                }
+            }
+        }
+    }
+
+    /** Hessian反序列化 */
+    public static Object deserialize(byte[] bytes){
+        Hessian2Input hi = null;
+        try{
+            ByteArrayInputStream is = new ByteArrayInputStream(bytes);
+            hi = new Hessian2Input(is);
+            return hi.readObject();
+        }catch (Exception e){
+            log.error("反序列化对象异常!",e);
+            throw new SysException("反序列化对象异常!",e);
+        }finally {
+            if(hi !=null){
+                try {
+                    hi.close();
+                } catch (IOException e) {
+                    log.error("序列化流关闭失败!",e);
+                }
+            }
+        }
+    }
+
+    /**
+     * @description:  测试方法
+     * @author zhangyy
+     * @date 2024/8/27 10:14
+     * @version 1.0
+     */
+    public static void main(String[] args) {
+        FunctionObject md5 = new FunctionObject();
+        md5.setCode("md5");
+        HttpApiConfig hac = new HttpApiConfig()
+                .setUrl("https://baidu.com");
+        hac.setType("http");
+        List<KeyValueObject> h = Lists.newArrayList();
+        KeyValueObject h1 = new KeyValueObject();
+        h1.setKey("secretKey");
+        h1.setType("text");
+        h1.setValue("Khw99%$l%-2gF7P4jXglp_-jQqQirtYnOY5D");
+        h.add(h1);
+        KeyValueObject h2 = new KeyValueObject();
+        h2.setKey("merchantNo");
+        h2.setType("spel");
+        h2.setValue("#input.merchantNo");
+        h.add(h2);
+        List<ValueObject> p = Lists.newArrayList();
+        ValueObject p1 = new ValueObject();
+        p1.setType("text");
+        p1.setValue("123");
+        ValueObject p2 = new ValueObject();
+        p2.setType("text");
+        p2.setValue("456");
+        p2.getFunctions().add(md5);
+        p.add(p1);
+        p.add(p2);
+        List<KeyValueObject> s = Lists.newArrayList();
+        KeyValueObject s1 = new KeyValueObject();
+        s1.setKey("username");
+        s1.setType("spel");
+        s1.setValue("#input.username");
+        KeyValueObject s2 = new KeyValueObject();
+        s2.setKey("channel");
+        s2.setType("spel");
+        s2.setValue("#input.channel");
+        s.add(s2);
+        hac.setPath(p).setSearch(s).setHeader(h).setMethod("GET");
+        hac.setContent("{\"merchant\":\"xxxxxxfffff\",\"phone\":\"#{\\\"value\\\":\\\"#input.phone\\\",\\\"type\\\": \\\"spel\\\",\\\"functions\\\":[ {\\\"code\\\": \\\"md5\\\"}]}\"}");
+    }
+}

+ 52 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/HttpTemPlateClient.java

@@ -0,0 +1,52 @@
+package com.hrsk.cloud.eg.infrastructure.config.client;
+
+import com.hrsk.cloud.eg.domain.api.HttpApi;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+
+import javax.annotation.Resource;
+import java.util.Map;
+import java.util.Objects;
+/**
+ * @author: bianlanzhou
+ * @create: 2024-08-02 17:08
+ * @description: http请求客户端
+ **/
+@Slf4j
+@Component
+public class HttpTemPlateClient {
+    @Resource
+    private RetryRestTemplate httpRestTemplate;
+    /**
+     * 请求
+     * @param httpApi http api对象
+     * @return 响应数据
+     */
+    public Object request(HttpApi httpApi){
+        ResponseEntity<String> responseEntity = null;
+        //补充headers
+        MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
+        if(!httpApi.getHeader().isEmpty()){
+          Map<String,Object> orgMap=httpApi.getHeader();
+            for (String key : orgMap.keySet()) {
+                headers.add(key, orgMap.get(key).toString());
+            }
+        }
+        try {
+            responseEntity = httpRestTemplate.restTemplate().exchange(httpApi.getUrl(),
+                    Objects.requireNonNull(HttpMethod.resolve(httpApi.getMethod())),
+                    new HttpEntity<>(httpApi.getPayload(),new HttpHeaders(headers))
+                    ,
+                    String.class);
+        } catch (Exception e) {
+            log.error("请求异常,请求数据:[{}].", httpApi.toString() ,e);
+        }
+        return responseEntity ==null?null:responseEntity.getBody();
+    }
+}

+ 69 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/RetryRequestConfig.java

@@ -0,0 +1,69 @@
+package com.hrsk.cloud.eg.infrastructure.config.client;
+
+/**
+ * Author: zhangyy
+ * Date: 2019/3/20
+ * Description:
+ */
+public class RetryRequestConfig {
+    //http请求timeout时的重试次数
+    int retryCount = 0;
+    //http请求timeout,重试间隔时间,重试间隔时间=次数*100 ms.
+    long retryIntervalTime = 0;
+    //连接池连接数量
+    int connectMaxTotal = 75;
+    //连接超时时间
+    int connectTimeout = 3000;
+    // 数据读取超时时间,即SocketTimeout
+    int readTimeout = 3000;
+    // 连接不够用的等待时间,不宜过长,必须设置,比如连接不够用时,时间过长将是灾难性的
+    int ConnectionRequestTimeout = 2000;
+
+    public int getRetryCount() {
+        return retryCount;
+    }
+
+    public void setRetryCount(int retryCount) {
+        this.retryCount = retryCount;
+    }
+
+    public long getRetryIntervalTime() {
+        return retryIntervalTime;
+    }
+
+    public void setRetryIntervalTime(long retryIntervalTime) {
+        this.retryIntervalTime = retryIntervalTime;
+    }
+
+    public int getConnectMaxTotal() {
+        return connectMaxTotal;
+    }
+
+    public void setConnectMaxTotal(int connectMaxTotal) {
+        this.connectMaxTotal = connectMaxTotal;
+    }
+
+    public int getConnectTimeout() {
+        return connectTimeout;
+    }
+
+    public void setConnectTimeout(int connectTimeout) {
+        this.connectTimeout = connectTimeout;
+    }
+
+    public int getReadTimeout() {
+        return readTimeout;
+    }
+
+    public void setReadTimeout(int readTimeout) {
+        this.readTimeout = readTimeout;
+    }
+
+    public int getConnectionRequestTimeout() {
+        return ConnectionRequestTimeout;
+    }
+
+    public void setConnectionRequestTimeout(int connectionRequestTimeout) {
+        ConnectionRequestTimeout = connectionRequestTimeout;
+    }
+}

+ 111 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/client/RetryRestTemplate.java

@@ -0,0 +1,111 @@
+package com.hrsk.cloud.eg.infrastructure.config.client;
+
+import org.apache.http.HttpEntityEnclosingRequest;
+import org.apache.http.NoHttpResponseException;
+import org.apache.http.client.HttpRequestRetryHandler;
+import org.apache.http.client.protocol.HttpClientContext;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.protocol.HttpContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.web.client.RestTemplate;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Author: zhangyy
+ * Date: 2019/3/20
+ * Description:
+ */
+@Configuration
+public class RetryRestTemplate {
+    private RetryRequestConfig requestConfig = new RetryRequestConfig();
+
+    public RetryRestTemplate(RetryRequestConfig requestConfig) {
+        this.requestConfig = requestConfig;
+    }
+
+    public RetryRestTemplate() {
+    }
+
+    @Bean
+    public RestTemplate restTemplate(){
+        RestTemplate restTemplate = new RestTemplate();
+        //1.用UTF-8 StringHttpMessageConverter替换默认StringHttpMessageConverter
+        List<HttpMessageConverter<?>> newMessageConverters = new ArrayList<>();
+        for(HttpMessageConverter<?> converter : restTemplate.getMessageConverters()){
+            if(converter instanceof StringHttpMessageConverter){
+                StringHttpMessageConverter messageConverter = new StringHttpMessageConverter(StandardCharsets.UTF_8);
+                newMessageConverters.add(messageConverter);
+            }else {
+                newMessageConverters.add(converter);
+            }
+        }
+        restTemplate.setMessageConverters(newMessageConverters);
+
+
+        //2. retryHandler add
+        HttpClientBuilder httpClientBuilder = HttpClients.custom();
+        HttpRequestRetryHandler handler = new HttpRequestRetryHandler() {
+            @Override
+            public boolean retryRequest(IOException exception, int curRetryCount, HttpContext context) {
+                if (exception instanceof ConnectTimeoutException
+                        || exception instanceof NoHttpResponseException || exception instanceof ConnectException) {
+                    // 报错不需要重试
+                    return false;
+                }
+
+                HttpClientContext clientContext = HttpClientContext.adapt(context);
+                org.apache.http.HttpRequest request = clientContext.getRequest();
+                boolean idempotent = !(request instanceof HttpEntityEnclosingRequest);
+                // 如果请求被认为是幂等的,那么就重试。即重复执行不影响程序其他效果的
+                return idempotent;
+            }
+        };
+
+        // 3.支持HTTP、HTTPS
+        Registry<ConnectionSocketFactory> registry = RegistryBuilder.<ConnectionSocketFactory> create()
+                .register("http", PlainConnectionSocketFactory.getSocketFactory())
+                .register("https", SSLConnectionSocketFactory.getSocketFactory())
+                .build();
+        PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);
+        connectionManager.setMaxTotal(this.requestConfig.getConnectMaxTotal());
+        connectionManager.setDefaultMaxPerRoute(100);
+        connectionManager.setValidateAfterInactivity(2000);
+
+        httpClientBuilder.setRetryHandler(handler)
+                            .setConnectionManager(connectionManager);
+
+        CloseableHttpClient httpClient = httpClientBuilder.build();
+
+        // httpClient连接配置,底层是配置RequestConfig
+        HttpComponentsClientHttpRequestFactory clientHttpRequestFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
+        // 连接超时
+        clientHttpRequestFactory.setConnectTimeout(this.requestConfig.getConnectTimeout());
+        // 数据读取超时时间,即SocketTimeout
+        clientHttpRequestFactory.setReadTimeout(this.requestConfig.getReadTimeout());
+        // 连接不够用的等待时间,不宜过长,必须设置,比如连接不够用时,时间过长将是灾难性的
+        clientHttpRequestFactory.setConnectionRequestTimeout(this.requestConfig.getConnectionRequestTimeout());
+        // 缓冲请求数据,默认值是true。通过POST或者PUT大量发送数据时,建议将此属性更改为false,以免耗尽内存。
+        // clientHttpRequestFactory.setBufferRequestBody(false);
+        restTemplate.setRequestFactory(clientHttpRequestFactory);
+        return restTemplate;
+    }
+
+}

+ 63 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/FastJson2RedisSerializer.java

@@ -0,0 +1,63 @@
+package com.hrsk.cloud.eg.infrastructure.config.redis;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONReader;
+import com.alibaba.fastjson2.JSONWriter;
+import com.alibaba.fastjson2.filter.Filter;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.SerializationException;
+import org.springframework.data.redis.serializer.RedisSerializer;
+
+import java.util.Objects;
+
+/**
+ * @description:  fast2 json 格式化默认和web-api 保持一致
+ * @param:
+ * @return:
+ * @author zhangyy
+ * @date: 2024/9/19 14:09
+ */
+@Slf4j
+public class FastJson2RedisSerializer<T> implements RedisSerializer<T> {
+
+    static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(
+            // 按需加上需要支持自动类型的类名前缀,范围越小越安全
+            "com.***.***"
+    );
+
+    private final Class<T> clazz;
+
+    public FastJson2RedisSerializer(Class<T> clazz) {
+        super();
+        this.clazz = clazz;
+    }
+
+    @Override
+    public byte[] serialize(T t) throws SerializationException {
+        if (Objects.isNull(t)) {
+            return new byte[0];
+        }
+        try {
+            return JSON.toJSONBytes(t, JSONWriter.Feature.WriteClassName);
+        } catch (Exception e) {
+            log.error("Fastjson2 序列化错误:{}", e.getMessage());
+            throw new SerializationException("无法序列化: " + e.getMessage(), e);
+        }
+
+    }
+
+    @Override
+    public T deserialize(byte[] bytes) throws SerializationException {
+        if (ArrayUtils.isEmpty(bytes)) {
+            return null;
+        }
+        try {
+            return JSON.parseObject(bytes, clazz, AUTO_TYPE_FILTER);
+        } catch (Exception e) {
+            log.error("Fastjson2 反序列化错误:{}", e.getMessage());
+            throw new SerializationException("无法反序列化: " + e.getMessage(), e);
+        }
+
+    }
+}

+ 33 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/config/redis/PrefixRedisSerializer.java

@@ -0,0 +1,33 @@
+package com.hrsk.cloud.eg.infrastructure.config.redis;
+
+
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+/**
+ * @author zhangyy
+ * @version 1.0
+ * @description: PrefixRedisSerializer
+ * @date 2024/9/10 13:50
+ */
+public class PrefixRedisSerializer extends StringRedisSerializer {
+    public static final String DEFUAL_PREFIX = "eg:";
+    @Override
+    public byte[] serialize(String s) {
+        if (s == null) {
+            return null;
+        }
+        // 这里加上你需要加上的key前缀
+        String realKey = DEFUAL_PREFIX + s;
+        return super.serialize(realKey);
+    }
+    @Override
+    public String deserialize(byte[] bytes) {
+        String s = bytes == null ? null : new String(bytes);
+        int index = s.indexOf(DEFUAL_PREFIX);
+        if (index != -1) {
+            return s.substring(index + 2);
+        }
+        return s;
+    }
+
+}

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