package com.lz.modules.flow.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.app.dto.DepartmentsSimpleDto;
import com.lz.modules.flow.dao.StaffRoleDepartmentMapper;
import com.lz.modules.flow.entity.StaffRoleDepartment;
import com.lz.modules.flow.service.StaffRoleDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* <p>
* 流转关系表 服务类
* </p>
*
* @author quyixiao
* @since 2020-08-18
*/

@Service
public class StaffRoleDepartmentServiceImpl extends ServiceImpl<StaffRoleDepartmentMapper, StaffRoleDepartment> implements StaffRoleDepartmentService {


    @Autowired
	private StaffRoleDepartmentMapper staffRoleDepartmentMapper;



	@Override
	public StaffRoleDepartment selectStaffRoleDepartmentById(Long id){
		return staffRoleDepartmentMapper.selectStaffRoleDepartmentById(id);
	}



	@Override
	public Long insertStaffRoleDepartment(StaffRoleDepartment staffRoleDepartment){
		return staffRoleDepartmentMapper.insertStaffRoleDepartment(staffRoleDepartment);
	}



	@Override
	public int updateStaffRoleDepartmentById(StaffRoleDepartment staffRoleDepartment){
		return staffRoleDepartmentMapper.updateStaffRoleDepartmentById(staffRoleDepartment);
	}



	@Override
	public int updateCoverStaffRoleDepartmentById(StaffRoleDepartment staffRoleDepartment){
		return staffRoleDepartmentMapper.updateCoverStaffRoleDepartmentById(staffRoleDepartment);
	}



	@Override
	public int deleteStaffRoleDepartmentById(Long id){
		return staffRoleDepartmentMapper.deleteStaffRoleDepartmentById(id);
	}

    @Override
    public List<StaffRoleDepartment> selectStaffRoleDepartmentByStaffRoleId(Long staffRoleId) {
        return staffRoleDepartmentMapper.selectStaffRoleDepartmentByStaffRoleId(staffRoleId);
    }

    @Override
    public StaffRoleDepartment selectStaffRoleDepartmentByDepartmentId(Long departmentId) {
        return staffRoleDepartmentMapper.selectStaffRoleDepartmentByDepartmentId(departmentId);
    }

	@Override
	public StaffRoleDepartment selectStaffRoleDepartmentByDepartmentIdRoleIds(Long departmentId, List<Long> ids) {
		return staffRoleDepartmentMapper.selectStaffRoleDepartmentByDepartmentIdRoleIds(departmentId,ids);
	}

	@Override
	public void deleteStaffRoleDepartment(Long id) {
		staffRoleDepartmentMapper.deleteStaffRoleDepartment(id);
	}

	@Override
	public List<DepartmentsSimpleDto> selectDepartmentSimpleInfos(List<String> ids){
		return staffRoleDepartmentMapper.selectDepartmentSimpleInfos(ids);
	}

    @Override
    public void deleteStaffRoleDepartmentByRoleId(Long roleId) {
		staffRoleDepartmentMapper.deleteStaffRoleDepartmentByRoleId(roleId);
    }


}
