Skip to content

Commit

Permalink
增加physicalDeleteByPk
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Feb 22, 2019
1 parent 51a781b commit 616ba60
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,16 @@ public E deleteByPk(PK pk) {
.where(GenericEntity.id, pk)
.exec();
} else {
physicalDeleteByPk(pk);
if (!physicalDeleteByPk(pk)) {
logger.warn("物理删除数据失败,主键:{}", pk);
}
}
return old;
}

protected boolean physicalDeleteByPk(PK pk) {
//createDelete().where(GenericEntity.id,pk).exec()>0;

return getDao().deleteByPk(pk) > 0;
}

Expand Down

0 comments on commit 616ba60

Please sign in to comment.