From abbabe2e9a30b61f6db0ce01f6546d019104bff8 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 21 Jul 2022 11:44:27 +0800 Subject: [PATCH] npe --- .../listener/v2/CorrectionListenerV2.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java index 17957e42..9326d1a0 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v2/CorrectionListenerV2.java @@ -146,7 +146,12 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac jdbcTemplate.batchUpdate(sqls); if (auditingBaseDTO.getReject() == null || auditingBaseDTO.getReject() != Boolean.TRUE) { // 都是同意 - batchApplyCode(delegateExecution, dtoList); + try { + batchApplyCode(delegateExecution, dtoList); + } catch (Exception exception) { + logger.error("上架网关失败", exception); + } + } } @@ -296,9 +301,11 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac allMsg.append('\n'); for (TAbilityApplicationDTO abilityApplicationDTO : dtoList) { ResourceEntity resourceEntity = resourceService.selectById(abilityApplicationDTO.getResourceId()); - + if (resourceEntity == null) { + continue; + } //没有groupid当做没有接口,直接跳过 - if (resourceEntity.getGroupId() == null) + if (null == resourceEntity.getGroupId()) continue; String code = UUID.randomUUID().toString();