Skip to content

Commit 090412a

Browse files
committed
chore: 优化部分代码格式
1 parent 41583ea commit 090412a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

continew-plugin/continew-plugin-generator/src/main/java/top/continew/admin/generator/service/impl/GeneratorServiceImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ public List<FieldConfigDO> listFieldConfig(String tableName, Boolean requireSync
158158
Set<Map.Entry<String, List<String>>> typeMappingEntrySet = typeMappingMap.entrySet();
159159
// 新增或更新字段配置
160160
Map<String, FieldConfigDO> fieldConfigMap = fieldConfigList.stream()
161-
.collect(Collectors.toMap(FieldConfigDO::getColumnName, Function.identity(), (key1, key2) -> key2));
161+
.collect(Collectors.toMap(FieldConfigDO::getColumnName, Function.identity(), (existing,
162+
replacement) -> existing));
162163
int i = 1;
163164
for (Column column : columnList) {
164165
FieldConfigDO fieldConfig = Optional.ofNullable(fieldConfigMap.get(column.getName()))

continew-system/src/main/java/top/continew/admin/system/service/impl/OptionServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public Map<String, String> getByCategory(OptionCategoryEnum category) {
7070
return baseMapper.selectByCategory(category.name())
7171
.stream()
7272
.collect(Collectors.toMap(OptionDO::getCode, o -> StrUtil.emptyIfNull(ObjectUtil.defaultIfNull(o
73-
.getValue(), o.getDefaultValue())), (oldVal, newVal) -> oldVal));
73+
.getValue(), o.getDefaultValue())), (existing, replacement) -> existing));
7474
}
7575

7676
@Override
@@ -91,7 +91,7 @@ public void update(List<OptionReq> options) {
9191
Map<String, String> passwordPolicyOptionMap = options.stream()
9292
.filter(option -> StrUtil.startWith(option.getCode(), PasswordPolicyEnum.CATEGORY
9393
.name() + StringConstants.UNDERLINE))
94-
.collect(Collectors.toMap(OptionReq::getCode, OptionReq::getValue, (oldVal, newVal) -> oldVal));
94+
.collect(Collectors.toMap(OptionReq::getCode, OptionReq::getValue, (existing, replacement) -> existing));
9595
for (Map.Entry<String, String> passwordPolicyOptionEntry : passwordPolicyOptionMap.entrySet()) {
9696
String code = passwordPolicyOptionEntry.getKey();
9797
String value = passwordPolicyOptionEntry.getValue();

0 commit comments

Comments
 (0)