Commit f84b590b authored by 黎博's avatar 黎博

fix

parent 5514970f
package cn.qg.qaplatform.process; package cn.qg.qaplatform.process;
import cn.qg.qaplatform.config.WebSocketServer;
import cn.qg.qaplatform.utils.DBUtils; import cn.qg.qaplatform.utils.DBUtils;
import cn.qg.qaplatform.utils.Encrypt.LexinEncrypt; import cn.qg.qaplatform.utils.Encrypt.LexinEncrypt;
import cn.qg.qaplatform.utils.HttpClientUtils; import cn.qg.qaplatform.utils.HttpClientUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
......
...@@ -39,7 +39,6 @@ public class Lexin { ...@@ -39,7 +39,6 @@ public class Lexin {
String orderNo = "channel_order" + phoneNo + "_" + random.nextInt(9999); String orderNo = "channel_order" + phoneNo + "_" + random.nextInt(9999);
String url = "http://qapi-" + namespace + ".liangkebang.net/ex/api/v2/applyLoan/LEXIN"; String url = "http://qapi-" + namespace + ".liangkebang.net/ex/api/v2/applyLoan/LEXIN";
Map<String, Object> bizData = new HashMap<>(); Map<String, Object> bizData = new HashMap<>();
bizData.put("orderNo", orderNo); bizData.put("orderNo", orderNo);
bizData.put("userName", userName); bizData.put("userName", userName);
bizData.put("idCardNo", idCardNo); bizData.put("idCardNo", idCardNo);
...@@ -54,7 +53,7 @@ public class Lexin { ...@@ -54,7 +53,7 @@ public class Lexin {
bizData.put("workUnit", "北京市测试公司"); bizData.put("workUnit", "北京市测试公司");
bizData.put("industry", "TRAFFIC"); bizData.put("industry", "TRAFFIC");
bizData.put("loanDemandPurpose", "FURNITURE_HOME"); bizData.put("loanDemandPurpose", "FURNITURE_HOME");
List creditList = createCreditList(); List<Map> creditList = createCreditList();
bizData.put("creditList", creditList); bizData.put("creditList", creditList);
bizData.put("education", "MASTER"); bizData.put("education", "MASTER");
bizData.put("occupation", "UNEMPLOYED"); bizData.put("occupation", "UNEMPLOYED");
...@@ -83,8 +82,9 @@ public class Lexin { ...@@ -83,8 +82,9 @@ public class Lexin {
Map<String, Object> content = new HashMap<>(); Map<String, Object> content = new HashMap<>();
content.put("sign", signStr); content.put("sign", signStr);
content.put("bizData", bizDataStr); content.put("bizData", bizDataStr);
log.info("进件参数为:" + content);
if (!StringUtils.isEmpty(symbol)) { if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("进件参数为:" + content, symbol); WebSocketServer.sendInfo("进件参数为:{}", content.toString());
} }
String contentStr = LexinEncrypt.encryptAndBase64Encode(JSONObject.toJSONString(content), AESKeywy); String contentStr = LexinEncrypt.encryptAndBase64Encode(JSONObject.toJSONString(content), AESKeywy);
...@@ -92,11 +92,7 @@ public class Lexin { ...@@ -92,11 +92,7 @@ public class Lexin {
headers.put("Content-Type", "application/x-www-form-urlencoded"); headers.put("Content-Type", "application/x-www-form-urlencoded");
JSONObject result = HttpClientUtils.doPost(url, "content=" + contentStr); JSONObject result = HttpClientUtils.doPost(url, "content=" + contentStr);
String response = LexinEncrypt.decryptAfterBase64Decode(result.get("content").toString(), AESKeywy); String response = LexinEncrypt.decryptAfterBase64Decode(result.get("content").toString(), AESKeywy);
log.info("乐信进件返回结果: {}", JSONObject.parseObject(response).toString());
if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("进件响应为:" + response, symbol);
}
log.info("乐信进件返回结果:" + response);
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment