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

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.flow.dao.StaffRoleMenuMapper;
import com.lz.modules.flow.entity.StaffMenu;
import com.lz.modules.flow.entity.StaffRoleMenu;
import com.lz.modules.flow.service.StaffRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* <p>
* 绩效管理菜单表 服务类
* </p>
*
* @author quyixiao
* @since 2020-11-02
*/

@Service
public class StaffRoleMenuServiceImpl extends ServiceImpl<StaffRoleMenuMapper, StaffRoleMenu> implements StaffRoleMenuService {


    @Autowired
	private StaffRoleMenuMapper staffRoleMenuMapper;



	@Override
	public StaffRoleMenu selectStaffRoleMenuById(Long id){
		return staffRoleMenuMapper.selectStaffRoleMenuById(id);
	}



	@Override
	public Long insertStaffRoleMenu(StaffRoleMenu staffRoleMenu){
		return staffRoleMenuMapper.insertStaffRoleMenu(staffRoleMenu);
	}



	@Override
	public int updateStaffRoleMenuById(StaffRoleMenu staffRoleMenu){
		return staffRoleMenuMapper.updateStaffRoleMenuById(staffRoleMenu);
	}



	@Override
	public int updateCoverStaffRoleMenuById(StaffRoleMenu staffRoleMenu){
		return staffRoleMenuMapper.updateCoverStaffRoleMenuById(staffRoleMenu);
	}



	@Override
	public int deleteStaffRoleMenuById(Long id){
		return staffRoleMenuMapper.deleteStaffRoleMenuById(id);
	}

    @Override
    public List<StaffMenu> selectByRoleId(Long roleId) {
        return staffRoleMenuMapper.selectByRoleId(roleId);
    }

    @Override
    public void deleteStaffRoleMenuByRoleId(Long roleId) {
		staffRoleMenuMapper.deleteStaffRoleMenuByRoleId(roleId);
    }

    @Override
    public StaffRoleMenu selectStaffRoleMenuByRoleIdMenuId(Long roleId, long menuId) {

		return staffRoleMenuMapper.selectStaffRoleMenuByRoleIdMenuId(roleId,menuId);
    }


}
