修改天融信登录接口传参

develop
bayuzhen 2024-08-28 22:38:33 +08:00
parent c6619e68a4
commit 38c3a78765
1 changed files with 6 additions and 2 deletions

View File

@ -114,8 +114,12 @@ public class TrxServiceImpl implements TrxService {
JSONObject result = new JSONObject();
GeneralResult<Map<String, Object>> login = new GeneralResult<>();
try {
log.info("调用天融信登录接口, url:" + url + ", 参数:" + JSONObject.toJSONString(paramsMap));
result = JSONObject.parseObject(HttpUtil.post(url, paramsMap, 10000));
HttpRequest httpRequest = HttpRequest.post("http://your_backend_url/trx/userAuthen")
.header("isToken", "false")
.body(JSONObject.toJSONString(paramsMap));
log.info("调用天融信获取随机字符串接口, 请求信息:" + JSONObject.toJSONString(httpRequest));
HttpResponse response = httpRequest.execute();
result = JSONObject.parseObject(response.body());
if (!"0".equals(result.getString("result"))) {
return new GeneralResult(false, "用户登录天融信失败" + result.getString("errmsg"));
}