|
@@ -84,12 +84,14 @@ public class InformClassifyServiceImpl extends ServiceImpl<InformClassifyMapper,
|
|
|
validEntityBeforeSave(update);
|
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
if (bo.getStatus() == -1) {
|
|
|
+ //递归删除
|
|
|
findCompanyAndDepts(bo);
|
|
|
}
|
|
|
return this.updateById(update);
|
|
|
}
|
|
|
|
|
|
public Boolean findCompanyAndDepts(InformClassifyEditBo bo){
|
|
|
+ //查询所有子级删除
|
|
|
LambdaQueryWrapper<InformClassify> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(InformClassify::getParentId, bo.getClassifyId());
|
|
|
List<InformClassify> list = this.list(lqw);
|
|
@@ -100,6 +102,7 @@ public class InformClassifyServiceImpl extends ServiceImpl<InformClassifyMapper,
|
|
|
informClassify.setStatus(-1);
|
|
|
informClassify.setUpdateTime(DateUtils.getNowTime());
|
|
|
baseMapper.update(informClassify, lqw);
|
|
|
+ //递归调用
|
|
|
getDepts(informClassify.getClassifyId());
|
|
|
}
|
|
|
|
|
@@ -113,6 +116,7 @@ public class InformClassifyServiceImpl extends ServiceImpl<InformClassifyMapper,
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean getDepts(Long id){
|
|
|
+ //查询所有子级删除
|
|
|
LambdaQueryWrapper<InformClassify> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(InformClassify::getParentId, id);
|
|
|
List<InformClassify> list = this.list(lqw);
|