From 38c3a787655f836b7bdd48f5ec9b1e9fea81f6c4 Mon Sep 17 00:00:00 2001 From: bayuzhen Date: Wed, 28 Aug 2024 22:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A9=E8=9E=8D=E4=BF=A1?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=8E=A5=E5=8F=A3=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/bocloud/sms/service/TrxServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java index c5a8896..4286128 100644 --- a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java +++ b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java @@ -114,8 +114,12 @@ public class TrxServiceImpl implements TrxService { JSONObject result = new JSONObject(); GeneralResult> 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")); }