| | |
| | | public AjaxResult delChargingPile(Integer[] ids) { |
| | | //检查是否有关联数据 |
| | | //接口 |
| | | long count = chargingGunService.count(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getChargingPileId, Arrays.asList(ids)).eq(TChargingGun::getDelFlag, 0)); |
| | | long count = chargingGunService.count(new LambdaQueryWrapper<TChargingGun>().in(TChargingGun::getChargingPileId, Arrays.asList(ids)) |
| | | .eq(TChargingGun::getDelFlag, 0)); |
| | | if(count > 0){ |
| | | return AjaxResult.error("该充电桩有关联的接口数据,删除失败!"); |
| | | return AjaxResult.error("该充电桩已添加接口,不可删除。"); |
| | | } |
| | | for (Integer id : ids) { |
| | | TChargingPile chargingPile = this.getById(id); |