|  |  | 
 |  |  | package com.dy.pipIrrIrrigate.irrigateUnit; | 
 |  |  |  | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pipIrrGlobal.daoIr.IrGroupUnitMapper; | 
 |  |  | import com.dy.pipIrrGlobal.daoIr.IrIrrigateUnitMapper; | 
 |  |  | import com.dy.pipIrrGlobal.daoIr.IrProjectMapper; | 
 |  |  | import com.dy.pipIrrGlobal.pojoIr.IrIrrigateUnit; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private IrIrrigateUnitMapper irIrrigateUnitMapper; | 
 |  |  |     @Autowired | 
 |  |  |     private IrGroupUnitMapper irGroupUnitMapper; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 创建灌溉单元 | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     public Integer deleteUnit(Long id) { | 
 |  |  |         int rows = irIrrigateUnitMapper.deleteLogicById(id); | 
 |  |  |         irGroupUnitMapper.deleteByUnitId(id); | 
 |  |  |         if (rows == 0) { | 
 |  |  |             return 0; | 
 |  |  |         } |