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

import java.util.List;

@Mapper
public interface StaffRoleDepartmentMapper extends BaseMapper<StaffRoleDepartment> {


	StaffRoleDepartment selectStaffRoleDepartmentById(@Param("id")Long id);


	Long insertStaffRoleDepartment(StaffRoleDepartment staffRoleDepartment);


	int updateStaffRoleDepartmentById(StaffRoleDepartment staffRoleDepartment);


	int updateCoverStaffRoleDepartmentById(StaffRoleDepartment staffRoleDepartment);


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


    List<StaffRoleDepartment> selectStaffRoleDepartmentByStaffRoleId(@Param("staffRoleId") Long staffRoleId);

    StaffRoleDepartment selectStaffRoleDepartmentByDepartmentId(@Param("departmentId") Long departmentId);

	StaffRoleDepartment selectStaffRoleDepartmentByDepartmentIdRoleIds(@Param("departmentId") Long departmentId, @Param("ids") List<Long> ids);

	void deleteStaffRoleDepartment(@Param("id") Long id);

    List<StaffRoleDepartment> selectStaffRoleDepartmentByStaffRoleIdDepartments(@Param("staffRoleId") Long staffRoleId, @Param("departments") List<String> departments);

    List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(@Param("ids") List<String> ids);

    void deleteStaffRoleDepartmentByRoleId(@Param("roleId") Long roleId);
}