package org.dromara.common.core.service.impl;

import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.common.core.domain.vo.SysProjectRoleMenuVo;
import org.dromara.common.core.domain.vo.SysProjectRolePermissionVo;
import org.dromara.common.core.service.PermissionService;
import org.dromara.system.api.RemotePermissionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 权限服务
 *
 * @author Lion Li
 */
@Service
public class PermissionServiceImpl implements PermissionService {

    @DubboReference
    private RemotePermissionService remotePermissionService;

    @Override
    public List<SysProjectRolePermissionVo> getRolePermission(Long userId) {
        return remotePermissionService.getRolePermission(userId);
    }

    @Override
    public List<SysProjectRoleMenuVo> getMenuPermission(Long userId) {
        return remotePermissionService.getMenuPermission(userId);
    }

}
