|
@@ -5,7 +5,7 @@ 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.PlanDto;
|
|
|
-import com.hrsk.cloud.eg.dto.data.user.UserInBaseInfoDto;
|
|
|
+import com.hrsk.cloud.eg.dto.data.user.UserBaseInfoDto;
|
|
|
import com.hrsk.cloud.eg.infrastructure.config.client.config.RetryRestTemplate;
|
|
|
import com.hrsk.cloud.eg.infrastructure.repository.database.entity.ProductBusinessApiInfoDo;
|
|
|
import com.hrsk.cloud.eg.infrastructure.service.ProductBusinessApiInfoService;
|
|
@@ -14,6 +14,8 @@ import com.hrsk.cloud.eg.vo.response.DataVo;
|
|
|
import lombok.Data;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.http.HttpEntity;
|
|
|
+import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -57,7 +59,7 @@ public class HuirongCrmCreditService implements LoanDockingApi {
|
|
|
*
|
|
|
* @return {"channelSource":"birong","url":"http://apitest.shlyxxjs.com","key":"mgjr@3des123#dhjr9763089"}
|
|
|
*/
|
|
|
- public DataVo qualityCheck(UserInBaseInfoDto userInfo, PlanDto product) {
|
|
|
+ public DataVo qualityCheck(UserBaseInfoDto userInfo, PlanDto product) {
|
|
|
try {
|
|
|
log.info("credit HuirongCrmCreditService qualityCheck begin...userId:{}", userInfo.getUserId());
|
|
|
ProductBusinessApiInfoDo apiInfo = apiInfoService.getById(product.getApiId());
|
|
@@ -77,9 +79,11 @@ public class HuirongCrmCreditService implements LoanDockingApi {
|
|
|
log.info("credit qualityCheck HuirongCrmCreditService request userId:{}, url:{},requestParam:{}", userInfo.getUserId(), url, requestJson);
|
|
|
ResultHt response = null;
|
|
|
try {
|
|
|
- Map<String, String> head = new HashMap<>();
|
|
|
- head.put("Content-Type", "application/json");
|
|
|
- response = httpRestTemplate.restTemplate().postForObject(url,head,ResultHt.class, checkData);
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.set("Content-Type", "application/json");
|
|
|
+ HttpEntity httpEntity = new HttpEntity<>(requestJson,headers);
|
|
|
+ //post方式如果出现对接 请求体 为空参考这种方式
|
|
|
+ response = httpRestTemplate.restTemplate().postForObject(url,httpEntity,ResultHt.class);
|
|
|
log.info("hui ron result {}",JSONObject.toJSONString(response));
|
|
|
} catch (Exception e) {
|
|
|
log.error("惠融crm准入异常,异常信息:{}", e.getMessage(), e);
|