mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 20:36:50 +08:00
增加了打印日志
This commit is contained in:
@@ -298,6 +298,10 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
|
|||||||
log.info("请求的的接口:"+url);
|
log.info("请求的的接口:"+url);
|
||||||
log.info("请求的数据:"+idsJson);
|
log.info("请求的数据:"+idsJson);
|
||||||
responseStr = okHttpUtil.doPostJson(url,idsJson, headers);
|
responseStr = okHttpUtil.doPostJson(url,idsJson, headers);
|
||||||
|
if(StringUtils.isBlank(responseStr)) {
|
||||||
|
log.error("接口未返回任何内容");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
log.info("返回的数据:"+responseStr);
|
log.info("返回的数据:"+responseStr);
|
||||||
JsonNode rootNode= mapper.readTree(responseStr);
|
JsonNode rootNode= mapper.readTree(responseStr);
|
||||||
int code = rootNode.get("status").asInt();
|
int code = rootNode.get("status").asInt();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.xboe.system.user.api;
|
package com.xboe.system.user.api;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -273,10 +272,17 @@ public class UserApi extends ApiBaseController {
|
|||||||
//从用户中心接口中获取
|
//从用户中心接口中获取
|
||||||
try {
|
try {
|
||||||
list=outsideService.findByIds(ids);
|
list=outsideService.findByIds(ids);
|
||||||
|
if(list==null) {
|
||||||
|
log.error("根据id集合从用户中心获取用户数据失败,请查看日志");
|
||||||
|
return badRequest("根据id集合从用户中心获取用户数据失败,请查看日志");
|
||||||
|
}
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
log.error("从用户中心获取用户信息失败",e);
|
log.error("从用户中心获取用户信息失败",e);
|
||||||
return badRequest("从用户中心获取用户信息失败");
|
return badRequest("从用户中心获取用户信息失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user