Compare commits

..

No commits in common. "f27daac6fa3eab1f95b8284f0c4df1f4c916a1af" and "0fa6d45ddfe68618cb5a60dad575f8e5379c4105" have entirely different histories.

1 changed files with 6 additions and 18 deletions

View File

@ -145,12 +145,8 @@ public class IndexServiceImpl implements IndexService {
try {
String result = warnUtil.call(WarnInfo.get7DayWarnTrend.getUrl(), "GET");
JSONObject jsonObject = JSONObject.parseObject(result);
if (!"200".equals(jsonObject.getString("code"))) {
log.info("result:" + result);
return new GeneralResult(false, "查询失败");
}
return new GeneralResult(true, jsonObject, "查询成功");
log.info("result:"+result);
return new GeneralResult(true, "查询成功");
} catch (Exception e) {
log.info("查询失败", e);
return new GeneralResult(false, "查询失败");
@ -162,12 +158,8 @@ public class IndexServiceImpl implements IndexService {
try {
String result = warnUtil.call(WarnInfo.get1DayWarnCount.getUrl(), "GET");
JSONObject jsonObject = JSONObject.parseObject(result);
if (!"200".equals(jsonObject.getString("code"))) {
log.info("result:" + result);
return new GeneralResult(false, "查询失败");
}
return new GeneralResult(true, jsonObject, "查询成功");
log.info("result:"+result);
return new GeneralResult(true, "查询成功");
} catch (Exception e) {
log.info("查询失败", e);
return new GeneralResult(false, "查询失败");
@ -178,12 +170,8 @@ public class IndexServiceImpl implements IndexService {
public GeneralResult warnList(RequestContext requestContext) {
try {
String result = warnUtil.call(WarnInfo.getWarnList.getUrl(), "GET");
JSONObject jsonObject = JSONObject.parseObject(result);
if (!"200".equals(jsonObject.getString("code"))) {
log.info("result:" + result);
return new GeneralResult(false, "查询失败");
}
return new GeneralResult(true, jsonObject, "查询成功");
log.info("result:"+result);
return new GeneralResult(true, "查询成功");
} catch (Exception e) {
log.info("查询失败", e);
return new GeneralResult(false, "查询失败");