|  |  | 
 |  |  |  | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pipIrrBase.user.QueryVo; | 
 |  |  | import com.dy.pipIrrGlobal.daoBa.BaClientMapper; | 
 |  |  | import com.dy.pipIrrGlobal.daoBa.BaClientTypeMapper; | 
 |  |  | import com.dy.pipIrrGlobal.pojoBa.BaClientType; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | 
 |  |  | public class ClientTypeSv { | 
 |  |  |  | 
 |  |  |     private BaClientTypeMapper dao; | 
 |  |  |     private BaClientMapper cdao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private void setDao(BaClientTypeMapper dao){ | 
 |  |  |         this.dao = dao; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private void setDao(BaClientMapper dao){ | 
 |  |  |         this.cdao = dao; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询某类型农户总数 | 
 |  |  |      * @param typeId 农户类型ID | 
 |  |  |      * @return 总数 | 
 |  |  |      */ | 
 |  |  |     public Long selectClientByType(Long typeId){ | 
 |  |  |         return this.cdao.selectCountByType(typeId) ; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 得到所有农户类型 | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Transactional | 
 |  |  |     public int delete(Long id){ | 
 |  |  |         //int count = this.dao.deleteLogicById(id) ; | 
 |  |  |         //逻辑删除,所以不实际删除其关联的权限 | 
 |  |  |         //if(count > 0){ | 
 |  |  |         //    this.rolePrivDao.deleteByRoleId(id) ; | 
 |  |  |         //} | 
 |  |  |         //return count ; | 
 |  |  |         return 0 ;// this.dao.deleteLogicById(id) ; | 
 |  |  |         return this.dao.deleteById(id) ; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  |