|
@@ -12,6 +12,8 @@ import com.hrsk.cloud.eg.infrastructure.service.ProductBusinessApiInfoService;
|
|
|
import com.hrsk.cloud.eg.vo.response.DataVo;
|
|
|
import lombok.Data;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.http.HttpEntity;
|
|
|
+import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -72,7 +74,7 @@ public class XinluCreditService implements LoanDockingApi {
|
|
|
String configJson = apiInfo.getThreeSystemConfig();
|
|
|
JSONObject xinluJointDTO = JSONObject.parseObject(configJson);
|
|
|
log.info("鑫鹿对接参数:{}", JSONObject.toJSONString(xinluJointDTO));
|
|
|
- String url = xinluJointDTO.getString("url");
|
|
|
+ String url = xinluJointDTO.getString("checkUrl");
|
|
|
CheckData checkData = new CheckData();
|
|
|
checkData.setPhone(userInfo.getPhoneMd5());
|
|
|
checkData.setType(2);
|
|
@@ -81,10 +83,10 @@ public class XinluCreditService implements LoanDockingApi {
|
|
|
log.info("credit qualityCheck XinluCreditService request userId:{}, url:{},requestParam",userInfo.getUserId(), url,requestJson);
|
|
|
ResultHt response = null;
|
|
|
try{
|
|
|
- Map<String, String> head = new HashMap<>();
|
|
|
- head.put("Content-Type", "application/json");
|
|
|
- String httpResponse = httpRestTemplate.restTemplate().postForObject(url, head, String.class,requestJson );
|
|
|
- response = JSONObject.parseObject(httpResponse,ResultHt.class);
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.set("Content-Type", "application/json");
|
|
|
+ HttpEntity httpEntity = new HttpEntity<>(requestJson,headers);
|
|
|
+ response = httpRestTemplate.restTemplate().postForObject(url,httpEntity, ResultHt.class );
|
|
|
}catch (Exception e){
|
|
|
log.error("鑫鹿准入异常,异常信息:{}", e.getMessage(), e);
|
|
|
}
|