package com.lz.modules.flow.dao;
/**
* <p>
* 流转关系表 服务类
* </p>
*
* @author quyixiao
* @since 2020-08-18
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lz.modules.flow.entity.AuthDto;
import com.lz.modules.flow.entity.StaffMenu;
import com.lz.modules.flow.entity.StaffRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface StaffRoleMapper extends BaseMapper<StaffRole> {


	StaffRole selectStaffRoleById(@Param("id")Long id);


	Long insertStaffRole(StaffRole staffRole);


	int updateStaffRoleById(StaffRole staffRole);


	int updateCoverStaffRoleById(StaffRole staffRole);


	int deleteStaffRoleById(@Param("id")Long id);


    StaffRole selectByStaffId(@Param("staffId") Long staffId);

	List<StaffRole> selectByRole(@Param("departmentLevel") String departmentLevel);

    List<StaffRole> selectByCondition(@Param("page") IPage page, @Param("params") Map<String, Object> params);

	List<StaffRole> selectByGroupId(@Param("id") Long id);

    List<StaffRole> selectStaffRolesByStaffId(@Param("list") List<Long> mIds);

	List<StaffRole> selectByEvaluationGroupId(@Param("id") Long id);

    List<StaffRole> selectByRoleLevel(@Param("name") String name);

	List<StaffRole> selectPageByRoleLevel(@Param("page") IPage page, @Param("name") String name);

    StaffRole selectStaffRolesByStaffIdDepartmentLevel(@Param("staffId") Long staffId, @Param("departmentLevel") String departmentLevel);

	List<StaffRole> selectAllByStaffId(@Param("staffId") Long staffId);

    List<StaffMenu> selectAllMenus(@Param("userId") Long userId);

    List<StaffRole> selectMastRoles();

	List<StaffRole> selectAllGroupManageRoles();
	List<StaffRole> selectAllStaffRoleByDepartmentLevel(@Param("departmentLevels") List<String> departmentLevels);

	StaffRole selectStaffRolesByStaffIdDepartmentLevelList(@Param("staffId") Long staffId, @Param("departmentLevels") List<String> departmentLevels);


	List<StaffMenu> selectMenusByParentId(@Param("parentId") long parentId);

	List<StaffRole> selectStaffRolesByDepartmentLevelList(@Param("departmentLevels") List<String> departmentLevels);
}