fix: 修改绑定表后清空字段绑定

haikang
huangfeng 1 year ago
parent 6726a910a3
commit 9aa334a495

@ -100,6 +100,13 @@ public class IcdFileConfigServiceImpl implements IcdFileConfigService {
throw new Exception("未找到该项"); throw new Exception("未找到该项");
} }
IcdConfigType r = optional.get(); IcdConfigType r = optional.get();
if (r.getTableName() != null && !r.getTableName().equals(item.getTableName())) {
List<IcdConfigTypeAtt> attList = attRepository.findByIcdConfigTypeId(r.getId());
for (IcdConfigTypeAtt att : attList) {
att.setColName(null);
}
attRepository.saveAll(attList);
}
r.setTableName(item.getTableName()); r.setTableName(item.getTableName());
repository.save(r); repository.save(r);
} }

Loading…
Cancel
Save