| | |
| | | public AjaxResult delSite(Integer[] ids) { |
| | | //查询是否有关联数据 |
| | | //充电桩 |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().eq(TChargingPile::getSiteId, Arrays.asList(ids)).eq(TChargingPile::getDelFlag, 0)); |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().in(TChargingPile::getSiteId, Arrays.asList(ids)) |
| | | .eq(TChargingPile::getDelFlag, 0)); |
| | | if(count1 > 0){ |
| | | return AjaxResult.error("该站点有关联充电桩,删除失败!"); |
| | | return AjaxResult.error("该站点已添加充电桩,不可删除。"); |
| | | } |
| | | for (Integer id : ids) { |
| | | Site site = this.getById(id); |