Commit 22ef8ce7 authored by 赵啸非's avatar 赵啸非

修改部分一键部署功能

parent e36f0838
......@@ -210,30 +210,29 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
private void updateWindowBusinessCacheResult(WindowBusinessEntity entity, Context context) {
Long siteBusinessId = entity.getSiteBusinessId();
String cacheResult = cacheService.get(KEY_SEARCH_SITEBUSINESSID_CACHE + siteBusinessId, String.class);
if (!ObjectUtils.isEmpty(cacheResult)) {
//更新查询结果
//查询数据库
PageInfo pageInfo = new PageInfo();
pageInfo.setPrePageResult(-1);
Result<WindowBusinessEntity> result = this.dao.getList(new WindowBusinessQuery().siteBusinessId(siteBusinessId), pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_SITEBUSINESSID_CACHE + siteBusinessId, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
//更新查询结果
//查询数据库
PageInfo pageInfo = new PageInfo();
pageInfo.setPrePageResult(-1);
Result<WindowBusinessEntity> result = this.dao.getList(new WindowBusinessQuery().siteBusinessId(siteBusinessId), pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_SITEBUSINESSID_CACHE + siteBusinessId, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
Long windowId = entity.getWindowId();
cacheResult = cacheService.get(KEY_SEARCH_WINDOWID_CACHE + windowId, String.class);
if (!ObjectUtils.isEmpty(cacheResult)) {
//查询数据库
PageInfo pageInfo = new PageInfo();
pageInfo.setPrePageResult(-1);
Result<WindowBusinessEntity> result = this.dao.getList(new WindowBusinessQuery().siteBusinessId(siteBusinessId), pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
//无查询结果的不做保存
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_WINDOWID_CACHE + windowId, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
cacheService.get(KEY_SEARCH_WINDOWID_CACHE + windowId, String.class);
//查询数据库
pageInfo = new PageInfo();
pageInfo.setPrePageResult(-1);
result = this.dao.getList(new WindowBusinessQuery().siteBusinessId(siteBusinessId), pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
//无查询结果的不做保存
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_WINDOWID_CACHE + windowId, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
//窗口列表更新
......@@ -248,15 +247,16 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
WindowBusinessQuery windowBusinessQuery = new WindowBusinessQuery();
windowBusinessQuery.setWindowIdList(windowIdlist);
//查询数据库
PageInfo pageInfo = new PageInfo();
pageInfo = new PageInfo();
pageInfo.setPrePageResult(-1);
Result<WindowBusinessEntity> result = this.dao.getList(windowBusinessQuery, pageInfo);
result = this.dao.getList(windowBusinessQuery, pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
if (!ObjectUtils.isEmpty(result.getList())) {
String windowIdlistStr = windowIdlist.stream().map(String::valueOf).collect(Collectors.joining("#"));
cacheService.set(KEY_SEARCH_WINDOWID_LIST_CACHE + windowIdlistStr, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
} 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