forked from github/dataease
Merge pull request #7223 from dataease/pr@dev-v2@feat_xpack_api_doc
feat: xpack模块相关api接口文档
This commit is contained in:
commit
d085ae4565
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 80f4f36ad7d179645d635c2490dd898beda7e746
|
||||
Subproject commit dfef649cb7d7d2490891ba7acb0ecfb342673a7b
|
@ -4,23 +4,32 @@ import io.dataease.api.lark.dto.LarkEnableEditor;
|
||||
import io.dataease.api.lark.dto.LarkTokenRequest;
|
||||
import io.dataease.api.lark.vo.LarkInfoVO;
|
||||
import io.dataease.api.lark.dto.LarkSettingCreator;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@Tag(name = "飞书设置")
|
||||
public interface LarkApi {
|
||||
|
||||
@Operation(summary = "查询飞书信息")
|
||||
@GetMapping("/info")
|
||||
LarkInfoVO info();
|
||||
|
||||
@Operation(summary = "保存")
|
||||
@PostMapping("/create")
|
||||
void save(@RequestBody LarkSettingCreator creator);
|
||||
|
||||
@Operation(summary = "飞书token", hidden = true)
|
||||
@PostMapping("/token")
|
||||
String larkToken(@RequestBody LarkTokenRequest request);
|
||||
|
||||
@Operation(summary = "切换开启状态")
|
||||
@PostMapping("/switchEnable")
|
||||
void switchEnable(@RequestBody LarkEnableEditor editor);
|
||||
|
||||
@Operation(summary = "验证可用性")
|
||||
@PostMapping("/validate")
|
||||
void validate(@RequestBody LarkSettingCreator creator);
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
package io.dataease.api.lark.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "开启状态切换器")
|
||||
@Data
|
||||
public class LarkEnableEditor implements Serializable {
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private boolean enable;
|
||||
}
|
||||
|
@ -1,19 +1,21 @@
|
||||
package io.dataease.api.lark.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "飞书设置构造器")
|
||||
@Data
|
||||
public class LarkSettingCreator implements Serializable {
|
||||
|
||||
@Schema(description = "appId", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "appSecret", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String appSecret;
|
||||
|
||||
@Schema(description = "回调域名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String callBack;
|
||||
|
||||
@Schema(description = "是否可用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean enable;
|
||||
|
||||
@Schema(description = "是否有效")
|
||||
private Boolean valid;
|
||||
}
|
||||
|
@ -2,20 +2,23 @@ package io.dataease.api.lark.vo;
|
||||
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "飞书信息")
|
||||
@Data
|
||||
public class LarkInfoVO implements Serializable {
|
||||
|
||||
@Schema(description = "appId")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "appSecret")
|
||||
private String appSecret;
|
||||
|
||||
@Schema(description = "回调域名")
|
||||
private String callBack;
|
||||
|
||||
@Schema(description = "是否开启")
|
||||
private Boolean enable = false;
|
||||
|
||||
@Schema(description = "是否可用")
|
||||
private Boolean valid = false;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.visualization.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "分享列表过滤器")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ -14,11 +16,12 @@ public class VisualizationWorkbranchQueryRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3522243514336261778L;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "关键字")
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "查询来源")
|
||||
private String queryFrom;
|
||||
|
||||
@Schema(description = "是否升序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private boolean asc = false;
|
||||
}
|
||||
|
@ -3,23 +3,30 @@ package io.dataease.api.xpack.settings;
|
||||
import io.dataease.api.xpack.settings.request.XpackAuthenticationEditor;
|
||||
import io.dataease.api.xpack.settings.vo.XpackAuthenticationStatusVO;
|
||||
import io.dataease.api.xpack.settings.vo.XpackAuthenticationVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "认证设置")
|
||||
public interface XpackAuthenticationApi {
|
||||
|
||||
@Operation(summary = "同步")
|
||||
@GetMapping("/sync")
|
||||
void sync();
|
||||
|
||||
@Operation(summary = "查询列表")
|
||||
@GetMapping("/grid")
|
||||
List<XpackAuthenticationVO> grid();
|
||||
|
||||
@Operation(summary = "切换状态")
|
||||
@PostMapping("/update")
|
||||
void update(@RequestBody XpackAuthenticationEditor editor);
|
||||
|
||||
@Operation(summary = "查询状态")
|
||||
@GetMapping("/status")
|
||||
List<XpackAuthenticationStatusVO> status();
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
package io.dataease.api.xpack.settings.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "状态切换器")
|
||||
@Data
|
||||
public class XpackAuthenticationEditor implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 8817503683420624977L;
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private boolean enable;
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
package io.dataease.api.xpack.settings.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "状态VO")
|
||||
@Data
|
||||
public class XpackAuthenticationStatusVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3394065091528285702L;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private boolean enable;
|
||||
}
|
||||
|
@ -2,20 +2,23 @@ package io.dataease.api.xpack.settings.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "认证列表VO")
|
||||
@Data
|
||||
public class XpackAuthenticationVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1744424881280545811L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private boolean enable;
|
||||
}
|
||||
|
@ -8,6 +8,10 @@ import io.dataease.api.xpack.share.request.XpackSharePwdValidator;
|
||||
import io.dataease.api.xpack.share.vo.XpackShareGridVO;
|
||||
import io.dataease.api.xpack.share.vo.XpackShareProxyVO;
|
||||
import io.dataease.api.xpack.share.vo.XpackShareVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -16,32 +20,45 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Tag(name = "分享")
|
||||
public interface XpackShareApi {
|
||||
|
||||
@Operation(summary = "查询资源分享状态")
|
||||
@Parameter(name = "resourceId", description = "资源ID", required = true, in = ParameterIn.PATH)
|
||||
@GetMapping("/status/{resourceId}")
|
||||
boolean status(@PathVariable("resourceId") Long resourceId);
|
||||
|
||||
@Operation(summary = "切换资源分享状态")
|
||||
@Parameter(name = "resourceId", description = "资源ID", required = true, in = ParameterIn.PATH)
|
||||
@PostMapping("/switcher/{resourceId}")
|
||||
void switcher(@PathVariable("resourceId") Long resourceId);
|
||||
|
||||
@Operation(summary = "设置分享有效期")
|
||||
@PostMapping("/editExp")
|
||||
void editExp(@RequestBody XpackShareExpRequest request);
|
||||
|
||||
@Operation(summary = "编辑分享密码")
|
||||
@PostMapping("/editPwd")
|
||||
void editPwd(@RequestBody XpackSharePwdRequest request);
|
||||
|
||||
@Operation(summary = "查询分享详情")
|
||||
@GetMapping("/detail/{resourceId}")
|
||||
@Parameter(name = "resourceId", description = "资源ID", required = true, in = ParameterIn.PATH)
|
||||
XpackShareVO detail(@PathVariable("resourceId") Long resourceId);
|
||||
|
||||
@Operation(summary = "查询分享列表")
|
||||
@PostMapping("/query")
|
||||
List<XpackShareGridVO> query(@RequestBody VisualizationWorkbranchQueryRequest request);
|
||||
|
||||
@Operation(summary = "查询分享代理信息")
|
||||
@PostMapping("/proxyInfo")
|
||||
XpackShareProxyVO proxyInfo(@RequestBody XpackShareProxyRequest request);
|
||||
|
||||
@Operation(summary = "验证分享")
|
||||
@PostMapping("/validate")
|
||||
boolean validatePwd(@RequestBody XpackSharePwdValidator validator);
|
||||
|
||||
@Operation(summary = "", hidden = true)
|
||||
@GetMapping("/queryRelationByUserId/{uid}")
|
||||
Map<String, String> queryRelationByUserId(@PathVariable("uid") Long uid);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.xpack.share.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,14 +8,16 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "有效期设置器")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class XpackShareExpRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5519219260721146347L;
|
||||
|
||||
@Schema(description = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long resourceId;
|
||||
|
||||
@Schema(description = "有效期")
|
||||
private Long exp;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.xpack.share.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,14 +8,15 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "分享代理信息过滤器")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class XpackShareProxyRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 7758730984988104057L;
|
||||
|
||||
@Schema(description = "分享UUID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String uuid;
|
||||
|
||||
@Schema(description = "密钥", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String ciphertext;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.xpack.share.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,14 +8,16 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "分享密码编辑器")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class XpackSharePwdRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -4399320897911936623L;
|
||||
|
||||
@Schema(description = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long resourceId;
|
||||
|
||||
@Schema(description = "密码")
|
||||
private String pwd;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.xpack.share.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "分享验证器")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ -15,5 +17,6 @@ public class XpackSharePwdValidator implements Serializable {
|
||||
private static final long serialVersionUID = 5723073697210793005L;
|
||||
|
||||
|
||||
@Schema(description = "密钥")
|
||||
private String ciphertext;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.dataease.api.xpack.share.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -9,6 +10,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "分享列表VO")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ -16,20 +18,22 @@ public class XpackShareGridVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1633588323141385486L;
|
||||
|
||||
@Schema(description = "分享ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long shareId;
|
||||
|
||||
@Schema(description = "资源ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long resourceId;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long time;
|
||||
|
||||
@Schema(description = "有效期")
|
||||
private Long exp;
|
||||
|
||||
@Schema(description = "权重")
|
||||
private Integer weight;
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.dataease.api.xpack.share.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -9,6 +10,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "分享代理信息VO")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ -16,15 +18,17 @@ public class XpackShareProxyVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6520351268758198483L;
|
||||
|
||||
@Schema(description = "资源ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long resourceId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uid;
|
||||
|
||||
@Schema(description = "有效期")
|
||||
private boolean exp;
|
||||
|
||||
@Schema(description = "密码验证生效")
|
||||
private boolean pwdValid;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.dataease.api.xpack.share.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -9,6 +10,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "分享详情VO")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ -17,8 +19,12 @@ public class XpackShareVO implements Serializable {
|
||||
private static final long serialVersionUID = 7364165756855382682L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "分享ID")
|
||||
private Long id;
|
||||
@Schema(description = "分享有效期")
|
||||
private Long exp;
|
||||
@Schema(description = "分享UUID")
|
||||
private String uuid;
|
||||
@Schema(description = "分享密码")
|
||||
private String pwd;
|
||||
}
|
||||
|
@ -1,7 +1,13 @@
|
||||
package io.dataease.api.permissions.apikey.api;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.permissions.apikey.dto.ApikeyEnableEditor;
|
||||
import io.dataease.api.permissions.apikey.vo.ApiKeyVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -9,17 +15,28 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "API Key")
|
||||
@ApiSupport(order = 7, author = "fit2cloud-someone")
|
||||
public interface ApiKeyApi {
|
||||
|
||||
@Operation(summary = "生成")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@PostMapping("/generate")
|
||||
void generate();
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@GetMapping("/query")
|
||||
List<ApiKeyVO> query();
|
||||
|
||||
@Operation(summary = "切换状态")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@PostMapping("/switch")
|
||||
void switchEnable(@RequestBody ApikeyEnableEditor editor);
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Parameter(name = "id", description = "ID", required = true, in = ParameterIn.PATH)
|
||||
@PostMapping("/delete/{id}")
|
||||
void delete(@PathVariable("id") Long id);
|
||||
}
|
||||
|
@ -1,13 +1,17 @@
|
||||
package io.dataease.api.permissions.apikey.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "状态切换器")
|
||||
@Data
|
||||
public class ApikeyEnableEditor implements Serializable {
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态", defaultValue = "false")
|
||||
private Boolean enable = false;
|
||||
}
|
||||
|
@ -2,21 +2,28 @@ package io.dataease.api.permissions.apikey.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "API Key VO")
|
||||
@Data
|
||||
public class ApiKeyVO implements Serializable {
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "accessKey")
|
||||
private String accessKey;
|
||||
|
||||
@Schema(description = "accessSecret")
|
||||
private String accessSecret;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Boolean enable;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "权限管理")
|
||||
@ApiSupport(order = 999)
|
||||
@ApiSupport(order = 5, author = "fit2cloud-someone")
|
||||
public interface AuthApi {
|
||||
|
||||
@Operation(summary = "查询资源树")
|
||||
|
@ -9,6 +9,7 @@ import io.dataease.api.permissions.auth.dto.BusiResourceEditor;
|
||||
import io.dataease.api.permissions.auth.dto.BusiResourceMover;
|
||||
import io.dataease.model.BusiNodeRequest;
|
||||
import io.dataease.model.BusiNodeVO;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -20,7 +21,7 @@ import java.util.List;
|
||||
|
||||
@Tag(name = "内部资源交互")
|
||||
@ApiSupport(order = 998)
|
||||
// @Hidden
|
||||
@Hidden
|
||||
public interface InteractiveAuthApi {
|
||||
|
||||
@Operation(summary = "查询菜单ID")
|
||||
|
@ -1,16 +1,17 @@
|
||||
package io.dataease.api.permissions.auth.dto;
|
||||
|
||||
import io.dataease.api.permissions.auth.vo.PermissionItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "业务权限编辑器")
|
||||
@Data
|
||||
public class BusiPerEditor extends BusiPermissionRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3067994331757489447L;
|
||||
|
||||
@Schema(description = "编辑权限节点集合")
|
||||
private List<PermissionItem> permissions;
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
package io.dataease.api.permissions.auth.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "资源权限构造器")
|
||||
@Data
|
||||
public class BusiTargetPerCreator extends MenuTargetPerCreator{
|
||||
|
||||
@Schema(description = "类型")
|
||||
private Integer type;
|
||||
@Schema(description = "标记")
|
||||
private String flag;
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
package io.dataease.api.permissions.auth.dto;
|
||||
|
||||
import io.dataease.api.permissions.auth.vo.PermissionItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "菜单权限编辑器")
|
||||
@Data
|
||||
public class MenuPerEditor extends MenuPermissionRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3410520935167596750L;
|
||||
|
||||
@Schema(description = "菜单权限集合")
|
||||
private List<PermissionItem> permissions;
|
||||
}
|
||||
|
@ -1,16 +1,17 @@
|
||||
package io.dataease.api.permissions.auth.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "菜单权限查询条件")
|
||||
@Data
|
||||
public class MenuPermissionRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7609671259840867561L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
package io.dataease.api.permissions.auth.dto;
|
||||
|
||||
import io.dataease.api.permissions.auth.vo.PermissionItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "菜单权限构造器")
|
||||
@Data
|
||||
public class MenuTargetPerCreator extends TargetPerCreator{
|
||||
|
||||
@Schema(description = "权限集合")
|
||||
private List<PermissionItem> permissions;
|
||||
}
|
||||
|
@ -2,17 +2,19 @@ package io.dataease.api.permissions.auth.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "权限构造器")
|
||||
@Data
|
||||
public class TargetPerCreator implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6469957337188015981L;
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
@Schema(description = "权限ID集合")
|
||||
private List<Long> ids;
|
||||
}
|
||||
|
@ -1,9 +1,15 @@
|
||||
package io.dataease.api.permissions.embedded.api;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.permissions.embedded.dto.EmbeddedCreator;
|
||||
import io.dataease.api.permissions.embedded.dto.EmbeddedEditor;
|
||||
import io.dataease.api.permissions.embedded.dto.EmbeddedResetRequest;
|
||||
import io.dataease.api.permissions.embedded.vo.EmbeddedGridVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -11,23 +17,38 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "嵌入式")
|
||||
@ApiSupport(order = 6, author = "fit2cloud-someone")
|
||||
public interface EmbeddedApi {
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@GetMapping("/queryGrid")
|
||||
List<EmbeddedGridVO> queryGrid();
|
||||
|
||||
@Operation(summary = "创建")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@PostMapping("/create")
|
||||
void create(@RequestBody EmbeddedCreator creator);
|
||||
|
||||
@Operation(summary = "编辑")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@PostMapping("/edit")
|
||||
void edit(@RequestBody EmbeddedEditor editor);
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Parameter(name = "id", description = "ID", required = true, in = ParameterIn.PATH)
|
||||
@PostMapping("/delete/{id}")
|
||||
void delete(@PathVariable("id") Long id);
|
||||
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "重置密钥")
|
||||
@PostMapping("/reset")
|
||||
void reset(@RequestBody EmbeddedResetRequest request);
|
||||
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "嵌入式应用域名集合", hidden = true)
|
||||
@GetMapping("/domainList")
|
||||
List<String> domainList();
|
||||
}
|
||||
|
@ -1,13 +1,15 @@
|
||||
package io.dataease.api.permissions.embedded.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "嵌入式应用构造器")
|
||||
@Data
|
||||
public class EmbeddedCreator implements Serializable {
|
||||
|
||||
@Schema(description = "应用名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "应用域名")
|
||||
private String domain;
|
||||
}
|
||||
|
@ -1,15 +1,17 @@
|
||||
package io.dataease.api.permissions.embedded.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "嵌入式应用编辑器")
|
||||
@Data
|
||||
public class EmbeddedEditor implements Serializable {
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "应用名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "应用域名")
|
||||
private String domain;
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
package io.dataease.api.permissions.embedded.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "嵌入式密钥重置器")
|
||||
@Data
|
||||
public class EmbeddedResetRequest implements Serializable {
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "新密钥")
|
||||
private String appSecret;
|
||||
}
|
||||
|
@ -2,21 +2,24 @@ package io.dataease.api.permissions.embedded.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "嵌入式列表VO")
|
||||
@Data
|
||||
public class EmbeddedGridVO implements Serializable {
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "应用名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "应用ID")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "应用密钥")
|
||||
private String appSecret;
|
||||
|
||||
@Schema(description = "应用域名")
|
||||
private String domain;
|
||||
}
|
||||
|
@ -1,8 +1,12 @@
|
||||
package io.dataease.api.permissions.login.api;
|
||||
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.permissions.login.dto.PwdLoginDTO;
|
||||
import io.dataease.auth.vo.TokenVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -14,21 +18,30 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
* 本地登录:账号密码获取用户获取token
|
||||
* oidc登录:回调请求头部X-Userinfo中获取用户 根据用户信息(没有就新建用户)再换取token
|
||||
*/
|
||||
@Tag(name = "登录")
|
||||
@ApiSupport(order = 1, author = "fit2cloud-someone")
|
||||
public interface LoginApi {
|
||||
/**
|
||||
* 本地登录
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@Operation(summary = "本地登录")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@PostMapping("/login/localLogin")
|
||||
TokenVO localLogin(@Valid @RequestBody PwdLoginDTO dto);
|
||||
|
||||
@Operation(summary = "token续命", hidden = true)
|
||||
@ApiOperationSupport(order = 2)
|
||||
@GetMapping("/login/refresh")
|
||||
TokenVO refresh();
|
||||
|
||||
@Operation(summary = "第三方登录", hidden = true)
|
||||
@ApiOperationSupport(order = 3)
|
||||
@PostMapping("/login/platformLogin/{origin}")
|
||||
TokenVO platformLogin(@PathVariable("origin") Integer origin);
|
||||
|
||||
@Operation(summary = "登出")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@GetMapping("/logout")
|
||||
void logout();
|
||||
|
||||
|
@ -1,15 +1,18 @@
|
||||
package io.dataease.api.permissions.login.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Schema(description = "登录DTO")
|
||||
@Data
|
||||
public class PwdLoginDTO {
|
||||
|
||||
@Schema(description = "账号(需加密)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "login.validator.name")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "密码(需加密)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "login.validator.pwd")
|
||||
private String pwd;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.permissions.org.api;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.permissions.org.dto.OrgCreator;
|
||||
import io.dataease.api.permissions.org.dto.OrgEditor;
|
||||
import io.dataease.api.permissions.org.dto.OrgRequest;
|
||||
@ -8,6 +9,10 @@ import io.dataease.api.permissions.org.vo.OrgPageVO;
|
||||
import io.dataease.auth.DeApiPath;
|
||||
import io.dataease.auth.DePermit;
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -18,28 +23,37 @@ import java.util.List;
|
||||
import static io.dataease.constant.AuthResourceEnum.ORG;
|
||||
import static io.dataease.constant.AuthResourceEnum.ROLE;
|
||||
|
||||
@Tag(name = "组织")
|
||||
@ApiSupport(order = 4, author = "fit2cloud-someone")
|
||||
@DeApiPath(value = "/org", rt = ORG)
|
||||
public interface OrgApi {
|
||||
|
||||
@Operation(summary = "查询组织树")
|
||||
@PostMapping("/page/tree")
|
||||
@DePermit("m:read")
|
||||
List<OrgPageVO> pageTree(@RequestBody OrgRequest request);
|
||||
|
||||
@Operation(summary = "创建")
|
||||
@DePermit({"m:read"})
|
||||
@PostMapping("/page/create")
|
||||
void create(@RequestBody OrgCreator creator);
|
||||
|
||||
@Operation(summary = "编辑")
|
||||
@DePermit({"m:read", "#p0.id+':manage'"})
|
||||
@PostMapping("/page/edit")
|
||||
void edit(@RequestBody OrgEditor editor);
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@Parameter(name = "id", description = "ID", required = true, in = ParameterIn.PATH)
|
||||
@PostMapping("/page/delete/{id}")
|
||||
@DePermit({"m:read", "#p0+':manage'"})
|
||||
void delete(@PathVariable("id") Long id);
|
||||
|
||||
@Operation(summary = "查询权限内组织树")
|
||||
@PostMapping("/mounted")
|
||||
List<MountedVO> mounted(@RequestBody KeywordRequest request);
|
||||
|
||||
@Operation(summary = "", hidden = true)
|
||||
@GetMapping("/resourceExist/{oid}")
|
||||
boolean resourceExist(@PathVariable("oid") Long oid);
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
package io.dataease.api.permissions.org.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "组织构造器")
|
||||
@Data
|
||||
public class OrgCreator implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -4246980891732805368L;
|
||||
|
||||
@Schema(description = "组织名称")
|
||||
private String name;
|
||||
@Schema(description = "上级ID")
|
||||
private Long pid;
|
||||
}
|
||||
|
@ -1,17 +1,19 @@
|
||||
package io.dataease.api.permissions.org.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "组织编辑器")
|
||||
@Data
|
||||
public class OrgEditor implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5571486179570725994L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "组织名称")
|
||||
private String name;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.dataease.api.permissions.org.dto;
|
||||
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ -8,12 +9,13 @@ import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Schema(description = "组织列表过滤器")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class OrgRequest extends KeywordRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1697526057837588192L;
|
||||
|
||||
@Schema(description = "是否降序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean desc = true;
|
||||
}
|
||||
|
@ -2,21 +2,27 @@ package io.dataease.api.permissions.org.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "组织VO")
|
||||
@Data
|
||||
public class MountedVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7642741925705465785L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
@Schema(description = "只读")
|
||||
private boolean readOnly = true;
|
||||
@Schema(description = "子集")
|
||||
private List<MountedVO> children;
|
||||
}
|
||||
|
@ -2,26 +2,28 @@ package io.dataease.api.permissions.org.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "组织列表VO")
|
||||
@Data
|
||||
public class OrgPageVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7788232223396601785L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "只读")
|
||||
private boolean readOnly = true;
|
||||
|
||||
@Schema(description = "子集")
|
||||
private List<OrgPageVO> children;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.permissions.role.api;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.permissions.role.dto.*;
|
||||
import io.dataease.api.permissions.role.vo.ExternalUserVO;
|
||||
import io.dataease.api.permissions.role.vo.RoleDetailVO;
|
||||
@ -7,6 +8,10 @@ import io.dataease.api.permissions.role.vo.RoleVO;
|
||||
import io.dataease.auth.DeApiPath;
|
||||
import io.dataease.auth.DePermit;
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -16,55 +21,73 @@ import java.util.List;
|
||||
|
||||
import static io.dataease.constant.AuthResourceEnum.ROLE;
|
||||
|
||||
@Tag(name = "角色")
|
||||
@ApiSupport(order = 3, author = "fit2cloud-someone")
|
||||
@DeApiPath(value = "/role", rt = ROLE)
|
||||
public interface RoleApi {
|
||||
|
||||
@Operation(summary = "查询")
|
||||
@DePermit("m:read")
|
||||
@PostMapping("/query")
|
||||
List<RoleVO> query(@RequestBody KeywordRequest request);
|
||||
|
||||
@Operation(summary = "创建")
|
||||
@DePermit("m:read")
|
||||
@PostMapping("/create")
|
||||
void create(@RequestBody RoleCreator creator);
|
||||
|
||||
@Operation(summary = "编辑")
|
||||
@DePermit({"m:read", "#p0.id + ':manage'"})
|
||||
@PostMapping("/edit")
|
||||
void edit(@RequestBody RoleEditor editor);
|
||||
|
||||
@Operation(summary = "绑定用户")
|
||||
@DePermit({"m:read", "#p0.rid + ':manage'"})
|
||||
@PostMapping("/mountUser")
|
||||
void mountUser(@RequestBody MountUserRequest request);
|
||||
|
||||
@Operation(summary = "绑定组织外用户")
|
||||
@DePermit({"m:read", "#p0.rid + ':manage'"})
|
||||
@PostMapping("/mountExternalUser")
|
||||
void mountExternalUser(@RequestBody MountExternalUserRequest request);
|
||||
|
||||
@Operation(summary = "查询组织外用户")
|
||||
@GetMapping("/searchExternalUser/{keyword}")
|
||||
ExternalUserVO searchExternalUser(@PathVariable("keyword") String keyword);
|
||||
|
||||
@Operation(summary = "解绑用户")
|
||||
@DePermit({"m:read", "#p0.rid + ':manage'"})
|
||||
@PostMapping("/unMountUser")
|
||||
void unMountUser(@RequestBody UnmountUserRequest request);
|
||||
|
||||
@Operation(summary = "用户可选角色")
|
||||
@PostMapping("/user/option")
|
||||
List<RoleVO> optionForUser(@RequestBody RoleRequest request);
|
||||
|
||||
@Operation(summary = "用户已选角色")
|
||||
@PostMapping("/user/selected")
|
||||
List<RoleVO> selectedForUser(@RequestBody RoleRequest request);
|
||||
|
||||
@Operation(summary = "角色详情")
|
||||
@Parameter(name = "rid", description = "角色ID", required = true, in = ParameterIn.PATH)
|
||||
@GetMapping("/detail/{rid}")
|
||||
RoleDetailVO detail(@PathVariable("rid") Long rid);
|
||||
|
||||
@Operation(summary = "删除角色")
|
||||
@Parameter(name = "rid", description = "角色ID", required = true, in = ParameterIn.PATH)
|
||||
@DePermit({"m:manage", "#p0 + ':manage'"})
|
||||
@PostMapping("/delete/{rid}")
|
||||
void delete(@PathVariable("rid") Long rid);
|
||||
|
||||
@Operation(summary = "解绑用户询问")
|
||||
@PostMapping("/beforeUnmountInfo")
|
||||
Integer beforeUnmountInfo(@RequestBody UnmountUserRequest request);
|
||||
|
||||
@Operation(summary = "复制", hidden = true)
|
||||
@PostMapping("/copy")
|
||||
void copy(@RequestBody RoleCopyRequest request);
|
||||
|
||||
@Operation(summary = "查询组织内角色")
|
||||
@PostMapping("/byCurOrg")
|
||||
List<RoleVO> byCurOrg(@RequestBody KeywordRequest request);
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "组外用户绑定器")
|
||||
@Data
|
||||
public class MountExternalUserRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1682136323964916544L;
|
||||
|
||||
@Schema(description = "角色ID")
|
||||
private Long rid;
|
||||
|
||||
@Schema(description = "组外用户ID")
|
||||
private Long uid;
|
||||
}
|
||||
|
@ -1,13 +1,17 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "用户绑定器")
|
||||
@Data
|
||||
public class MountUserRequest implements Serializable {
|
||||
|
||||
@Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long rid;
|
||||
@Schema(description = "用户ID集合", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> uids;
|
||||
}
|
||||
|
@ -1,17 +1,21 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "角色构造器")
|
||||
@Data
|
||||
public class RoleCreator implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5311145649863484035L;
|
||||
|
||||
@Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer typeCode;
|
||||
@Schema(description = "描述", hidden = true)
|
||||
private String desc;
|
||||
|
||||
|
||||
|
@ -1,17 +1,21 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "角色编辑器")
|
||||
@Data
|
||||
public class RoleEditor implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -4071819873019095722L;
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
@Schema(description = "名称", hidden = true)
|
||||
private String desc;
|
||||
|
||||
}
|
||||
|
@ -1,16 +1,20 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@Schema(description = "角色过滤器")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class RoleRequest extends KeywordRequest {
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 7354856549096378406L;
|
||||
@Schema(description = "用户ID")
|
||||
private Long uid;
|
||||
}
|
||||
|
@ -1,15 +1,19 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "用户解绑器")
|
||||
@Data
|
||||
public class UnmountUserRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1361046648092771178L;
|
||||
@Schema(description = "角色ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long rid;
|
||||
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long uid;
|
||||
}
|
||||
|
@ -1,20 +1,23 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
|
||||
@Schema(description = "用户过滤器")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class UserRequest extends KeywordRequest {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2740015284392981297L;
|
||||
@Schema(description = "角色ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long rid;
|
||||
|
||||
@Schema(description = "排序规则")
|
||||
private String order;
|
||||
|
||||
}
|
||||
|
@ -2,24 +2,27 @@ package io.dataease.api.permissions.role.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "组织外用户VO")
|
||||
@Data
|
||||
public class ExternalUserVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5244308239452360019L;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long uid;
|
||||
|
||||
@Schema(description = "用户账号")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "用户名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "用户邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "用户电话")
|
||||
private String phone;
|
||||
}
|
||||
|
@ -3,11 +3,14 @@ package io.dataease.api.permissions.role.vo;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.dataease.api.permissions.role.dto.RoleCreator;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "角色详情VO")
|
||||
@Data
|
||||
public class RoleDetailVO extends RoleCreator {
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
}
|
||||
|
@ -2,19 +2,25 @@ package io.dataease.api.permissions.role.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "角色VO")
|
||||
@Data
|
||||
public class RoleVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3488550489306534641L;
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
@Schema(description = "角色名称")
|
||||
private String name;
|
||||
@Schema(description = "只读")
|
||||
private boolean readonly;
|
||||
@Schema(description = "根结点")
|
||||
private boolean root;
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
package io.dataease.api.permissions.setting.api;
|
||||
|
||||
import io.dataease.api.permissions.setting.vo.PerSettingItemVO;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Hidden
|
||||
public interface PerSettingApi {
|
||||
|
||||
@GetMapping("/basic/query")
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.dataease.api.permissions.user.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.permissions.role.dto.UserRequest;
|
||||
import io.dataease.api.permissions.user.dto.*;
|
||||
import io.dataease.api.permissions.user.vo.*;
|
||||
@ -10,6 +11,11 @@ import io.dataease.auth.vo.TokenVO;
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import io.dataease.request.BaseGridRequest;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@ -18,87 +24,128 @@ import java.util.List;
|
||||
import static io.dataease.constant.AuthResourceEnum.USER;
|
||||
|
||||
|
||||
@Tag(name = "用户")
|
||||
@ApiSupport(order = 2, author = "fit2cloud-someone")
|
||||
@DeApiPath(value = "/user", rt = USER)
|
||||
public interface UserApi {
|
||||
|
||||
@Operation(summary = "查询用户列表")
|
||||
@Parameters({
|
||||
@Parameter(name = "goPage", description = "目标页码", required = true, in = ParameterIn.PATH),
|
||||
@Parameter(name = "pageSize", description = "每页容量", required = true, in = ParameterIn.PATH),
|
||||
@Parameter(name = "request", description = "过滤条件", required = true)
|
||||
})
|
||||
@DePermit("m:read")
|
||||
@PostMapping("/pager/{goPage}/{pageSize}")
|
||||
IPage<UserGridVO> pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody BaseGridRequest request);
|
||||
|
||||
@Operation(summary = "查询用户详情")
|
||||
@Parameter(name = "id", description = "ID", required = true, in = ParameterIn.PATH)
|
||||
@DePermit({"m:read", "#p0 + ':read'"})
|
||||
@GetMapping("/queryById/{id}")
|
||||
UserFormVO queryById(@PathVariable("id") Long id);
|
||||
|
||||
|
||||
@Operation(summary = "查询个人信息")
|
||||
@GetMapping("/personInfo")
|
||||
UserFormVO personInfo();
|
||||
|
||||
@Operation(summary = "创建")
|
||||
@DePermit("m:read")
|
||||
@PostMapping("/create")
|
||||
void create(@RequestBody UserCreator creator);
|
||||
|
||||
@Operation(summary = "编辑")
|
||||
@DePermit({"m:read", "#p0.id + ':manage'"})
|
||||
@PostMapping("/edit")
|
||||
void edit(@RequestBody UserEditor editor);
|
||||
|
||||
@Operation(summary = "变更个人信息")
|
||||
@PostMapping("/personEdit")
|
||||
void personEdit(@RequestBody UserEditor editor);
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@Parameter(name = "id", description = "ID", required = true, in = ParameterIn.PATH)
|
||||
@DePermit({"m:read", "#p0 + ':manage'"})
|
||||
@PostMapping("/delete/{id}")
|
||||
void delete(@PathVariable("id") Long id);
|
||||
|
||||
@Operation(summary = "批量删除")
|
||||
@DePermit({"m:read", "#p0 + ':manage'"})
|
||||
@PostMapping("/batchDel")
|
||||
void batchDel(@RequestBody List<Long> ids);
|
||||
|
||||
@Operation(summary = "角色可绑用户")
|
||||
@PostMapping("/role/option")
|
||||
List<UserItemVO> optionForRole(@RequestBody UserRequest request);
|
||||
|
||||
@Operation(summary = "角色已绑用户")
|
||||
@Parameters({
|
||||
@Parameter(name = "goPage", description = "目标页码", required = true, in = ParameterIn.PATH),
|
||||
@Parameter(name = "pageSize", description = "每页容量", required = true, in = ParameterIn.PATH),
|
||||
@Parameter(name = "request", description = "过滤条件", required = true)
|
||||
})
|
||||
@PostMapping("/role/selected/{goPage}/{pageSize}")
|
||||
IPage<UserItemVO> selectedForRole(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody UserRequest request);
|
||||
|
||||
@Operation(summary = "切换组织")
|
||||
@Parameter(name = "oId", description = "目标组织ID", required = true, in = ParameterIn.PATH)
|
||||
@PostMapping("/switch/{oId}")
|
||||
TokenVO switchOrg(@PathVariable("oId") Long oId);
|
||||
|
||||
@Operation(summary = "获取当前登录人信息")
|
||||
@GetMapping("/info")
|
||||
CurUserVO info();
|
||||
|
||||
@Operation(summary = "查询当前组织内用户")
|
||||
@PostMapping("/byCurOrg")
|
||||
List<UserItem> byCurOrg(@RequestBody KeywordRequest request);
|
||||
|
||||
@Operation(summary = "用户数量", hidden = true)
|
||||
@Hidden
|
||||
@GetMapping("/userCount")
|
||||
int userCount();
|
||||
|
||||
@Operation(summary = "切换语言")
|
||||
@PostMapping("/switchLanguage")
|
||||
void switchLanguage(@RequestBody LangSwitchRequest request);
|
||||
|
||||
@Operation(summary = "下载批量导入模版")
|
||||
@PostMapping("/excelTemplate")
|
||||
void excelTemplate();
|
||||
|
||||
@Operation(summary = "批量导入")
|
||||
@PostMapping("/batchImport")
|
||||
UserImportVO batchImport(@RequestPart(value = "file") MultipartFile file);
|
||||
|
||||
|
||||
@Operation(summary = "下载批量导入失败记录")
|
||||
@Parameter(name = "key", description = "导入结果key", required = true, in = ParameterIn.PATH)
|
||||
@GetMapping("/errorRecord/{key}")
|
||||
void errorRecord(@PathVariable("key") String key);
|
||||
|
||||
@Operation(summary = "清理批量导入失败记录")
|
||||
@Parameter(name = "key", description = "导入结果key", required = true, in = ParameterIn.PATH)
|
||||
@GetMapping("/clearErrorRecord/{key}")
|
||||
void clearErrorRecord(@PathVariable("key") String key);
|
||||
|
||||
@Operation(summary = "查询默认密码")
|
||||
@DePermit({"m:read"})
|
||||
@GetMapping("/defaultPwd")
|
||||
String defaultPwd();
|
||||
|
||||
@Operation(summary = "重置为默认密码")
|
||||
@Parameter(name = "id", description = "用户ID", required = true, in = ParameterIn.PATH)
|
||||
@DePermit({"m:read", "#p0 + ':manage'"})
|
||||
@PostMapping("/resetPwd/{id}")
|
||||
void resetPwd(@PathVariable("id") Long id);
|
||||
|
||||
@Operation(summary = "切换用户状态")
|
||||
@DePermit({"m:read", "#p0.id + ':manage'"})
|
||||
@PostMapping("/enable")
|
||||
void enable(@RequestBody EnableSwitchRequest request);
|
||||
|
||||
@Operation(summary = "修改个人密码")
|
||||
@PostMapping("/modifyPwd")
|
||||
void modifyPwd(@RequestBody ModifyPwdRequest request);
|
||||
|
||||
|
@ -1,16 +1,19 @@
|
||||
package io.dataease.api.permissions.user.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "用户状态重置器")
|
||||
@Data
|
||||
public class EnableSwitchRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 8477475476294666602L;
|
||||
|
||||
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean enable;
|
||||
}
|
||||
|
@ -1,15 +1,17 @@
|
||||
package io.dataease.api.permissions.user.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "语言切换器")
|
||||
@Data
|
||||
public class LangSwitchRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -6779697711311519431L;
|
||||
|
||||
|
||||
@Schema(description = "目标语言", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String lang;
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
package io.dataease.api.permissions.user.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "密码修改器")
|
||||
@Data
|
||||
public class ModifyPwdRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -6583458043271002864L;
|
||||
|
||||
@Schema(description = "原始密码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String pwd;
|
||||
|
||||
@Schema(description = "新密码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String newPwd;
|
||||
}
|
||||
|
@ -1,22 +1,30 @@
|
||||
package io.dataease.api.permissions.user.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "用户构造器")
|
||||
@Data
|
||||
public class UserCreator implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5231186463604221044L;
|
||||
|
||||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
@Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String account;
|
||||
@Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String email;
|
||||
@Schema(description = "电话前缀")
|
||||
private String phonePrefix;
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
@Schema(description = "角色ID集合", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Long> roleIds;
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean enable;
|
||||
}
|
||||
|
@ -1,14 +1,17 @@
|
||||
package io.dataease.api.permissions.user.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@Schema(description = "用户编辑器")
|
||||
@Data
|
||||
public class UserEditor extends UserCreator{
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1580870660998152922L;
|
||||
|
||||
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
}
|
||||
|
@ -2,19 +2,25 @@ package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "当前登录人信息VO")
|
||||
@Data
|
||||
public class CurUserVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1190164294672439979L;
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
@Schema(description = "组织ID")
|
||||
private Long oid;
|
||||
@Schema(description = "语言")
|
||||
private String language;
|
||||
}
|
||||
|
@ -2,28 +2,38 @@ package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "用户详情VO")
|
||||
@Data
|
||||
public class UserFormVO implements Serializable {
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "账号")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "角色ID集合")
|
||||
private List<String> roleIds;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Boolean enable;
|
||||
|
||||
@Schema(description = "电话前缀")
|
||||
private String phonePrefix;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "角色项")
|
||||
@Data
|
||||
public class UserGridRoleItem {
|
||||
|
||||
@Schema(description = "角色ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "角色名称")
|
||||
private String name;
|
||||
}
|
||||
|
@ -2,25 +2,28 @@ package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "用户列表VO")
|
||||
@Data
|
||||
public class UserGridVO {
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "账号")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "角色")
|
||||
private List<UserGridRoleItem> roleItems;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private Boolean enable;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "批量导入结果")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ -14,10 +16,11 @@ public class UserImportVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3371025717928287780L;
|
||||
|
||||
@Schema(description = "数据标志")
|
||||
private String dataKey;
|
||||
|
||||
@Schema(description = "成功数量")
|
||||
private int successCount;
|
||||
|
||||
@Schema(description = "失败数量")
|
||||
private int errorCount;
|
||||
|
||||
public UserImportVO(String dataKey) {
|
||||
|
@ -2,17 +2,21 @@ package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "用户概要")
|
||||
@Data
|
||||
public class UserItem implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3423336650739339624L;
|
||||
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
@Schema(description = "用户ID")
|
||||
private Long id;
|
||||
@Schema(description = "用户名称")
|
||||
private String name;
|
||||
}
|
||||
|
@ -2,22 +2,25 @@ package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "用户项VO")
|
||||
@Data
|
||||
public class UserItemVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -311077645822242697L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "账号")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.auth.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "Token VO")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ -14,7 +16,9 @@ public class TokenVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 564596240616527258L;
|
||||
|
||||
@Schema(description = "token")
|
||||
private String token;
|
||||
|
||||
@Schema(description = "有效期")
|
||||
private Long exp;
|
||||
}
|
||||
|
@ -54,7 +54,11 @@ public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi systemApi() {
|
||||
return GroupedOpenApi.builder().group("系统管理").packagesToScan("io.dataease.xpack.permissions.auth").build();
|
||||
return GroupedOpenApi.builder().group("权限相关xpack").packagesToScan("io.dataease.xpack.permissions").build();
|
||||
}
|
||||
@Bean
|
||||
public GroupedOpenApi baseXpackApi() {
|
||||
return GroupedOpenApi.builder().group("基础xpack").packagesToScan("io.dataease.xpack.base").build();
|
||||
}
|
||||
@Bean
|
||||
public GroupedOpenApi visualizationApi() {
|
||||
|
@ -1,14 +1,17 @@
|
||||
package io.dataease.model;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "关键紫过滤器")
|
||||
@Data
|
||||
public class KeywordRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3038086304525253475L;
|
||||
@Schema(description = "关键字")
|
||||
private String keyword;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user