|
@@ -2,17 +2,18 @@ package com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.impl;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
-import com.hrsk.cloud.eg.app.constant.ServerCodeEnums;
|
|
|
|
-import com.hrsk.cloud.eg.app.threedocking.LoanDockingApi;
|
|
|
|
-import com.hrsk.cloud.eg.dto.data.egPlan.PlanCmd;
|
|
|
|
-import com.hrsk.cloud.eg.dto.data.user.UserBaseInfoCmd;
|
|
|
|
|
|
+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 com.hrsk.cloud.eg.clinet.vo.DataVo;
|
|
|
|
+import com.hrsk.cloud.eg.domain.common.constant.ServerCodeEnums;
|
|
import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
|
|
import com.hrsk.cloud.eg.infrastructure.config.client.HessianUtils;
|
|
-import com.hrsk.cloud.eg.infrastructure.config.client.config.RetryRestTemplate;
|
|
|
|
-import com.hrsk.cloud.eg.infrastructure.repository.database.entity.EgLoanApiConfigInfoDo;
|
|
|
|
|
|
+import com.hrsk.cloud.eg.infrastructure.config.client.RetryRestTemplate;
|
|
|
|
+import com.hrsk.cloud.eg.infrastructure.loanMannager.threedocking.LoanDockingApi;
|
|
import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
|
|
import com.hrsk.cloud.eg.infrastructure.service.EgApiService;
|
|
import com.hrsk.cloud.eg.infrastructure.utils.Md5Util;
|
|
import com.hrsk.cloud.eg.infrastructure.utils.Md5Util;
|
|
-import com.hrsk.cloud.eg.vo.response.DataVo;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.springframework.http.*;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.util.MultiValueMap;
|
|
import org.springframework.util.MultiValueMap;
|
|
@@ -33,7 +34,7 @@ public class XinkedaiCreditService implements LoanDockingApi {
|
|
@Resource
|
|
@Resource
|
|
private RetryRestTemplate httpRestTemplate;
|
|
private RetryRestTemplate httpRestTemplate;
|
|
@Override
|
|
@Override
|
|
- public ServerCodeEnums getType() {
|
|
|
|
|
|
+ public ServerCodeEnums getType() {
|
|
return ServerCodeEnums.Xinkedai;
|
|
return ServerCodeEnums.Xinkedai;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -47,11 +48,10 @@ public class XinkedaiCreditService implements LoanDockingApi {
|
|
* {"url":"http://121.40.173.17:8811"}
|
|
* {"url":"http://121.40.173.17:8811"}
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
|
|
|
|
|
|
+ public DataVo qualityCheck(UserBaseInfoCmd userInfo, PlanCmd product, EgLoanApiConfigInfoCmd configInfo) {
|
|
try {
|
|
try {
|
|
log.info("credit XingkedaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
|
|
log.info("credit XingkedaiCreditService qualityCheck begin...userId:{}",userInfo.getUserId());
|
|
-// XdProductJointConfig xdProductJointConfig = xdProductJointConfigMapper.selectById(product.getJointType());
|
|
|
|
-
|
|
|
|
|
|
+
|
|
byte[] requestConfig = configInfo.getRequestConfig();
|
|
byte[] requestConfig = configInfo.getRequestConfig();
|
|
Object deserialize = HessianUtils.deserialize(requestConfig);
|
|
Object deserialize = HessianUtils.deserialize(requestConfig);
|
|
JSONObject config = JSONObject.parseObject(deserialize.toString());
|
|
JSONObject config = JSONObject.parseObject(deserialize.toString());
|
|
@@ -65,7 +65,7 @@ public class XinkedaiCreditService implements LoanDockingApi {
|
|
log.info("credit qualityCheck XingkedaiCreditService request userId:{}, url:{}, params:{}",userInfo.getUserId(), url, JSON.toJSONString(params));
|
|
log.info("credit qualityCheck XingkedaiCreditService request userId:{}, url:{}, params:{}",userInfo.getUserId(), url, JSON.toJSONString(params));
|
|
ResponseEntity<String> response = null;
|
|
ResponseEntity<String> response = null;
|
|
try{
|
|
try{
|
|
- HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
|
|
|
|
|
|
+ ResponseEntity<String> requestEntity = httpRestTemplate.restTemplate().postForEntity(url, params, String.class);
|
|
response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class);
|
|
response = httpRestTemplate.restTemplate().postForEntity(url, requestEntity, String.class);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
log.error("欣客贷准入异常,异常信息:{}", e.getMessage(), e);
|
|
log.error("欣客贷准入异常,异常信息:{}", e.getMessage(), e);
|