mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-12-08 09:01:41 +08:00
chore: 优化部分代码格式
This commit is contained in:
@@ -158,7 +158,8 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||||||
Set<Map.Entry<String, List<String>>> typeMappingEntrySet = typeMappingMap.entrySet();
|
Set<Map.Entry<String, List<String>>> typeMappingEntrySet = typeMappingMap.entrySet();
|
||||||
// 新增或更新字段配置
|
// 新增或更新字段配置
|
||||||
Map<String, FieldConfigDO> fieldConfigMap = fieldConfigList.stream()
|
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;
|
int i = 1;
|
||||||
for (Column column : columnList) {
|
for (Column column : columnList) {
|
||||||
FieldConfigDO fieldConfig = Optional.ofNullable(fieldConfigMap.get(column.getName()))
|
FieldConfigDO fieldConfig = Optional.ofNullable(fieldConfigMap.get(column.getName()))
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class OptionServiceImpl implements OptionService {
|
|||||||
return baseMapper.selectByCategory(category.name())
|
return baseMapper.selectByCategory(category.name())
|
||||||
.stream()
|
.stream()
|
||||||
.collect(Collectors.toMap(OptionDO::getCode, o -> StrUtil.emptyIfNull(ObjectUtil.defaultIfNull(o
|
.collect(Collectors.toMap(OptionDO::getCode, o -> StrUtil.emptyIfNull(ObjectUtil.defaultIfNull(o
|
||||||
.getValue(), o.getDefaultValue())), (oldVal, newVal) -> oldVal));
|
.getValue(), o.getDefaultValue())), (existing, replacement) -> existing));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -91,7 +91,7 @@ public class OptionServiceImpl implements OptionService {
|
|||||||
Map<String, String> passwordPolicyOptionMap = options.stream()
|
Map<String, String> passwordPolicyOptionMap = options.stream()
|
||||||
.filter(option -> StrUtil.startWith(option.getCode(), PasswordPolicyEnum.CATEGORY
|
.filter(option -> StrUtil.startWith(option.getCode(), PasswordPolicyEnum.CATEGORY
|
||||||
.name() + StringConstants.UNDERLINE))
|
.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()) {
|
for (Map.Entry<String, String> passwordPolicyOptionEntry : passwordPolicyOptionMap.entrySet()) {
|
||||||
String code = passwordPolicyOptionEntry.getKey();
|
String code = passwordPolicyOptionEntry.getKey();
|
||||||
String value = passwordPolicyOptionEntry.getValue();
|
String value = passwordPolicyOptionEntry.getValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user