package com.storlead.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.storlead.framework.mybatis.service.impl.MyBaseServiceImpl;
import com.storlead.system.pojo.entity.RoleEntity;
import com.storlead.system.mapper.RoleMapper;
import com.storlead.system.service.IRoleService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 角色表 服务实现类
 * </p>
 *
 * @Author scott
 * @since 2018-12-19
 */
@Service
public class RoleServiceImpl extends MyBaseServiceImpl<RoleMapper, RoleEntity> implements IRoleService {

    @Override
    public List<RoleEntity> findByUserId(Long userId) {
        return baseMapper.findByUserId(userId);
    }

    @Override
    public Set<Long> getMenuIdsByRoleId(Long roleId,Integer isApp) {
        return baseMapper.getMenuIdsByRoleId(roleId,isApp);
    }

    @Override
    public Set<Long> getdeptIdsByRoleId(Long roleId) {
        return baseMapper.getDeptIdsByRoleId(roleId);
    }
}
