package im.zksy.yjmqserver.system.mapper;

import im.zksy.yjmqserver.system.model.DeptTree;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DeptTreeMapper {

    int deleteByPrimaryKey(String deptId);

    int insert(DeptTree dept);

    DeptTree selectByPrimaryKey(String deptId);

    int updateByPrimaryKey(DeptTree dept);

    List<DeptTree> selectByParentId(@Param("parentId") String parentId);

    List<DeptTree> selectAllTree(@Param("parent_id")String parent_id);

    List<String> selectChildrenIDByPrimaryKey(@Param("deptId") String deptId);

    int selectMaxOrderNum();

    int swapSort(@Param("currentId") Integer currentId, @Param("swapId") Integer swapId);

}