Authored by FengRuwei

javaapi 检测服务异常开关

... ... @@ -15,11 +15,18 @@ public class PreProcessJavaApiHandler extends IJavaApiHadnler {
@Override
public void handler(JavaApiStatics javaApiStatics) {
//开关未开
if (javaApiStatics.getJavaApiInfo().getApiToggle() == 0)
return;
//http请求有错误,无需再判断服务异常
if (javaApiStatics.isHasException() == true || javaApiStatics.getResponse() == null)
return;
//无需判断服务异常
if (javaApiStatics.getJavaApiInfo().getApiErrorCheck() == 0)
return;
JSONObject jsonRep = null;
try {
jsonRep = JSON.parseObject(javaApiStatics.getResponse());
... ...