|
@@ -96,7 +96,11 @@ public class HuaduDocServiceImpl implements IHuaduDocService{
|
|
|
.timeout(HttpGlobalConfig.getTimeout()).execute()){
|
|
|
// 解析响应体
|
|
|
String body = execute.body();
|
|
|
- return "false".equals(body);
|
|
|
+ boolean f = "false".equals(body);
|
|
|
+ if(!f){
|
|
|
+ log.error("检查花都档案系统用户{}是否存在失败!", username);
|
|
|
+ }
|
|
|
+ return f;
|
|
|
// if(StringUtils.isNotEmpty(body)){
|
|
|
// JSONObject entries = JSONUtil.parseObj(body);
|
|
|
// // 检查响应是否有效,并返回用户存在状态
|
|
@@ -142,8 +146,10 @@ public class HuaduDocServiceImpl implements IHuaduDocService{
|
|
|
if(StringUtils.isNotEmpty(body)){
|
|
|
JSONObject entries = JSONUtil.parseObj(body);
|
|
|
// 检查响应是否表示成功创建用户
|
|
|
- if(entries != null || 200 == entries.getInt("code")){
|
|
|
+ if(entries != null && 200 == entries.getInt("code")){
|
|
|
return true;
|
|
|
+ } else{
|
|
|
+ log.error("创建花都档案系统用户{}失败,原因:{}", principal.getUsername(), body);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -175,6 +181,8 @@ public class HuaduDocServiceImpl implements IHuaduDocService{
|
|
|
// 检查响应是否有效,并提取令牌
|
|
|
if(entries != null && 200 == entries.getInt("code") && StringUtils.isNotBlank(entries.getStr("data"))){
|
|
|
token = entries.getStr("data");
|
|
|
+ } else{
|
|
|
+ log.error("获取花都档案系统用户令牌失败,原因:{}", body);
|
|
|
}
|
|
|
}
|
|
|
}
|