Beispiel #1
0
 /**
  * 删除实体
  *
  * @param m 实体
  */
 @Override
 public void delete(final M m) {
   if (m == null) {
     return;
   }
   if (m instanceof LogicDeleteable) {
     ((LogicDeleteable) m).markDeleted();
     save(m);
   } else {
     super.delete(m);
   }
 }
Beispiel #2
0
 /**
  * 删除实体
  *
  * @param m 实体
  */
 @Transactional
 public void delete(M m) {
   if (m == null) {
     return;
   }
   if (m != null && m instanceof LogicDeleteable) {
     ((LogicDeleteable) m).markDeleted();
     baseRepository.save(m);
   } else {
     baseRepository.delete(m);
   }
 }