From ca4b00c59fc258731e06a2c4a4bd53ea2564e602 Mon Sep 17 00:00:00 2001 From: WeiRan <2392355487@qq.com> Date: Mon, 9 Sep 2024 01:14:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=9A=E5=90=88=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/RealNameServiceImpl.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/cloud-juhe-server/src/main/java/com/muyu/data/mart/service/impl/RealNameServiceImpl.java b/cloud-juhe-server/src/main/java/com/muyu/data/mart/service/impl/RealNameServiceImpl.java index b074b2a..4b231e0 100644 --- a/cloud-juhe-server/src/main/java/com/muyu/data/mart/service/impl/RealNameServiceImpl.java +++ b/cloud-juhe-server/src/main/java/com/muyu/data/mart/service/impl/RealNameServiceImpl.java @@ -1,7 +1,7 @@ package com.muyu.data.mart.service.impl; -import com.alibaba.fastjson2.JSONObject; + import com.muyu.cloud.background.common.BasicApi; import com.muyu.cloud.background.domin.juhe.JuHeResult; import com.muyu.cloud.background.domin.realname.RealNameReq; @@ -76,27 +76,27 @@ public class RealNameServiceImpl implements BasicApi{ } in.close(); System.out.println(response); - //{"reason":"参数错误:身份证不合法","result":null,"error_code":210304} 或 - //{"reason":"成功","result":{"realname":"魏然","idcard":"321183200303152916","res":1},"error_code":0} - StringBuffer stringBuffer = new StringBuffer(response); - JSONObject jsonObject = JSONObject.parseObject(stringBuffer.toString()); - String reason = jsonObject.getString("reason"); - JSONObject resultObj = jsonObject.getJSONObject("result"); - String realname = resultObj.getString("realname"); - String idcard = resultObj.getString("idcard"); - int res = resultObj.getIntValue("res"); - int errorCode = jsonObject.getIntValue("error_code"); - return new JuHeResult(){{ - setErrorCode(errorCode); - setReason(reason); - setResult( - RealNameJuHeResp.builder() - .realName(realname) - .idCard(idcard) - .res(res) - .build() - ); - }}; +// //{"reason":"参数错误:身份证不合法","result":null,"error_code":210304} 或 +// //{"reason":"成功","result":{"realname":"魏然","idcard":"321183200303152916","res":1},"error_code":0} +// StringBuffer stringBuffer = new StringBuffer(response); +// JSONObject jsonObject = JSONObject.parseObject(stringBuffer.toString()); +// String reason = jsonObject.getString("reason"); +// JSONObject resultObj = jsonObject.getJSONObject("result"); +// String realname = resultObj.getString("realname"); +// String idcard = resultObj.getString("idcard"); +// int res = resultObj.getIntValue("res"); +// int errorCode = jsonObject.getIntValue("error_code"); +// return new JuHeResult(){{ +// setErrorCode(errorCode); +// setReason(reason); +// setResult( +// RealNameJuHeResp.builder() +// .realName(realname) +// .idCard(idcard) +// .res(res) +// .build() +// ); +// }}; // return new JuHeResult(){{ // setErrorCode(0); @@ -109,7 +109,7 @@ public class RealNameServiceImpl implements BasicApi{ // .build() // ); // }}; - + return null; }