|
|
|
@ -23,6 +23,7 @@ public class IcdTransformServiceImpl implements IcdTransformService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IcdTransform addTransform(IcdTransform icdTransform) {
|
|
|
|
|
icdTransform.setId(null);
|
|
|
|
|
IcdTransform save = transformRepository.save(icdTransform);
|
|
|
|
|
return save;
|
|
|
|
|
}
|
|
|
|
@ -31,7 +32,7 @@ public class IcdTransformServiceImpl implements IcdTransformService {
|
|
|
|
|
public void deleteTransform(Integer id) throws Exception {
|
|
|
|
|
Optional<IcdTransform> byId = transformRepository.findById(id);
|
|
|
|
|
if (!byId.isPresent()) {
|
|
|
|
|
throw new BusinessException("所需要删除的id不存在!");
|
|
|
|
|
throw new BusinessException("未找到该记录!");
|
|
|
|
|
}
|
|
|
|
|
transformRepository.deleteById(id);
|
|
|
|
|
}
|
|
|
|
|