GITZYY преди 7 месеца
родител
ревизия
4e1c2b2194

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

@@ -90,9 +90,8 @@ public class GexinjinfuCreditService implements LoanDockingApi {
             try{
             try{
                 Map<String, String> head = new HashMap<>();
                 Map<String, String> head = new HashMap<>();
                 head.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
                 head.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().getForObject(url, null, null, head, null);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr,ResultHt.class);
+                String httpResponse = httpRestTemplate.restTemplate().getForObject(url, String.class,head);
+                response = JSONObject.parseObject(httpResponse,ResultHt.class);
             }catch (Exception e){
             }catch (Exception e){
                 log.error("格鑫金服准入异常,异常信息:{}", e.getMessage(), e);
                 log.error("格鑫金服准入异常,异常信息:{}", e.getMessage(), e);
             }
             }

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

@@ -94,9 +94,8 @@ public class HaohanwuyinCreditService implements LoanDockingApi {
             try{
             try{
                 Map<String, String> head = new HashMap<>();
                 Map<String, String> head = new HashMap<>();
                 head.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
                 head.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, checkData);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                response = JSONObject.parseObject(responseStr,ResultHt.class);
+                String httpResponse = httpRestTemplate.restTemplate().postForObject(url,  head,String.class, checkData);
+                response = JSONObject.parseObject(httpResponse,ResultHt.class);
             }catch (Exception e){
             }catch (Exception e){
                 log.error("灏瀚无崟准入异常,异常信息:{}", e.getMessage(), e);
                 log.error("灏瀚无崟准入异常,异常信息:{}", e.getMessage(), e);
             }
             }

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

@@ -73,10 +73,9 @@ public class KunMingXiaoSongShuCreditService implements LoanDockingApi {
                 Map<String, String> head = new HashMap<>();
                 Map<String, String> head = new HashMap<>();
                 head.put("Content-Type", "application/json; charset=utf-8");
                 head.put("Content-Type", "application/json; charset=utf-8");
                 head.put("access-control-allow-origin","*");
                 head.put("access-control-allow-origin","*");
-                HttpResponse httpResponse =  httpRestTemplate.restTemplate().getForObject(url, null, null, head, null);
-                String responseStr = EntityUtils.toString(httpResponse.getEntity());
-                log.info("昆明小松鼠撞库响应数据:{}", responseStr);
-                response = JSON.parseObject(responseStr);
+                String httpResponse =  httpRestTemplate.restTemplate().getForObject(url, String.class,  head);
+                log.info("昆明小松鼠撞库响应数据:{}", httpResponse);
+                response = JSON.parseObject(httpResponse);
             }catch (Exception e){
             }catch (Exception e){
                 log.error("昆明小松鼠代准入异常,异常信息:{}", e.getMessage(), e);
                 log.error("昆明小松鼠代准入异常,异常信息:{}", e.getMessage(), e);
             }
             }

+ 10 - 1
egress-gateway-service-app/src/main/java/com/hrsk/cloud/eg/app/threedocking/impl/MoGuTouCreditService.java

@@ -64,7 +64,7 @@ public class MoGuTouCreditService implements LoanDockingApi {
             checkInfo.setTimestamp(millisecondsSinceEpoch);//当前时间搓
             checkInfo.setTimestamp(millisecondsSinceEpoch);//当前时间搓
             checkInfo.setRandomStr(getRandomStr());//随机字符串
             checkInfo.setRandomStr(getRandomStr());//随机字符串
             String signature=checkInfo.getTenantId()+checkInfo.getTimestamp()+checkInfo.getRandomStr()+config.getString("key")+config.getString("qykey");
             String signature=checkInfo.getTenantId()+checkInfo.getTimestamp()+checkInfo.getRandomStr()+config.getString("key")+config.getString("qykey");
-            String s = Md5Util.encoderByMd5(signature);
+            String s = Md5Util.encoderByMd5(signature).toLowerCase();
             checkInfo.setSignature(s);
             checkInfo.setSignature(s);
             String url = config.getString("checkUrl");
             String url = config.getString("checkUrl");
 
 
@@ -120,4 +120,13 @@ public class MoGuTouCreditService implements LoanDockingApi {
         return randomString;
         return randomString;
     }
     }
 
 
+    /**
+     * 强化的MD5计算
+     * @param inbuf 需做md5的字符串
+     * @return
+     */
+    public static String encodeByMd5WithSalt(String inbuf,String salt) {
+        String mac = Md5Util.encoderByMd5(Md5Util.encoderByMd5(inbuf+salt));
+        return mac;
+    }
 }
 }

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

@@ -87,12 +87,11 @@ public class XiaMenYiJieZhuDaiCreditService implements LoanDockingApi {
                 head.put("appid",appid);
                 head.put("appid",appid);
                 head.put("t", t);
                 head.put("t", t);
                 head.put("sign", sign);
                 head.put("sign", sign);
-                HttpResponse httpResponse = httpRestTemplate.restTemplate().postForObject(url, null, null, head, null, JSONObject.toJSONString(checkInfo));
-                response = EntityUtils.toString(httpResponse.getEntity());
+                String httpResponse = httpRestTemplate.restTemplate().postForObject(url,  head, String.class,JSONObject.toJSONString(checkInfo));
+                log.info("credit qualityCheck XiaMenYiJieZhuDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), httpResponse);
             }catch (Exception e){
             }catch (Exception e){
                 log.error("厦门易捷助代准入异常,异常信息:{}", e.getMessage(), e);
                 log.error("厦门易捷助代准入异常,异常信息:{}", e.getMessage(), e);
             }
             }
