Merge pull request #8389 from 1298191366/master

open api功能优化
This commit is contained in:
JEECG
2025-06-06 15:22:11 +08:00
committed by GitHub
6 changed files with 209 additions and 95 deletions

View File

@ -41,7 +41,17 @@ public class SampleOpenApiTest {
// 解析JSON响应
JSONObject res = JSON.parseObject(responseBody);
System.out.println("[info] 调用成功: " + res.toJSONString());
//错误日志判断
if(res.containsKey("success")){
Boolean success = res.getBoolean("success");
if(success){
System.out.println("[info] 调用成功: " + res.toJSONString());
}else{
System.out.println("[error] 调用失败: " + res.getString("message"));
}
}else{
System.out.println("[error] 调用失败: " + res.getString("message"));
}
}
}