设备配置调整

This commit is contained in:
tiger_zhou 2023-08-23 10:57:57 +08:00
parent e338026749
commit a23ff507c0

View File

@ -68,7 +68,7 @@ public class DeviceGuardConfigService {
return guardConfig;
}
public void saveOrUpdate(List<DeviceGuardConfigDto> dto) {
public void saveOrUpdate(List<DeviceGuardConfig> dto) {
/* LambdaQueryWrapper<DeviceGuardConfig> 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<DeviceGuardConfig> 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());
}