Commit 0a717dff authored by 赵啸非's avatar 赵啸非

添加业务修改通知php

parent f9dfc543
...@@ -6,7 +6,6 @@ import com.mortals.framework.model.Context; ...@@ -6,7 +6,6 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.xhx.common.code.BusinessTypeEnum;
import com.mortals.xhx.common.code.IsBusinessEnum; import com.mortals.xhx.common.code.IsBusinessEnum;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.business.model.BusinessMatterEntity; import com.mortals.xhx.module.business.model.BusinessMatterEntity;
...@@ -88,8 +87,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -88,8 +87,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException { protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException {
if (!ObjectUtils.isEmpty(params.getIdNotList())) { if (!ObjectUtils.isEmpty(params.getIdNotList())) {
//排除掉已经存在的ids //排除掉已经存在的ids
log.info("idNotList:{}", JSON.toJSONString(params.getIdNotList())); log.info("idNotList:{}", JSON.toJSONString(params.getIdNotList()));
Iterator<SiteBusinessEntity> iterator = list.iterator(); Iterator<SiteBusinessEntity> iterator = list.iterator();
...@@ -184,13 +181,17 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -184,13 +181,17 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
@Override @Override
protected void removeBefore(Long[] ids, Context context) throws AppException { protected void removeBefore(Long[] ids, Context context) throws AppException {
Long[] childIds = Arrays.asList(ids).stream() List<SiteBusinessEntity> collect = Arrays.asList(ids).stream()
.flatMap(item -> { .flatMap(item -> {
SiteBusinessEntity siteBusinessEntity = this.get(item); SiteBusinessEntity siteBusinessEntity = this.get(item);
return this.find(new SiteBusinessQuery().parentId(siteBusinessEntity.getBusinessId())).stream(); return this.find(new SiteBusinessQuery().parentId(siteBusinessEntity.getBusinessId())).stream();
}).map(item -> item.getId()).toArray(Long[]::new); }).collect(Collectors.toList());
Long[] childIds = collect.stream().map(item->item.getId()).toArray(Long[]::new);
Long[] bussinessIds = collect.stream().map(item->item.getBusinessId()).toArray(Long[]::new);
businessService.remove(bussinessIds,context);
this.getDao().delete(childIds); this.getDao().delete(childIds);
} }
......
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