| | |
| | | return updateById(update); |
| | | } |
| | | |
| | | public boolean deleteGroup(Long groupId) { |
| | | PoleGroup poleGroup = getById(groupId); |
| | | if (poleGroup == null) { |
| | | public boolean deleteGroup(List<Long> groupIds) { |
| | | List<PoleGroup> poleGroups = listByIds(groupIds); |
| | | if (poleGroups.isEmpty()) { |
| | | throw new BusinessException("未找到该分组"); |
| | | } |
| | | /** |
| | | * 刪除 |
| | | */ |
| | | poleGroupRelationService.remove(Wrappers.lambdaQuery(PoleGroupRelation.class).eq(PoleGroupRelation::getPoleGroupId, groupId)); |
| | | return removeById(groupId); |
| | | poleGroupRelationService.remove(Wrappers.lambdaQuery(PoleGroupRelation.class).in(PoleGroupRelation::getPoleGroupId, groupIds)); |
| | | return removeByIds(groupIds); |
| | | } |
| | | |
| | | public List<PoleGroup> groupList(BaseConditionVO baseConditionVO, String keyword, Integer order, Integer seq) { |