提交 65c85e90 编写于 作者: zhouweidong's avatar zhouweidong

主键判断

上级 a46449c0
......@@ -93,6 +93,10 @@ public class DELogicAspect {
if ("remove".equalsIgnoreCase(action) || "get".equalsIgnoreCase(action)) {
entity = getEntity(service);
String id = DEFieldCacheMap.getDEKeyField(entity.getClass());
if(StringUtils.isEmpty(id)) {
log.debug("无法获取实体主键属性[{}]",entity.getClass().getSimpleName());
return point.proceed();
}
entity.set(id, arg);
} else if (arg instanceof EntityBase) {
entity = (EntityBase) arg;
......@@ -582,6 +586,10 @@ public class DELogicAspect {
if ("remove".equalsIgnoreCase(action) || "get".equalsIgnoreCase(action)) {
entity = getEntity(service);
String id = DEFieldCacheMap.getDEKeyField(entity.getClass());
if(StringUtils.isEmpty(id)) {
log.debug("无法获取实体主键属性[{}]",entity.getClass().getSimpleName());
return point.proceed();
}
entity.set(id, arg);
} else if (arg instanceof EntityBase) {
entity = (EntityBase) arg;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册