diff --git a/src/main/java/club/joylink/xiannccda/service/config/DeviceGuardConfigService.java b/src/main/java/club/joylink/xiannccda/service/config/DeviceGuardConfigService.java index 724c891..99e6f9a 100644 --- a/src/main/java/club/joylink/xiannccda/service/config/DeviceGuardConfigService.java +++ b/src/main/java/club/joylink/xiannccda/service/config/DeviceGuardConfigService.java @@ -68,7 +68,7 @@ public class DeviceGuardConfigService { return guardConfig; } - public void saveOrUpdate(List dto) { + public void saveOrUpdate(List dto) { /* LambdaQueryWrapper qw = Wrappers.lambdaQuery(DeviceGuardConfig.class); qw.eq(DeviceGuardConfig::getLineId, dto.getLineId()) .eq(DeviceGuardConfig::getConfigType, DeviceGuardConfig.CONFIG_TYPE_USER) @@ -83,9 +83,8 @@ public class DeviceGuardConfigService { } Long typeCounter = this.configRepository.count(qw); BusinessExceptionAssertEnum.UNIQUE_FIELD_REPEAT.assertTrue(typeCounter <= 0L, "重复的数据类型");*/ - List configList = dto.stream().map(this::convertDB).collect(Collectors.toList()); - this.configRepository.saveOrUpdateBatch(configList); + this.configRepository.saveOrUpdateBatch(dto); GUARD_CONFIG_CACHE.invalidate(dto.get(0).getLineId()); }