| | |
| | | //站点 |
| | | long count = siteService.count(new LambdaQueryWrapper<Site>().in(Site::getPartnerId, Arrays.asList(ids)).eq(Site::getDelFlag, 0)); |
| | | if(count > 0){ |
| | | return AjaxResult.error("当前合作商有关联站点,删除失败!"); |
| | | return AjaxResult.error("该合作商已关联站点不可删除!"); |
| | | } |
| | | //充电桩 |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().eq(TChargingPile::getPartnerId, Arrays.asList(ids)).eq(TChargingPile::getDelFlag, 0)); |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().in(TChargingPile::getPartnerId, Arrays.asList(ids)).eq(TChargingPile::getDelFlag, 0)); |
| | | if(count1 > 0){ |
| | | return AjaxResult.error("当前合作商有关联充电桩,删除失败!"); |
| | | return AjaxResult.error("该合作商已关联充电桩不可删除!"); |
| | | } |
| | | for (Integer id : ids) { |
| | | Partner partner = this.getById(id); |