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

修改部分一键部署功能

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