Commit 2d6a2df5 authored by 赵啸非's avatar 赵啸非

添加站点

parent f82f7626
...@@ -85,7 +85,7 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si ...@@ -85,7 +85,7 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si
if (ObjectUtils.isEmpty(entity.getSiteId())) return null; if (ObjectUtils.isEmpty(entity.getSiteId())) return null;
if (platFormType.equalsIgnoreCase(PlatformTypeEnum.STANDALONE.getValue())) { if (platFormType.equalsIgnoreCase(PlatformTypeEnum.STANDALONE.getValue())) {
//根据返回的id 筛选列表 //根据返回的id 筛选列表
Map<Long, SitestatEntity> collectMap = this.findToMap(new SitestatEntity(), context); Map<Long, SitestatEntity> collectMap = this.find(new SitestatEntity(), context).stream().collect(Collectors.toMap(x->x.getSiteId(),y->y,(o,n)->n));
List<SitestatEntity> list = this.siteService.find(new SiteQuery().id(entity.getSiteId())).stream().filter(f -> collectMap.containsKey(f.getId())).map(m -> collectMap.get(m.getId())).collect(Collectors.toList()); List<SitestatEntity> list = this.siteService.find(new SiteQuery().id(entity.getSiteId())).stream().filter(f -> collectMap.containsKey(f.getId())).map(m -> collectMap.get(m.getId())).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(entity.getSiteName())) { if (!ObjectUtils.isEmpty(entity.getSiteName())) {
list = MemoryPagination.search(entity.getSiteName(), list); list = MemoryPagination.search(entity.getSiteName(), list);
...@@ -101,7 +101,7 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si ...@@ -101,7 +101,7 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si
log.info("siteList:{}",JSON.toJSONString(result)); log.info("siteList:{}",JSON.toJSONString(result));
if (result.getCode() == YesNoEnum.YES.getValue()) { if (result.getCode() == YesNoEnum.YES.getValue()) {
//根据返回的id 筛选列表 //根据返回的id 筛选列表
Map<Long, SitestatEntity> collectMap = this.findToMap(new SitestatEntity(), context); Map<Long, SitestatEntity> collectMap = this.find(new SitestatEntity(), context).stream().collect(Collectors.toMap(x->x.getSiteId(),y->y,(o,n)->n));
List<SitestatEntity> list = result.getData().stream().filter(f -> collectMap.containsKey(f.getId())).map(m -> collectMap.get(m.getId())).collect(Collectors.toList()); List<SitestatEntity> list = result.getData().stream().filter(f -> collectMap.containsKey(f.getId())).map(m -> collectMap.get(m.getId())).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(entity.getSiteName())) { if (!ObjectUtils.isEmpty(entity.getSiteName())) {
list = MemoryPagination.search(entity.getSiteName(), list); list = MemoryPagination.search(entity.getSiteName(), list);
......
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