From 6fedef22c0df16a536f6364d8bb2dde3a7977d1f Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 25 Jul 2022 16:00:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/AbilityCenterControllerV2.java | 7 +++++-- .../java/io/renren/common/utils/CodeGenerationUtils.java | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java index 499622c6..38233334 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java @@ -226,7 +226,9 @@ public class AbilityCenterControllerV2 { final List ids = dtoList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()); // 发起申请的表单id // 仿照请求接口 /act/running/startOfBusinessKey ProcessStartDTO processStartDTO = new ProcessStartDTO(); - processStartDTO.setBusinessKey(basic_facilities ? tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())).map(TAbilityApplicationDTO::getResourceId).findFirst().orElse(null) : JSON.toJSONString(ids.stream().limit(5).collect(Collectors.toList()))); // 申请的id列表 json字符 做businesskey + processStartDTO.setBusinessKey(basic_facilities ? tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())) + .map(TAbilityApplicationDTO::getResourceId).findFirst().orElse(null) : + JSON.toJSONString(ids.stream().limit(5).collect(Collectors.toList()))); // 申请的id列表 json字符 做businesskey processStartDTO.setProcessDefinitionKey(key); //限定 AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO(); auditingBaseDTO.setCompleteEntry(Boolean.TRUE); // 首次录入 @@ -252,7 +254,8 @@ public class AbilityCenterControllerV2 { // 仿照请求接口 /processForm/tabilityapplication/updateInstanceId CompletableFuture.runAsync(() -> { if (dto.getBusinessKey() != null) { - String[] sqls = dtoList.stream().map(i -> String.format("UPDATE t_ability_application SET instance_id = %s WHERE id = %s", dto.getProcessInstanceId(), i.getId())).collect(Collectors.toList()).toArray(new String[dtoList.size()]); + String[] sqls = dtoList.stream().map(i -> String.format("UPDATE t_ability_application SET instance_id = %s WHERE id = %s", dto.getProcessInstanceId(), i.getId())) + .collect(Collectors.toList()).toArray(new String[dtoList.size()]); jdbcTemplate.batchUpdate(sqls); } }, executor); diff --git a/renren-admin/src/main/java/io/renren/common/utils/CodeGenerationUtils.java b/renren-admin/src/main/java/io/renren/common/utils/CodeGenerationUtils.java index 6684ca9d..7d89bdb5 100644 --- a/renren-admin/src/main/java/io/renren/common/utils/CodeGenerationUtils.java +++ b/renren-admin/src/main/java/io/renren/common/utils/CodeGenerationUtils.java @@ -105,7 +105,8 @@ public class CodeGenerationUtils { try { String finalTableName = tableName; String finalNo = no; - String[] sqls = id.stream().map(i -> String.format("UPDATE %s SET apply_number = '%s' WHERE id = %s;", finalTableName, finalNo, i)).collect(Collectors.toList()).toArray(new String[id.size()]); + String[] sqls = id.stream().map(i -> String.format("UPDATE %s SET apply_number = '%s' WHERE id = %s;", finalTableName, finalNo, i)) + .collect(Collectors.toList()).toArray(new String[id.size()]); jdbcTemplate.batchUpdate(sqls); } catch (Exception exception) { logger.error("流水号写入失败", exception);