|
|
@@ -89,7 +89,9 @@ public class TbUserInfrService {
|
|
|
@Transactional
|
|
|
public TbUserInfrDto deleteById(String id) {
|
|
|
TbUserInfr entity = requireOne(id);
|
|
|
- this.repo.deleteById(id);
|
|
|
+ entity.setDelete();
|
|
|
+ //this.repo.deleteById(id);
|
|
|
+ this.repo.save(entity);
|
|
|
return entity.toDto();
|
|
|
}
|
|
|
|
|
|
@@ -98,11 +100,12 @@ public class TbUserInfrService {
|
|
|
public List<TbUserInfrDto> deleteByIds(List<String> ids) {
|
|
|
List<TbUserInfrDto> result = new ArrayList<>();
|
|
|
for (String id : ids) {
|
|
|
- Optional<TbUserInfr> obj = this.repo.findById(id);
|
|
|
- if (obj.isPresent()) {
|
|
|
- this.repo.deleteById(id);
|
|
|
- result.add(obj.get().toDto());
|
|
|
- }
|
|
|
+ deleteById(id);
|
|
|
+// Optional<TbUserInfr> obj = this.repo.findById(id);
|
|
|
+// if (obj.isPresent()) {
|
|
|
+// this.repo.deleteById(id);
|
|
|
+// result.add(obj.get().toDto());
|
|
|
+// }
|
|
|
}
|
|
|
return result;
|
|
|
}
|