package com.gx.obe.server.management.im.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gx.obe.server.management.im.entity.Department;

import java.util.List;

/** 
 * @Description: 
 * @author mazc 
 */
@Mapper
public interface DepartmentMapper extends BaseMapper<Department> {

	/**
	 * @Description: 批量更新
	 * @author mazc
	 * @param DepartmentList 
	 */
	Integer updateBatchList(@Param("DepartmentList") List<Department> DepartmentList);
	
	/**
	 * @Description: 批量插入
	 * @author mazc
	 * @param DepartmentList 
	 */
	Integer insertByBatch(@Param("DepartmentList") List<Department> DepartmentList);

	/**
     * @Description: 指定字段修改
     * @author chenxw
     * @param Department
	 * @param attributes
     */
    Integer updateAssignProperty(@Param("Department")Department Department, @Param("attributes")String[] attributes);
    
    /**
     * @Description: 批量指定字段修改
     * @author chenxw
     * @param DepartmentList
	 * @param attributes
     */
    Integer batchUpdateProperty(@Param("DepartmentList")List<Department> DepartmentList, @Param("attributes")String[] attributes);
    
    /**
     * @Description: 获得部门最大序号
     * @author mazc
     * @param parentId
     * @return 
     */
    Integer getMaxDepartmentSortNo(@Param("parentId") String parentId);
	
 
	/**
	 * @Description: 获得员工所属部门
	 * @author mazc
	 * @param employeeId
	 * @return 
	 */
	List<Department> getAssignedDepartment(@Param("employeeId") String employeeId);
    

}