| | |
| | | organizationMapper.update(null, deleteWrapper); |
| | | |
| | | //删除组织账号 |
| | | userService.deleteUserByOrganizationId(id); |
| | | userService.deleteUsersByOrganizationId(id); |
| | | |
| | | //判断是否含有子组织 |
| | | List<Organization> children = getAllChildrenOrganization(existOrganization.getId()); |
| | |
| | | updateWrapper.set("is_delete", Constants.DELETE); |
| | | organizationMapper.update(null, updateWrapper); |
| | | //删除所有子组织账号 |
| | | childrenId.forEach(value->userService.deleteUserByOrganizationId(value)); |
| | | childrenId.forEach(value->userService.deleteUsersByOrganizationId(value)); |
| | | |
| | | } else {//不删除 |
| | | //提取所有直属子组织id |
| | |
| | | queryWrapper.eq("is_delete", Constants.NOT_DELETE); |
| | | //查询所有组织 |
| | | List<Organization> organizations = organizationMapper.selectList(queryWrapper); |
| | | //判断form是否含有id,如果有则对所有组织进行过滤 |
| | | //判断form是否含有id,如果有则对其所有子组织进行过滤 |
| | | if(!ObjectUtils.isEmpty(id)){ |
| | | List<Organization> children = getAllChildrenOrganization(id); |
| | | List<Integer> thisAndchildrenIds = new ArrayList<>();//该id以及其所有子组织的id集合 |