处理查询结果为null导致报错的问题
This commit is contained in:
parent
d4f52b82b8
commit
9885a36bfc
@ -231,6 +231,9 @@ public class RestTemplateUtil {
|
||||
String response = responseEntity.getBody();
|
||||
if (HttpStatus.OK.value() == responseEntity.getStatusCodeValue()) {
|
||||
LOG.debug(">>>> 返回结果: {}", response);
|
||||
if (response == null) {
|
||||
return new JSONObject().toJSONString();
|
||||
}
|
||||
return response;
|
||||
} else if (HttpStatus.UNAUTHORIZED.value() == responseEntity.getStatusCodeValue()) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user