
package com.tmerclub.cloud.api.rbac.feign;

import com.tmerclub.cloud.api.rbac.bo.UriPermissionBO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;

import java.util.List;

/**
 *
 * @author tmerclub
 * @date 2020/09/02
 */
public interface PermissionFeignClient {

    String SERVICE_NAME = "tmerclub-auth";

    /**
     * 校验是否有某个uri的权限
     * @param userId
     * @param sysType
     * @param uri
     * @param isAdmin
     * @param method
     * @return 是否有某个uri的权限
     */
    ServerResponseEntity<Boolean> checkPermission(Long userId, Integer sysType,
                                                  String uri, Integer isAdmin,
                                                  Integer method);

    /**
     * 根据MenuIdLis获取菜单资源数据
     * @param menuPermIdList
     * @return
     */
    ServerResponseEntity<List<UriPermissionBO>> getUriPermissionListByMenuPermIdList(List<Long> menuPermIdList);
}