-            log.info("credit qualityCheck XiaMenYiJieZhuDaiCreditService response userId:{}, result:{}",userInfo.getUserId(), response);
             if (response == null) {
             if (response == null) {
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
                 return DataVo.timeout(product.getPlanId(),product.getPlanName());
             }
             }

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

@@ -85,9 +85,8 @@ public class XinluCreditService 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);
+                String httpResponse = httpRestTemplate.restTemplate().postForObject(url, head, String.class,requestJson );
+                response = JSONObject.parseObject(httpResponse,ResultHt.class);
             }catch (Exception e){
             }catch (Exception e){
                 log.error("鑫鹿准入异常,异常信息:{}", e.getMessage(), e);
                 log.error("鑫鹿准入异常,异常信息:{}", 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 = 1;
+    int retryCount = 0;
     //http请求timeout,重试间隔时间,重试间隔时间=次数*100 ms.
     //http请求timeout,重试间隔时间,重试间隔时间=次数*100 ms.
     long retryIntervalTime = 0;
     long retryIntervalTime = 0;
     //连接池连接数量
     //连接池连接数量

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

@@ -73,9 +73,9 @@ public class ProductBusinessApiInfoServiceImpl extends ServiceImpl<ProductBusine
     @Override
     @Override
     public List<ProductBusinessApiInfoDo> apiList() {
     public List<ProductBusinessApiInfoDo> apiList() {
         LambdaQueryWrapper<ProductBusinessApiInfoDo> queryWrapper=new LambdaQueryWrapper<>();
         LambdaQueryWrapper<ProductBusinessApiInfoDo> queryWrapper=new LambdaQueryWrapper<>();
-        queryWrapper.isNotNull(ProductBusinessApiInfoDo::getJointType);
+        queryWrapper.ne(ProductBusinessApiInfoDo::getJoinMethod,2);
         queryWrapper.orderByDesc(ProductBusinessApiInfoDo::getCreateTime);
         queryWrapper.orderByDesc(ProductBusinessApiInfoDo::getCreateTime);
-        List<ProductBusinessApiInfoDo> productBusinessApiInfoDos = baseMapper.selectList(new LambdaQueryWrapper<>());
+        List<ProductBusinessApiInfoDo> productBusinessApiInfoDos = baseMapper.selectList(queryWrapper);
         if (CollectionUtils.isEmpty(productBusinessApiInfoDos)) {
         if (CollectionUtils.isEmpty(productBusinessApiInfoDos)) {
             return Collections.emptyList();
             return Collections.emptyList();
         }
         }

+ 6 - 5
start/src/test/java/StartApiTest.java

@@ -376,21 +376,22 @@ public class StartApiTest {
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setPhoneMd5("b5500dfab55f42b340d31326561e16cb");
         user.setCityAllName("重庆市");
         user.setCityAllName("重庆市");
         user.setCompanyCity("重庆");
         user.setCompanyCity("重庆");
+        user.setUserMobile("18385143735");
 
 
         CheckIntoParamDto checkin =new CheckIntoParamDto();
         CheckIntoParamDto checkin =new CheckIntoParamDto();
-//        ProductBusinessApiInfoDo apiInfoByRedis = productBusinessApiInfoService.getApiInfoByRedis(1491);
-        List<ProductBusinessApiInfoDo> productBusinessApiInfoDos = productBusinessApiInfoService.apiList();
-        for (ProductBusinessApiInfoDo productBusinessApiInfoDo : productBusinessApiInfoDos) {
+        ProductBusinessApiInfoDo apiInfoByRedis = productBusinessApiInfoService.getApiInfoByRedis(1492);
+//        List<ProductBusinessApiInfoDo> productBusinessApiInfoDos = productBusinessApiInfoService.apiList();
+//        for (ProductBusinessApiInfoDo productBusinessApiInfoDo : productBusinessApiInfoDos) {
 //        ExecutorService executorService= Executors.newFixedThreadPool(75);
 //        ExecutorService executorService= Executors.newFixedThreadPool(75);
 //            executorService.execute(()->{
 //            executorService.execute(()->{
                 PlanDto  plan =new PlanDto();
                 PlanDto  plan =new PlanDto();
-                plan.setApiId(productBusinessApiInfoDo.getId());
+                plan.setApiId(apiInfoByRedis.getId());
                 plan.setBid("aff1c7b30d8b240826030235business");
                 plan.setBid("aff1c7b30d8b240826030235business");
                 checkin.setPlan(plan);
                 checkin.setPlan(plan);
                 checkin.setUser(user);
                 checkin.setUser(user);
                 apiRouteService.loanCheckInto(checkin);
                 apiRouteService.loanCheckInto(checkin);
 //            });
 //            });
-        }
+//        }
 
 
     }
     }