Commit f88784af authored by 王向伟's avatar 王向伟

审核接口返回值判断逻辑修改

parent 25b36835
......@@ -87,7 +87,8 @@ public class KoalaCenterService {
String result = koalaCenter.approve(approveData);
JsonResult jsonObject = JSONObject.parseObject(result, JsonResult.class);
log.info("koala审批结果 result={}",result);
if(jsonObject.isSuccess()){
//返回结果不标准 只能单独判断
if("0".equals(jsonObject.getCode()) || "0000".equals(jsonObject.getCode())){
return Constants.SUCCESS;
}else {
return Constants.FAIL;
......@@ -142,4 +143,15 @@ public class KoalaCenterService {
}
}
public static void main(String[] args) {
String result = " {\n" +
" \"code\":\"0\",\n" +
" \"msg\":\"已成功收到编号为 AN000000145976079295717376 订单的风审结果.\",\n" +
" \"success\":true\n" +
"}";
JsonResult jsonObject = JSONObject.parseObject(result, JsonResult.class);
String code = jsonObject.getCode();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment