chore: 优化部分代码格式

This commit is contained in:
2025-11-16 20:52:47 +08:00
parent 41583ea61b
commit 090412a575
2 changed files with 4 additions and 3 deletions

View File

@@ -158,7 +158,8 @@ public class GeneratorServiceImpl implements GeneratorService {
Set<Map.Entry<String, List<String>>> typeMappingEntrySet = typeMappingMap.entrySet();
// 新增或更新字段配置
Map<String, FieldConfigDO> 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()))

View File

@@ -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<String, String> 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<String, String> passwordPolicyOptionEntry : passwordPolicyOptionMap.entrySet()) {
String code = passwordPolicyOptionEntry.getKey();
String value = passwordPolicyOptionEntry.getValue();