| | |
| | | throw new BusinessException("删除任务失败"); |
| | | } |
| | | |
| | | boolean del; |
| | | // 删除绑定灯杆 |
| | | if (!lightTaskPoleRelationService.remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).in(LightTaskPoleRelation::getTaskId, taskIdList))) { |
| | | throw new BusinessException("删除绑定灯杆失败"); |
| | | } |
| | | // if (!lightTaskPoleRelationService.remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).notIn(LightTaskPoleRelation::getTaskId, taskIdList))) { |
| | | // throw new BusinessException("未找到任务/灯杆绑定关系"); |
| | | // } |
| | | // lightTaskPoleRelationService.remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).in(LightTaskPoleRelation::getTaskId, taskIdList)); |
| | | taskIdList.forEach( |
| | | taskId->{ |
| | | lightTaskPoleRelationService.remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).eq(LightTaskPoleRelation::getTaskId,taskId)); |
| | | } |
| | | ); |
| | | |
| | | return true; |
| | | } |