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"))) {