修改天融信登录接口传参
parent
67e437d646
commit
78ea3f525d
|
@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpResponse;
|
import cn.hutool.http.HttpResponse;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.bocloud.sms.entity.AppEntity;
|
import com.bocloud.sms.entity.AppEntity;
|
||||||
|
@ -114,10 +115,13 @@ public class TrxServiceImpl implements TrxService {
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
GeneralResult<Map<String, Object>> login = new GeneralResult<>();
|
GeneralResult<Map<String, Object>> login = new GeneralResult<>();
|
||||||
try {
|
try {
|
||||||
|
String requestData = "{ \"cookie\": \"" + trxAuthModel.getClientHello() + "\", \"Authen\": [ { \"loginName\": \"" + trxAuthModel.getLoginName() +
|
||||||
|
"\", \"passwd\": \"" + trxAuthModel.getPasswd() + "\" }, { \"certMd5\": \"" + trxAuthModel.getServerHello() + "\", \"value\": \"\", \"hashType\": \"\" }, " +
|
||||||
|
"{ \"passcode\": \"\" }, { \"df_code\": \"\" }, { \"client_ip\": \"" + trxAuthModel.getClientIp() + "\" } ] }";
|
||||||
HttpRequest httpRequest = HttpRequest.post(url)
|
HttpRequest httpRequest = HttpRequest.post(url)
|
||||||
.header("isToken", "false")
|
.header("isToken", "false")
|
||||||
.body(JSONObject.toJSONString(paramsMap));
|
.body(requestData);
|
||||||
log.info("调用天融信用户登录接口, 请求信息:" + JSONObject.toJSONString(httpRequest));
|
log.info("调用天融信用户登录接口, 请求方法" + httpRequest.getMethod() + ",参数:" + requestData);
|
||||||
HttpResponse response = httpRequest.execute();
|
HttpResponse response = httpRequest.execute();
|
||||||
result = JSONObject.parseObject(response.body());
|
result = JSONObject.parseObject(response.body());
|
||||||
if (!"0".equals(result.getString("result"))) {
|
if (!"0".equals(result.getString("result"))) {
|
||||||
|
|
Loading…
Reference in New Issue