package com.boman.system.api;

import com.boman.domain.constant.ServiceNameConstants;
import com.boman.domain.SysRoleData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author shiqian
 * @date 2021年04月07日 10:31
 **/
@FeignClient(contextId = "remoteRoleDataService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteRoleDataService {

    /**
     * 功能描述: 根据userId查找此人的所有roleData
     *
     * @param idList idList
     * @return java.util.List<com.boman.domain.SysMenu>
     */
    @PostMapping(value = "/roleData/listByRoleIdList")
    List<SysRoleData> listByRoleIdList(@RequestBody List<Long> idList);

    /**
     * 功能描述: 根据roleIds和tableName查找
     *
     * @param roleIds   逗号相隔的roleIdS
     * @param tableName tableName
     * @return java.util.List<com.boman.domain.SysRoleData>
     */
    @GetMapping(value = "/roleData/list/roleIds/{roleIds}/tableName/{tableName}")
    List<SysRoleData> listByRoleIdListTableName(@PathVariable("roleIds") String roleIds, @PathVariable("tableName") String tableName);
}

