Ver Fonte

add API决策

GITZYY há 7 meses atrás
pai
commit
88e637de89

+ 3 - 8
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/threedocking/impl/HuirongCrmCreditService.java

@@ -14,8 +14,6 @@ import com.hrsk.cloud.eg.vo.response.DataVo;
 import lombok.Data;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.http.HttpResponse;
-import org.apache.http.util.EntityUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
@@ -73,9 +71,7 @@ public class HuirongCrmCreditService implements LoanDockingApi {
             }
             }
 
 
             checkData.setSecretKey(huirongJointDTO.getString("secretKey"));
             checkData.setSecretKey(huirongJointDTO.getString("secretKey"));
-            checkData.setChanelCode(huirongJointDTO.getString("chanelCode"));
-            checkData.setMerchantNo(product.getBid());
-
+            checkData.setChanelCode(huirongJointDTO.getString("channelCode"));
             checkData.setMerchantNo(product.getBid());
             checkData.setMerchantNo(product.getBid());
             String requestJson = JSON.toJSONString(checkData);
             String requestJson = JSON.toJSONString(checkData);
             log.info("credit qualityCheck HuirongCrmCreditService request userId:{}, url:{},requestParam:{}", userInfo.getUserId(), url, requestJson);
             log.info("credit qualityCheck HuirongCrmCreditService request userId:{}, url:{},requestParam:{}", userInfo.getUserId(), url, requestJson);
@@ -83,9 +79,8 @@ public class HuirongCrmCreditService implements LoanDockingApi {
             try {
             try {
                 Map<String, String> head = new HashMap<>();
                 Map<String, String> head = new HashMap<>();
                 head.put("Content-Type", "application/json");
                 head.put("Content-Type", "application/json");
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, requestJson);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr, ResultHt.class);
+                response = httpRestTemplate.restTemplate().postForObject(url,head,ResultHt.class, checkData);
+              log.info("hui ron result {}",JSONObject.toJSONString(response));
             } catch (Exception e) {
             } catch (Exception e) {
                 log.error("惠融crm准入异常,异常信息:{}", e.getMessage(), e);
                 log.error("惠融crm准入异常,异常信息:{}", e.getMessage(), e);
             }
             }

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

@@ -7,7 +7,7 @@ package com.hrsk.cloud.eg.infrastructure.config.client.config;
  */
  */
 public class RetryRequestConfig {
 public class RetryRequestConfig {
     //http请求timeout时的重试次数
     //http请求timeout时的重试次数
-    int retryCount = 0;
+    int retryCount = 1;
     //http请求timeout,重试间隔时间,重试间隔时间=次数*100 ms.
     //http请求timeout,重试间隔时间,重试间隔时间=次数*100 ms.
     long retryIntervalTime = 0;
     long retryIntervalTime = 0;
     //连接池连接数量
     //连接池连接数量

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

@@ -69,7 +69,8 @@ public class RetryRestTemplate {
             public boolean retryRequest(IOException exception, int curRetryCount, HttpContext context) {
             public boolean retryRequest(IOException exception, int curRetryCount, HttpContext context) {
                 if (exception instanceof ConnectTimeoutException
                 if (exception instanceof ConnectTimeoutException
                         || exception instanceof NoHttpResponseException || exception instanceof ConnectException) {
                         || exception instanceof NoHttpResponseException || exception instanceof ConnectException) {
-                    return true;
+                    // 报错不需要重试
+                    return false;
                 }
                 }
 
 
                 HttpClientContext clientContext = HttpClientContext.adapt(context);
                 HttpClientContext clientContext = HttpClientContext.adapt(context);

+ 1 - 1
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/repository/database/entity/ProductBusinessApiInfoDo.java

@@ -15,7 +15,7 @@ import java.util.Date;
  */
  */
 @Data
 @Data
 @Accessors(chain = true)
 @Accessors(chain = true)
-@TableName("product_business_api_info")
+@TableName("product_business_api_info_v2")
 public class ProductBusinessApiInfoDo implements Serializable {
 public class ProductBusinessApiInfoDo implements Serializable {
 
 
     private Integer id;
     private Integer id;

+ 9 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/service/ProductBusinessApiInfoService.java

@@ -35,5 +35,14 @@ public interface ProductBusinessApiInfoService extends IService<ProductBusinessA
      * @return
      * @return
      */
      */
     ProductBusinessApiInfoDo getApiInfoByRedis(Integer apiId);
     ProductBusinessApiInfoDo getApiInfoByRedis(Integer apiId);
+
+    /**
+     * @description:  查询api集合
+     * @param:
+     * @return:
+     * @author zhangyy
+     * @date: 2024/9/13 10:23
+     */
+    List<ProductBusinessApiInfoDo> apiList();
 }
 }
 
 

+ 12 - 0
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/service/impl/ProductBusinessApiInfoServiceImpl.java

@@ -69,4 +69,16 @@ public class ProductBusinessApiInfoServiceImpl extends ServiceImpl<ProductBusine
         }
         }
         return JSONObject.parseObject((String) value, ProductBusinessApiInfoDo.class);
         return JSONObject.parseObject((String) value, ProductBusinessApiInfoDo.class);
     }
     }
+
+    @Override
+    public List<ProductBusinessApiInfoDo> apiList() {
+        LambdaQueryWrapper<ProductBusinessApiInfoDo> queryWrapper=new LambdaQueryWrapper<>();
+        queryWrapper.isNotNull(ProductBusinessApiInfoDo::getJointType);
+        queryWrapper.orderByDesc(ProductBusinessApiInfoDo::getCreateTime);
+        List<ProductBusinessApiInfoDo> productBusinessApiInfoDos = baseMapper.selectList(new LambdaQueryWrapper<>());
+        if (CollectionUtils.isEmpty(productBusinessApiInfoDos)) {
+            return Collections.emptyList();
+        }
+        return productBusinessApiInfoDos;
+    }
 }
 }

