Commit b8f3031f authored by 赵啸非's avatar 赵啸非

修改部分一键部署功能

parent 186d35b7
......@@ -56,11 +56,11 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
*/
@Override
protected SiteBusinessEntity findBefore(SiteBusinessEntity params, PageInfo pageInfo, Context context) throws AppException {
if (!ObjectUtils.isEmpty(params.getIdNotList())) {
Set<Long> notIdSet = params.getIdNotList().stream().collect(Collectors.toSet());
if (!ObjectUtils.isEmpty(params.getBusinessIdNotList())) {
Set<Long> notIdSet = params.getBusinessIdNotList().stream().collect(Collectors.toSet());
//排除掉了父级,但是子集存在,需要吧父id排除到notlist外
SiteBusinessQuery siteBusinessQuery = new SiteBusinessQuery();
siteBusinessQuery.setIdList(params.getIdNotList());
siteBusinessQuery.setBusinessIdNotList(params.getBusinessIdNotList());
List<SiteBusinessEntity> rootSiteBusiness = this.find(siteBusinessQuery).stream().filter(f -> f.getIsBusiness() == IsBusinessEnum.一级业务.getValue()).collect(Collectors.toList());
for (SiteBusinessEntity root : rootSiteBusiness) {
SiteBusinessQuery query = new SiteBusinessQuery();
......@@ -79,7 +79,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
notIdSet.remove(root.getId());
}
}
params.setIdNotList(notIdSet.stream().collect(Collectors.toList()));
params.setBusinessIdNotList(notIdSet.stream().collect(Collectors.toList()));
}
......@@ -88,7 +88,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
@Override
protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException {
if (!ObjectUtils.isEmpty(params.getIdNotList())) {
if (!ObjectUtils.isEmpty(params.getBusinessIdNotList())) {
//排除掉已经存在的ids
log.info("idNotList:{}", JSON.toJSONString(params.getIdNotList()));
Iterator<SiteBusinessEntity> iterator = list.iterator();
......@@ -99,7 +99,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
siteBusinessQuery.setParentId(item.getBusinessId());
int count = this.count(siteBusinessQuery, context);
if (count > 0) {
siteBusinessQuery.setIdNotList(params.getIdNotList());
siteBusinessQuery.setBusinessIdNotList(params.getBusinessIdNotList());
List<SiteBusinessEntity> childs = this.find(siteBusinessQuery);
if (ObjectUtils.isEmpty(childs)) {
//子节点已经全部选中,删除父节点
......
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