修复没有满足网关申请数据时的审批标注

This commit is contained in:
huangweixiong 2022-08-01 11:02:00 +08:00
parent e729b95d2d
commit 61898cbcdc
1 changed files with 7 additions and 1 deletions

View File

@ -294,13 +294,17 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
StringBuilder allMsg = new StringBuilder();
allMsg.append("您的能力申请已通过,访问令牌如下:");
allMsg.append('\n');
boolean hasData = false;
for (TAbilityApplicationDTO abilityApplicationDTO : dtoList) {
ResourceEntity resourceEntity = resourceService.selectById(abilityApplicationDTO.getResourceId());
//没有groupid当做没有接口直接跳过
if (resourceEntity.getGroupId() == null)
if (resourceEntity == null || resourceEntity.getGroupId() == null)
continue;
hasData = true;
String code = UUID.randomUUID().toString();
apiGatewayService.subscribeCode(String.valueOf(abilityApplicationDTO.getId()), code);
String apiPrefix = "/juapi/" + abilityApplicationDTO.getResourceId();
@ -309,6 +313,8 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
allMsg.append('\n');
}
//一条也没有跳过
if (!hasData) return;
TaskService taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();