提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.api.permission; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
d9f9ba
|
4 |
import com.iailab.module.system.api.permission.dto.RoleDTO; |
e7c126
|
5 |
import com.iailab.module.system.enums.ApiConstants; |
H |
6 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
7 |
import io.swagger.v3.oas.annotations.Parameter; |
|
8 |
import io.swagger.v3.oas.annotations.Operation; |
|
9 |
import org.springframework.cloud.openfeign.FeignClient; |
|
10 |
import org.springframework.web.bind.annotation.GetMapping; |
d9f9ba
|
11 |
import org.springframework.web.bind.annotation.PostMapping; |
H |
12 |
import org.springframework.web.bind.annotation.RequestBody; |
e7c126
|
13 |
import org.springframework.web.bind.annotation.RequestParam; |
H |
14 |
|
|
15 |
import java.util.Collection; |
|
16 |
|
d9f9ba
|
17 |
@FeignClient(name = ApiConstants.NAME) |
e7c126
|
18 |
@Tag(name = "RPC 服务 - 角色") |
H |
19 |
public interface RoleApi { |
|
20 |
|
|
21 |
String PREFIX = ApiConstants.PREFIX + "/role"; |
|
22 |
|
|
23 |
@GetMapping(PREFIX + "/valid") |
|
24 |
@Operation(summary = "校验角色是否合法") |
|
25 |
@Parameter(name = "ids", description = "角色编号数组", example = "1,2", required = true) |
|
26 |
CommonResult<Boolean> validRoleList(@RequestParam("ids") Collection<Long> ids); |
|
27 |
|
d9f9ba
|
28 |
@Operation(summary = "Feign接口-保存或者修改角色") |
H |
29 |
@PostMapping("/api/feign/roles/save") |
|
30 |
void saveRoleInfo(@RequestBody RoleDTO roleDTO); |
|
31 |
|
|
32 |
@Operation(summary = "Feign接口-根据角色名称查询角色") |
|
33 |
@GetMapping("/api/feign/roles/getRoleByName") |
|
34 |
RoleDTO getRoleByName(@RequestParam("name") String name); |
e7c126
|
35 |
} |