feat:接口自动注册进入x_permission表
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.xiang.xservice.auth.api.api;
|
||||
|
||||
import com.xiang.xservice.auth.api.dto.req.permission.PermissionRegisterRequest;
|
||||
import com.xiang.xservice.basic.common.resp.Result;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
public interface PermissionApi {
|
||||
|
||||
Result<Void> register(@RequestBody @NotEmpty(message = "请求参数不能为空") @Valid List<PermissionRegisterRequest> requests);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.xiang.xservice.auth.api.dto.req.permission;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PermissionRegisterRequest {
|
||||
|
||||
private String serviceName;
|
||||
/**
|
||||
* 类名+方法名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 服务名称+方法+接口地址
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 接口地址
|
||||
*/
|
||||
private String apiPath;
|
||||
/**
|
||||
* 请求方式
|
||||
*/
|
||||
private String method;
|
||||
/**
|
||||
* 类型 接口为3
|
||||
*/
|
||||
private Integer type = 3; // 接口
|
||||
}
|
||||
Reference in New Issue
Block a user