package com.qmth.themis.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.themis.business.dao.TBPrivilegeMapper;
import com.qmth.themis.business.entity.TBPrivilege;
import com.qmth.themis.business.service.TBPrivilegeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 菜单和权限 服务实现类
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/6/25
 */
@Service
public class TBPrivilegeServiceImpl extends ServiceImpl<TBPrivilegeMapper, TBPrivilege> implements TBPrivilegeService {

    @Resource
    TBPrivilegeMapper tbPrivilegeMapper;

    /**
     * 根据userId获取菜单数据
     *
     * @param userId
     * @return
     */
    @Override
    public List<TBPrivilege> getMenu(Long userId) {
        return tbPrivilegeMapper.getMenu(userId);
    }
}
