添加日志

develop
bayuzhen 2024-11-19 17:06:47 +08:00
parent 6721936cef
commit 14e5c154ec
2 changed files with 6 additions and 0 deletions

View File

@ -70,6 +70,7 @@ public class TrxServiceImpl implements TrxService {
log.info("调用天融信获取随机字符串接口, 请求信息:" + JSONObject.toJSONString(httpRequest)); log.info("调用天融信获取随机字符串接口, 请求信息:" + JSONObject.toJSONString(httpRequest));
HttpResponse response = httpRequest.execute(); HttpResponse response = httpRequest.execute();
result = JSONObject.parseObject(response.body()); result = JSONObject.parseObject(response.body());
log.info("调用天融信获取随机字符串接口, 响应信息:" + JSONObject.toJSONString(result));
if ("-1".equals(result.getString("result"))) { if ("-1".equals(result.getString("result"))) {
return new GeneralResult(false, "获取随机数失败" + result.getString("errmsg")); return new GeneralResult(false, "获取随机数失败" + result.getString("errmsg"));
} }
@ -95,6 +96,7 @@ public class TrxServiceImpl implements TrxService {
log.info("调用天融信获取随机字符串接口, 请求信息:" + JSONObject.toJSONString(httpRequest)); log.info("调用天融信获取随机字符串接口, 请求信息:" + JSONObject.toJSONString(httpRequest));
HttpResponse response = httpRequest.execute(); HttpResponse response = httpRequest.execute();
result = JSONObject.parseObject(response.body()); result = JSONObject.parseObject(response.body());
log.info("调用天融信获取随机字符串接口, 响应信息:" + JSONObject.toJSONString(result));
if ("-1".equals(result.getString("result"))) { if ("-1".equals(result.getString("result"))) {
return new GeneralResult(false, "获取随机数失败" + result.getString("errmsg")); return new GeneralResult(false, "获取随机数失败" + result.getString("errmsg"));
} }
@ -146,6 +148,7 @@ public class TrxServiceImpl implements TrxService {
log.info("调用天融信用户登录接口, 请求信息:" + JSONObject.toJSONString(httpRequest)); log.info("调用天融信用户登录接口, 请求信息:" + JSONObject.toJSONString(httpRequest));
HttpResponse response = httpRequest.execute(); HttpResponse response = httpRequest.execute();
result = JSONObject.parseObject(response.body()); result = JSONObject.parseObject(response.body());
log.info("调用天融信用户登录接口, 响应信息:" + JSONObject.toJSONString(result));
if (!"0".equals(result.getString("result"))) { if (!"0".equals(result.getString("result"))) {
return new GeneralResult(false, "用户登录天融信失败" + result.getString("errmsg")); return new GeneralResult(false, "用户登录天融信失败" + result.getString("errmsg"));
} }
@ -194,6 +197,7 @@ public class TrxServiceImpl implements TrxService {
log.info("调用天融信用户软key登录接口, 请求信息:" + JSONObject.toJSONString(httpRequest)); log.info("调用天融信用户软key登录接口, 请求信息:" + JSONObject.toJSONString(httpRequest));
HttpResponse response = httpRequest.execute(); HttpResponse response = httpRequest.execute();
result = JSONObject.parseObject(response.body()); result = JSONObject.parseObject(response.body());
log.info("调用天融信用户软key登录接口, 响应信息:" + JSONObject.toJSONString(result));
if (!"0".equals(result.getString("result"))) { if (!"0".equals(result.getString("result"))) {
return new GeneralResult(false, "用户登录天融信失败" + result.getString("errmsg")); return new GeneralResult(false, "用户登录天融信失败" + result.getString("errmsg"));
} }
@ -319,6 +323,7 @@ public class TrxServiceImpl implements TrxService {
log.info("调用天融信下线接口, 请求信息:" + JSONObject.toJSONString(httpRequest)); log.info("调用天融信下线接口, 请求信息:" + JSONObject.toJSONString(httpRequest));
HttpResponse response = httpRequest.execute(); HttpResponse response = httpRequest.execute();
JSONObject result = JSONObject.parseObject(response.body()); JSONObject result = JSONObject.parseObject(response.body());
log.info("调用天融信下线接口, 响应信息: " + JSONObject.toJSONString(result));
if (!"0".equals(result.getString("result"))) { if (!"0".equals(result.getString("result"))) {
return new GeneralResult(false, "下线失败" + result.getString("msg")); return new GeneralResult(false, "下线失败" + result.getString("msg"));
} }

View File

@ -36,6 +36,7 @@ public class QxUtils {
String str = JSONObject.toJSONString(qxReqVo); String str = JSONObject.toJSONString(qxReqVo);
logger.info("call method[{}] req params[{}]",url,str); logger.info("call method[{}] req params[{}]",url,str);
JSONObject result = JSONObject.parseObject(HttpUtil.post(url,str, 10000)); JSONObject result = JSONObject.parseObject(HttpUtil.post(url,str, 10000));
logger.info("调用权限系统接口响应信息" + result.toJSONString());
if (!"200".equals(result.getString("status"))) { if (!"200".equals(result.getString("status"))) {
throw new IllegalArgumentException("调用权限系统接口异常" + result.getString("msg")); throw new IllegalArgumentException("调用权限系统接口异常" + result.getString("msg"));
} }