From 78ea3f525dbd80cd991dfce10b7bf303dcb2c0ec Mon Sep 17 00:00:00 2001 From: bayuzhen Date: Thu, 29 Aug 2024 11:12:39 +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 0d75dc9..b9630de 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 @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; import cn.hutool.http.HttpUtil; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.bocloud.sms.entity.AppEntity; @@ -114,10 +115,13 @@ public class TrxServiceImpl implements TrxService { JSONObject result = new JSONObject(); GeneralResult> login = new GeneralResult<>(); 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) .header("isToken", "false") - .body(JSONObject.toJSONString(paramsMap)); - log.info("调用天融信用户登录接口, 请求信息:" + JSONObject.toJSONString(httpRequest)); + .body(requestData); + log.info("调用天融信用户登录接口, 请求方法" + httpRequest.getMethod() + ",参数:" + requestData); HttpResponse response = httpRequest.execute(); result = JSONObject.parseObject(response.body()); if (!"0".equals(result.getString("result"))) {