+ 2 - 3
start/src/main/resources/application-pre.yaml

@@ -21,7 +21,6 @@ spring:
       maxOpenPreparedStatements: 20
       maxOpenPreparedStatements: 20
       logSlowSql: true
       logSlowSql: true
   redis:
   redis:
-
     database: 8
     database: 8
     host: 47.96.139.31
     host: 47.96.139.31
     port: 6380
     port: 6380
@@ -31,8 +30,8 @@ spring:
         min-idle: 50
         min-idle: 50
         max-idle: 50
         max-idle: 50
         max-active: 100
         max-active: 100
-        max-wait: -1
-    timeout: 500
+        max-wait: 3000s
+    timeout: 5000s
 
 
 
 
 
 

+ 5 - 0
start/src/test/java/RedisTest.java

@@ -15,6 +15,8 @@ import org.springframework.test.context.junit4.SpringRunner;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 
 
+import static com.hrsk.cloud.eg.infrastructure.constant.RedisConstant.BUSINESS_API_KEY;
+
 /**
 /**
  * @author zhangyy
  * @author zhangyy
  * @version 1.0
  * @version 1.0
@@ -37,6 +39,9 @@ public class RedisTest {
     @Test
     @Test
     public void getRedisUtil(){
     public void getRedisUtil(){
         System.out.println(redisUtil.get("key1"));
         System.out.println(redisUtil.get("key1"));
+        String key = String.format(BUSINESS_API_KEY, 1);
+        Object value = redisUtil.get(key);
+        System.out.println(value);
     }
     }
 }
 }
 
 

+ 65 - 34
start/src/test/java/StartApiTest.java

@@ -1,9 +1,11 @@
 import com.hrsk.cloud.eg.Application;
 import com.hrsk.cloud.eg.Application;
+import com.hrsk.cloud.eg.app.business.ApiRouteService;
 import com.hrsk.cloud.eg.domain.api.ApiGateway;
 import com.hrsk.cloud.eg.domain.api.ApiGateway;
 import com.hrsk.cloud.eg.dto.data.CheckIntoParamDto;
 import com.hrsk.cloud.eg.dto.data.CheckIntoParamDto;
 import com.hrsk.cloud.eg.dto.data.egPlan.PlanDto;
 import com.hrsk.cloud.eg.dto.data.egPlan.PlanDto;
 import com.hrsk.cloud.eg.dto.data.user.UserInBaseInfoDto;
 import com.hrsk.cloud.eg.dto.data.user.UserInBaseInfoDto;
 import com.hrsk.cloud.eg.app.business.GenerateCheckIntoHttpApiConfigService;
 import com.hrsk.cloud.eg.app.business.GenerateCheckIntoHttpApiConfigService;
+import com.hrsk.cloud.eg.infrastructure.repository.database.entity.ProductBusinessApiInfoDo;
 import com.hrsk.cloud.eg.infrastructure.service.EgApiEndpointService;
 import com.hrsk.cloud.eg.infrastructure.service.EgApiEndpointService;
 import com.hrsk.cloud.eg.infrastructure.service.ProductBusinessApiInfoService;
 import com.hrsk.cloud.eg.infrastructure.service.ProductBusinessApiInfoService;
 import org.junit.Test;
 import org.junit.Test;
@@ -19,6 +21,8 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 
 /**
 /**
  * @author zhangyy
  * @author zhangyy
@@ -42,13 +46,16 @@ public class StartApiTest {
     @Resource
     @Resource
     private ApiGateway apiGateway;
     private ApiGateway apiGateway;
 
 
+    @Resource
+    private ApiRouteService apiRouteService;
+
     @Test
     @Test
     public void apiHuiRonTest(){
     public void apiHuiRonTest(){
-      Long apiId= 441293753667392L;
+//      Integer apiId= 441293753667392;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -59,12 +66,12 @@ public class StartApiTest {
 
 
     @Test
     @Test
     public void openApiRsaTest(){
     public void openApiRsaTest(){
-        Long apiId= 441312253769280L;
+//        Long apiId= 441312253769280L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -81,12 +88,12 @@ public class StartApiTest {
      */ 
      */ 
     @Test
     @Test
     public void qinYuApiRsaTest(){
     public void qinYuApiRsaTest(){
-        Long apiId= 441333216126016L;
+//        Long apiId= 441333216126016L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -103,12 +110,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void xinLuApiRsaTest(){
     public void xinLuApiRsaTest(){
-        Long apiId= 441336439865408L;
+//        Long apiId= 441336439865408L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -125,12 +132,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void xkdApiRsaTest(){
     public void xkdApiRsaTest(){
-        Long apiId= 441336439865408L;
+//        Long apiId= 441336439865408L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -147,12 +154,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void jinDieApiRsaTest(){
     public void jinDieApiRsaTest(){
-        Long apiId= 441425735573312L;
+//        Long apiId= 441425735573312L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -170,12 +177,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void rxkApiTest(){
     public void rxkApiTest(){
-        Long apiId= 441338278858304L;
+//        Long apiId= 441338278858304L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -193,12 +200,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void huiZhonApiTest(){
     public void huiZhonApiTest(){
-        Long apiId= 441421777748032L;
+//        Long apiId= 441421777748032L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -215,12 +222,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void huiZhongApiTest(){
     public void huiZhongApiTest(){
-        Long apiId= 441425580433728L;
+//        Long apiId= 441425580433728L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -237,12 +244,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void yinHuaApiTest(){
     public void yinHuaApiTest(){
-        Long apiId= 441425513479232L;
+//        Long apiId= 441425513479232L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -259,12 +266,12 @@ public class StartApiTest {
      */
      */
     @Test
     @Test
     public void huiXinApiTest(){
     public void huiXinApiTest(){
-        Long apiId= 441424531642944L;
+//        Long apiId= 441424531642944L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -275,12 +282,12 @@ public class StartApiTest {
 
 
     @Test
     @Test
     public void yuKuaiHuaApiTest(){
     public void yuKuaiHuaApiTest(){
-        Long apiId= 441424861741888L;
+//        Long apiId= 441424861741888L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -290,12 +297,12 @@ public class StartApiTest {
 
 
     @Test
     @Test
     public void youRonApiTest(){
     public void youRonApiTest(){
-        Long apiId= 441426447379776L;
+//        Long apiId= 441426447379776L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -305,12 +312,12 @@ public class StartApiTest {
 
 
     @Test
     @Test
     public void HamiguaApiTest(){
     public void HamiguaApiTest(){
-        Long apiId= 441426784657728L;
+//        Long apiId= 441426784657728L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -320,12 +327,12 @@ public class StartApiTest {
 
 
     @Test
     @Test
     public void haohanwuyinApiTest(){
     public void haohanwuyinApiTest(){
-        Long apiId= 441427018106688L;
+//        Long apiId= 441427018106688L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -335,12 +342,12 @@ public class StartApiTest {
 
 
     @Test
     @Test
     public void gexinjinfuApiTest(){
     public void gexinjinfuApiTest(){
-        Long apiId= 441427703907136L;
+//        Long apiId= 441427703907136L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -350,12 +357,12 @@ public class StartApiTest {
 
 
     @Test
     @Test
     public void kuaiyidaiApiTest(){
     public void kuaiyidaiApiTest(){
-        Long apiId= 441428658950208L;
+//        Long apiId= 441428658950208L;
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         UserInBaseInfoDto user =new UserInBaseInfoDto();
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCityAllName("重庆市");
         user.setCityAllName("重庆市");
         PlanDto  plan =new PlanDto();
         PlanDto  plan =new PlanDto();
-        plan.setApiId(apiId);
+//        plan.setApiId(apiId);
         plan.setBid("aff1c7b30d8b240826030235business");
         plan.setBid("aff1c7b30d8b240826030235business");
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         checkin.setPlan(plan);
         checkin.setPlan(plan);
@@ -363,6 +370,30 @@ public class StartApiTest {
         apiGateway.checkIntoRequest(checkin);
         apiGateway.checkIntoRequest(checkin);
     }
     }
 
 
+    @Test
+    public void apiTest(){
+        UserInBaseInfoDto user =new UserInBaseInfoDto();
+        user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
+        user.setCityAllName("重庆市");
+        user.setCompanyCity("重庆");
+
+        CheckIntoParamDto checkin =new CheckIntoParamDto();
+//        ProductBusinessApiInfoDo apiInfoByRedis = productBusinessApiInfoService.getApiInfoByRedis(1491);
+        List<ProductBusinessApiInfoDo> productBusinessApiInfoDos = productBusinessApiInfoService.apiList();
+        for (ProductBusinessApiInfoDo productBusinessApiInfoDo : productBusinessApiInfoDos) {
+//        ExecutorService executorService= Executors.newFixedThreadPool(75);
+//            executorService.execute(()->{
+                PlanDto  plan =new PlanDto();
+                plan.setApiId(productBusinessApiInfoDo.getId());
+                plan.setBid("aff1c7b30d8b240826030235business");
+                checkin.setPlan(plan);
+                checkin.setUser(user);
+                apiRouteService.loanCheckInto(checkin);
+//            });
+        }
+
+    }
+
     @Test
     @Test
     public void spel(){
     public void spel(){
         Map<String,Object> map =new HashMap<>();
         Map<String,Object> map =new HashMap<>();