Commit 669632d0 authored by 赵啸非's avatar 赵啸非

添加查询缓存

parent d03ad9e6
......@@ -69,7 +69,7 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
public Result<WindowBusinessEntity> find(WindowBusinessEntity entity, PageInfo pageInfo, Context context) throws AppException {
WindowBusinessEntity query = this.findBefore(entity, pageInfo, context);
//判断查询结果是否用缓存
if (!ObjectUtils.isEmpty(query) && !ObjectUtils.isEmpty(query.getSearchCache() == YesNoEnum.YES.getValue())) {
if (!ObjectUtils.isEmpty(query) &&!ObjectUtils.isEmpty(query.getSearchCache()) && !ObjectUtils.isEmpty(query.getSearchCache() == YesNoEnum.YES.getValue())) {
//根据查询条件 获取缓存,如果缓存有则直接取缓存,否则读数据库后 再写入缓存
return getWindowBusinessEntityCacheResult(entity, pageInfo, context, query);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment