package com.xunmei.system.api; import com.xunmei.common.core.constant.SecurityConstants; import com.xunmei.common.core.constant.ServiceNameConstants; import com.xunmei.common.core.domain.R; import com.xunmei.common.core.vo.IdNameVo; import com.xunmei.system.api.Eto.RoleConditionEto; import com.xunmei.system.api.domain.SysRole; import com.xunmei.system.api.domain.SysUser; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestParam; import java.util.List; /** * @author :LuoWei * @date : 2023/8/25 */ @FeignClient(contextId = "remoteRoleService", value = ServiceNameConstants.SYSTEM_SERVICE) public interface RemoteRoleService { @GetMapping("/role/getRoleById") SysRole getRoleById(@RequestParam("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); @GetMapping("/role/getRoleByUserId") List getRoleByUserId(@RequestParam("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); @GetMapping("/role/getRoleByName") SysRole getRoleByName(@RequestParam("name") String name, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); @GetMapping(value = "/role/selectRoleNameByUserId") R selectRoleNameByUserId(@RequestParam("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); @GetMapping("/role/getNames") List getNames(@RequestBody RoleConditionEto condition); @GetMapping("/role/selectUserByRoleNameAndOrgId") List selectUserByRoleNameAndOrgId(@RequestParam(value = "roleName") String roleName, @RequestParam(value = "orgId") Long orgId, @RequestParam(value = "isLock") Integer isLock, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); @GetMapping("/userRole/getUserRoleId") List getUserRoleId(@RequestParam(value = "userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); }