|
|
@@ -454,8 +454,12 @@ public class QxybDataService {
|
|
|
response = client.newCall(request).execute();
|
|
|
result = response.body().string();
|
|
|
JSONObject json = JSONObject.parseObject(result);
|
|
|
+ String data = json.getString("data");
|
|
|
+ if (data == null || "[]".equals(data) || "{}".equals(data)) {
|
|
|
+ throw new RuntimeException("无有效数据");
|
|
|
+ }
|
|
|
Integer code = json.getInteger("code");
|
|
|
- if (code == 200) {
|
|
|
+ if (code != null && code == 200) {
|
|
|
return result;
|
|
|
} else {
|
|
|
throw new RuntimeException(result);
|