Pu Zhibing
2024-09-26 22a9b4588c8eeefdb9e16fda9125af8c0b846b49
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileServiceImpl.java
@@ -228,9 +228,10 @@
   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);