package com.ssm.mapper.system;

import com.ssm.model.system.SysDepartment;
import com.ssm.model.system.SysDepartmentExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface SysDepartmentMapper {
    int countByExample(SysDepartmentExample example);

    int deleteByExample(SysDepartmentExample example);

    int deleteByPrimaryKey(Integer depid);

    int insert(SysDepartment record);

    int insertSelective(SysDepartment record);

    List<SysDepartment> selectByExampleWithBLOBs(SysDepartmentExample example);

    List<SysDepartment> selectByExample(SysDepartmentExample example);
    
    List<SysDepartment> selectAll();

    SysDepartment selectByPrimaryKey(Integer depid);

    int updateByExampleSelective(@Param("record") SysDepartment record, @Param("example") SysDepartmentExample example);

    int updateByExampleWithBLOBs(@Param("record") SysDepartment record, @Param("example") SysDepartmentExample example);

    int updateByExample(@Param("record") SysDepartment record, @Param("example") SysDepartmentExample example);

    int updateByPrimaryKeySelective(SysDepartment record);

    int updateByPrimaryKeyWithBLOBs(SysDepartment record);

    int updateByPrimaryKey(SysDepartment record);
    
    /**
	 * 查询所有部门
	 * */
	public List<SysDepartment> sysDepartmentList();
	
	/**
	 * 分页查询
	 * */
	public List<SysDepartment> sysDepartmentQuery(SysDepartment sysDepartment);
	
	public SysDepartment sysDepartmentParentid(@Param("parentid") Integer parentid);
	
	public Integer selectParentid(Integer parentid);
	
	public Integer selectMaxParentid(Integer parentid);
}