Browse Source

冗余

master
zhangyuan 3 years ago
parent
commit
cb16c12d53
  1. 28
      shibei-gird-sdk/src/main/java/com/elink/esua/epdc/gird/city/api/impl/CityGridApiImpl.java

28
shibei-gird-sdk/src/main/java/com/elink/esua/epdc/gird/city/api/impl/CityGridApiImpl.java

@ -47,20 +47,20 @@ public class CityGridApiImpl implements CityGridApi {
JSONObject res = JSONObject.parseObject(response.body());
SendEventResultDto result = null;
if (0 == Integer.parseInt(res.get("code").toString())) {
try {
result = (SendEventResultDto) JSONObject.toJavaObject((JSONObject) res.get("data"), SendEventResultDto.class);
result.setCode("0");
} catch (Exception e) {
e.printStackTrace();
LOGGER.error(interFaceName + "返回结果处理错误:" + e.getMessage());
}
} else {
try {
result = (SendEventResultDto) JSONObject.toJavaObject(res, SendEventResultDto.class);
} catch (Exception e) {
e.printStackTrace();
LOGGER.error(interFaceName + "返回结果处理错误:" + e.getMessage());
}
// try {
// result = (SendEventResultDto) JSONObject.toJavaObject((JSONObject) res.get("data"), SendEventResultDto.class);
// result.setCode("0");
// } catch (Exception e) {
// e.printStackTrace();
// LOGGER.error(interFaceName + "返回结果处理错误:" + e.getMessage());
// }
// } else {
// try {
// result = (SendEventResultDto) JSONObject.toJavaObject(res, SendEventResultDto.class);
// } catch (Exception e) {
// e.printStackTrace();
// LOGGER.error(interFaceName + "返回结果处理错误:" + e.getMessage());
// }
}
return res;

Loading…
Cancel
Save