提交 3d12a2cd 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibiz-rt,ibizlab-runtime]

上级 d5995fe7
...@@ -90,6 +90,9 @@ public class DELogicAspect { ...@@ -90,6 +90,9 @@ public class DELogicAspect {
if (entity != null) { if (entity != null) {
executeBeforeLogic(entity, action); executeBeforeLogic(entity, action);
Object result = point.proceed(); Object result = point.proceed();
if("get".equalsIgnoreCase(action) && result instanceof EntityBase){
entity = (EntityBase) result;
}
executeLogic(entity, action); executeLogic(entity, action);
executeAfterLogic(entity, action); executeAfterLogic(entity, action);
return result; return result;
......
...@@ -59,15 +59,15 @@ public class LayeringCache extends AbstractValueAdaptingCache { ...@@ -59,15 +59,15 @@ public class LayeringCache extends AbstractValueAdaptingCache {
@Override @Override
public ValueWrapper get(Object key) { public ValueWrapper get(Object key) {
ValueWrapper wrapper = caffeineCache.get(key); ValueWrapper wrapper = caffeineCache.get(key);
Object value=ObjectUtils.isEmpty(wrapper)?null:wrapper.get(); Object value = ObjectUtils.isEmpty(wrapper) ? null : wrapper.get();
log.debug("查询一级缓存 key:{} ,value:{}", key,value); log.debug("查询一级缓存 key:{} ", key, value);
if (ObjectUtils.isEmpty(value)) { if (ObjectUtils.isEmpty(value)) {
wrapper = redisCache.get(key); wrapper = redisCache.get(key);
value=ObjectUtils.isEmpty(wrapper)?null:wrapper.get(); value = ObjectUtils.isEmpty(wrapper) ? null : wrapper.get();
log.debug("查询二级缓存 key:{} ,value:{}", key,value); log.debug("查询二级缓存 key:{} ", key);
if(!ObjectUtils.isEmpty(value)){ if (!ObjectUtils.isEmpty(value)) {
caffeineCache.put(key, value); caffeineCache.put(key, value);
log.debug("查询二级缓存,并将数据放到一级缓存。 key:{} ,value:{}", key,value); log.debug("查询二级缓存,并将数据放到一级缓存。 key:{} ", key);
} }
} }
return wrapper; return wrapper;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册