diff --git a/continew-plugin/continew-plugin-generator/src/main/java/top/continew/admin/generator/service/impl/GeneratorServiceImpl.java b/continew-plugin/continew-plugin-generator/src/main/java/top/continew/admin/generator/service/impl/GeneratorServiceImpl.java index 1306de0a..a2115502 100644 --- a/continew-plugin/continew-plugin-generator/src/main/java/top/continew/admin/generator/service/impl/GeneratorServiceImpl.java +++ b/continew-plugin/continew-plugin-generator/src/main/java/top/continew/admin/generator/service/impl/GeneratorServiceImpl.java @@ -158,7 +158,8 @@ public class GeneratorServiceImpl implements GeneratorService { Set>> typeMappingEntrySet = typeMappingMap.entrySet(); // 新增或更新字段配置 Map fieldConfigMap = fieldConfigList.stream() - .collect(Collectors.toMap(FieldConfigDO::getColumnName, Function.identity(), (key1, key2) -> key2)); + .collect(Collectors.toMap(FieldConfigDO::getColumnName, Function.identity(), (existing, + replacement) -> existing)); int i = 1; for (Column column : columnList) { FieldConfigDO fieldConfig = Optional.ofNullable(fieldConfigMap.get(column.getName())) diff --git a/continew-system/src/main/java/top/continew/admin/system/service/impl/OptionServiceImpl.java b/continew-system/src/main/java/top/continew/admin/system/service/impl/OptionServiceImpl.java index c81a7f39..9bcf223d 100644 --- a/continew-system/src/main/java/top/continew/admin/system/service/impl/OptionServiceImpl.java +++ b/continew-system/src/main/java/top/continew/admin/system/service/impl/OptionServiceImpl.java @@ -70,7 +70,7 @@ public class OptionServiceImpl implements OptionService { return baseMapper.selectByCategory(category.name()) .stream() .collect(Collectors.toMap(OptionDO::getCode, o -> StrUtil.emptyIfNull(ObjectUtil.defaultIfNull(o - .getValue(), o.getDefaultValue())), (oldVal, newVal) -> oldVal)); + .getValue(), o.getDefaultValue())), (existing, replacement) -> existing)); } @Override @@ -91,7 +91,7 @@ public class OptionServiceImpl implements OptionService { Map passwordPolicyOptionMap = options.stream() .filter(option -> StrUtil.startWith(option.getCode(), PasswordPolicyEnum.CATEGORY .name() + StringConstants.UNDERLINE)) - .collect(Collectors.toMap(OptionReq::getCode, OptionReq::getValue, (oldVal, newVal) -> oldVal)); + .collect(Collectors.toMap(OptionReq::getCode, OptionReq::getValue, (existing, replacement) -> existing)); for (Map.Entry passwordPolicyOptionEntry : passwordPolicyOptionMap.entrySet()) { String code = passwordPolicyOptionEntry.getKey(); String value = passwordPolicyOptionEntry.getValue();