From 5f3260b9145e735d08b2d966866e7e3591606cfe Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 18 Jul 2023 14:44:26 +0800 Subject: [PATCH] =?UTF-8?q?api=20=E5=AE=9E=E4=BD=93=20irs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java index 0396c58..234e267 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java @@ -87,9 +87,11 @@ public class AppIrsManage { apiApply.setAppId(appCode); JSONObject jsonObject = this.searchApp(apiApply); VUtils.isTrue(Objects.isNull(jsonObject)).throwMessage("应用在IRS不存在!"); - JSONArray data = jsonObject.getJSONArray("data"); - VUtils.isTrue(CollUtil.isNotEmpty(data)).throwMessage("应用在IRS不存在!"); - ApiApplySearchResult apiApplySearchResult = JSON.parseObject(JSON.toJSONString(data.get(0)),ApiApplySearchResult.class); + JSONObject data = jsonObject.getJSONObject("data"); + VUtils.isTrue(Objects.isNull(data)).throwMessage("应用在IRS不存在!"); + JSONArray apiArray = data.getJSONArray("apiApplySearchResult"); + VUtils.isTrue(CollUtil.isEmpty(apiArray)).throwMessage("应用在IRS不存在!"); + ApiApplySearchResult apiApplySearchResult = JSON.parseObject(JSON.toJSONString(apiArray.get(0)),ApiApplySearchResult.class); VUtils.isTrue(Objects.isNull(apiApplySearchResult)).throwMessage("应用在IRS不存在!"); long timestamp = System.currentTimeMillis();