docs: 完善接口文档信息
This commit is contained in:
parent
5e7ba01a18
commit
58e838d5f9
@ -41,7 +41,7 @@ public class UpdateStatusRequest implements Serializable {
|
||||
/**
|
||||
* 状态(1启用 2禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1启用 2禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
@NotNull(message = "状态非法")
|
||||
private DisEnableStatusEnum status;
|
||||
}
|
||||
|
@ -40,14 +40,14 @@ public class AnnouncementQuery implements Serializable {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题")
|
||||
@Schema(description = "标题", example = "这是公告标题")
|
||||
@Query(type = QueryTypeEnum.INNER_LIKE)
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 类型(1:活动,2:消息,3:通知)
|
||||
*/
|
||||
@Schema(description = "类型(1:活动,2:消息,3:通知)")
|
||||
@Schema(description = "类型(1:活动,2:消息,3:通知)", example = "1")
|
||||
@Query(type = QueryTypeEnum.EQUAL)
|
||||
private Integer type;
|
||||
}
|
@ -44,7 +44,7 @@ public class AnnouncementRequest extends BaseRequest {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题")
|
||||
@Schema(description = "标题", example = "这是公告标题")
|
||||
@NotBlank(message = "标题不能为空")
|
||||
@Length(max = 255, message = "标题长度不能超过 {max} 个字符")
|
||||
private String title;
|
||||
@ -52,27 +52,27 @@ public class AnnouncementRequest extends BaseRequest {
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@Schema(description = "内容")
|
||||
@Schema(description = "内容", example = "这是公告内容")
|
||||
@NotBlank(message = "内容不能为空")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Schema(description = "类型")
|
||||
@Schema(description = "类型", type = "Integer", allowableValues = {"1", "2", "3"}, example = "1")
|
||||
@NotNull(message = "类型非法")
|
||||
private AnnouncementTypeEnum type;
|
||||
|
||||
/**
|
||||
* 生效时间
|
||||
*/
|
||||
@Schema(description = "生效时间")
|
||||
@Schema(description = "生效时间", example = "2023-08-08 00:00:00")
|
||||
private LocalDateTime effectiveTime;
|
||||
|
||||
/**
|
||||
* 终止时间
|
||||
*/
|
||||
@Schema(description = "终止时间")
|
||||
@Schema(description = "终止时间", example = "2023-08-08 23:59:59")
|
||||
@Future(message = "终止时间必须是未来时间")
|
||||
private LocalDateTime terminateTime;
|
||||
}
|
@ -75,7 +75,7 @@ public class DeptRequest extends BaseRequest {
|
||||
/**
|
||||
* 状态(1启用 2禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1启用 2禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
|
@ -44,7 +44,7 @@ public class MenuRequest extends BaseRequest {
|
||||
/**
|
||||
* 菜单类型(1目录 2菜单 3按钮)
|
||||
*/
|
||||
@Schema(description = "菜单类型(1目录 2菜单 3按钮)", type = "Integer", allowableValues = {"1", "2", "3"}, example = "2")
|
||||
@Schema(description = "菜单类型(1:目录,2:菜单,3:按钮)", type = "Integer", allowableValues = {"1", "2", "3"}, example = "2")
|
||||
@NotNull(message = "菜单类型非法")
|
||||
private MenuTypeEnum type;
|
||||
|
||||
@ -120,6 +120,6 @@ public class MenuRequest extends BaseRequest {
|
||||
/**
|
||||
* 状态(1启用 2禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1启用 2禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
private DisEnableStatusEnum status;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class UpdateBasicInfoRequest implements Serializable {
|
||||
/**
|
||||
* 性别(0未知 1男 2女)
|
||||
*/
|
||||
@Schema(description = "性别(0未知 1男 2女)", type = "Integer", allowableValues = {"0", "1", "2"}, example = "1")
|
||||
@Schema(description = "性别(0:未知,1:男,2:女)", type = "Integer", allowableValues = {"0", "1", "2"}, example = "1")
|
||||
@NotNull(message = "性别非法")
|
||||
private GenderEnum gender;
|
||||
}
|
||||
|
@ -45,12 +45,12 @@ public class AnnouncementDashboardVO implements Serializable {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题", example = "这是标题")
|
||||
@Schema(description = "标题", example = "这是公告标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Schema(description = "类型")
|
||||
@Schema(description = "类型", type = "Integer", allowableValues = {"1", "2", "3"}, example = "1")
|
||||
private AnnouncementTypeEnum type;
|
||||
}
|
@ -26,6 +26,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import top.charles7c.cnadmin.common.base.BaseDetailVO;
|
||||
import top.charles7c.cnadmin.common.config.easyexcel.ExcelBaseEnumConverter;
|
||||
import top.charles7c.cnadmin.system.enums.AnnouncementTypeEnum;
|
||||
|
||||
/**
|
||||
@ -44,34 +45,35 @@ public class AnnouncementDetailVO extends BaseDetailVO {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题")
|
||||
@Schema(description = "标题", example = "这是公告标题")
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@Schema(description = "内容")
|
||||
@Schema(description = "内容", example = "这是公告内容")
|
||||
@ExcelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Schema(description = "类型")
|
||||
@Schema(description = "类型", type = "Integer", allowableValues = {"1", "2", "3"}, example = "1")
|
||||
@ExcelProperty(value = "类型", converter = ExcelBaseEnumConverter.class)
|
||||
private AnnouncementTypeEnum type;
|
||||
|
||||
/**
|
||||
* 生效时间
|
||||
*/
|
||||
@Schema(description = "生效时间")
|
||||
@Schema(description = "生效时间", example = "2023-08-08 00:00:00")
|
||||
@ExcelProperty(value = "生效时间")
|
||||
private LocalDateTime effectiveTime;
|
||||
|
||||
/**
|
||||
* 终止时间
|
||||
*/
|
||||
@Schema(description = "终止时间")
|
||||
@Schema(description = "终止时间", example = "2023-08-08 23:59:59")
|
||||
@ExcelProperty(value = "终止时间")
|
||||
private LocalDateTime terminateTime;
|
||||
}
|
@ -40,27 +40,33 @@ public class AnnouncementVO extends BaseVO {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题")
|
||||
@Schema(description = "标题", example = "这是公告标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Schema(description = "类型")
|
||||
@Schema(description = "类型", type = "Integer", allowableValues = {"1", "2", "3"}, example = "1")
|
||||
private AnnouncementTypeEnum type;
|
||||
|
||||
/**
|
||||
* 生效时间
|
||||
*/
|
||||
@Schema(description = "生效时间")
|
||||
@Schema(description = "生效时间", example = "2023-08-08 00:00:00")
|
||||
private LocalDateTime effectiveTime;
|
||||
|
||||
/**
|
||||
* 终止时间
|
||||
*/
|
||||
@Schema(description = "终止时间")
|
||||
@Schema(description = "终止时间", example = "2023-08-08 23:59:59")
|
||||
private LocalDateTime terminateTime;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* @return 公告状态
|
||||
*/
|
||||
@Schema(description = "状态(1:已发布,2:已过期)", example = "1")
|
||||
public Integer getStatus() {
|
||||
int status = 1;
|
||||
if (null != this.effectiveTime) {
|
||||
|
@ -72,14 +72,14 @@ public class DeptDetailVO extends BaseDetailVO {
|
||||
/**
|
||||
* 状态(1:启用,2:禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1:启用,2:禁用)", example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
@ExcelProperty(value = "状态", converter = ExcelBaseEnumConverter.class)
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
* 类型(1:系统内置,2:自定义)
|
||||
*/
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", example = "2")
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", type = "Integer", allowableValues = {"1", "2"}, example = "2")
|
||||
@ExcelProperty(value = "类型", converter = ExcelBaseEnumConverter.class)
|
||||
private DataTypeEnum type;
|
||||
|
||||
|
@ -59,13 +59,13 @@ public class DeptVO extends BaseVO {
|
||||
/**
|
||||
* 状态(1:启用,2:禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1:启用,2:禁用)", example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
* 类型(1:系统内置,2:自定义)
|
||||
*/
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", example = "2")
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", type = "Integer", allowableValues = {"1", "2"}, example = "2")
|
||||
private DataTypeEnum type;
|
||||
|
||||
/**
|
||||
|
@ -81,7 +81,7 @@ public class MenuVO extends BaseVO {
|
||||
/**
|
||||
* 状态(1:启用,2:禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1:启用,2:禁用)", example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
@ExcelProperty(value = "状态", converter = ExcelBaseEnumConverter.class)
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
@ -123,7 +123,7 @@ public class MenuVO extends BaseVO {
|
||||
/**
|
||||
* 菜单类型(1:目录,2:菜单,3:按钮)
|
||||
*/
|
||||
@Schema(description = "菜单类型(1:目录,2:菜单,3:按钮)", example = "2")
|
||||
@Schema(description = "菜单类型(1:目录,2:菜单,3:按钮)", type = "Integer", allowableValues = {"1", "2", "3"}, example = "2")
|
||||
@ExcelProperty(value = "菜单类型", converter = ExcelBaseEnumConverter.class)
|
||||
private MenuTypeEnum type;
|
||||
|
||||
|
@ -61,7 +61,8 @@ public class RoleDetailVO extends BaseDetailVO {
|
||||
/**
|
||||
* 数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)
|
||||
*/
|
||||
@Schema(description = "数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)", example = "5")
|
||||
@Schema(description = "数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)", type = "Integer",
|
||||
allowableValues = {"1", "2", "3", "4", "5"}, example = "5")
|
||||
@ExcelProperty(value = "数据权限", converter = ExcelBaseEnumConverter.class)
|
||||
private DataScopeEnum dataScope;
|
||||
|
||||
|
@ -52,7 +52,8 @@ public class RoleVO extends BaseVO {
|
||||
/**
|
||||
* 数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)
|
||||
*/
|
||||
@Schema(description = "数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)", example = "5")
|
||||
@Schema(description = "数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)", type = "Integer",
|
||||
allowableValues = {"1", "2", "3", "4", "5"}, example = "5")
|
||||
private DataScopeEnum dataScope;
|
||||
|
||||
/**
|
||||
@ -64,13 +65,13 @@ public class RoleVO extends BaseVO {
|
||||
/**
|
||||
* 状态(1:启用,2:禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1:启用,2:禁用)", example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
* 类型(1:系统内置,2:自定义)
|
||||
*/
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", example = "2")
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", type = "Integer", allowableValues = {"1", "2"}, example = "2")
|
||||
private DataTypeEnum type;
|
||||
|
||||
/**
|
||||
|
@ -64,7 +64,7 @@ public class UserDetailVO extends BaseDetailVO {
|
||||
/**
|
||||
* 性别(0:未知,1:男,2:女)
|
||||
*/
|
||||
@Schema(description = "性别(0:未知,1:男,2:女)", example = "1")
|
||||
@Schema(description = "性别(0:未知,1:男,2:女)", type = "Integer", allowableValues = {"0", "1", "2"}, example = "1")
|
||||
@ExcelProperty(value = "性别", converter = ExcelBaseEnumConverter.class)
|
||||
private GenderEnum gender;
|
||||
|
||||
@ -93,14 +93,14 @@ public class UserDetailVO extends BaseDetailVO {
|
||||
/**
|
||||
* 状态(1:启用,2:禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1:启用,2:禁用)", example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
@ExcelProperty(value = "状态", converter = ExcelBaseEnumConverter.class)
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
* 类型(1:系统内置,2:自定义)
|
||||
*/
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", example = "2")
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", type = "Integer", allowableValues = {"1", "2"}, example = "2")
|
||||
@ExcelProperty(value = "类型", converter = ExcelBaseEnumConverter.class)
|
||||
private DataTypeEnum type;
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class UserVO extends BaseVO {
|
||||
/**
|
||||
* 性别(0:未知,1:男,2:女)
|
||||
*/
|
||||
@Schema(description = "性别(0:未知,1:男,2:女)", example = "1")
|
||||
@Schema(description = "性别(0:未知,1:男,2:女)", type = "Integer", allowableValues = {"0", "1", "2"}, example = "1")
|
||||
private GenderEnum gender;
|
||||
|
||||
/**
|
||||
@ -82,13 +82,13 @@ public class UserVO extends BaseVO {
|
||||
/**
|
||||
* 状态(1:启用,2:禁用)
|
||||
*/
|
||||
@Schema(description = "状态(1:启用,2:禁用)", example = "1")
|
||||
@Schema(description = "状态(1:启用,2:禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
* 类型(1:系统内置,2:自定义)
|
||||
*/
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", example = "2")
|
||||
@Schema(description = "类型(1:系统内置,2:自定义)", type = "Integer", allowableValues = {"1", "2"}, example = "2")
|
||||
private DataTypeEnum type;
|
||||
|
||||
/**
|
||||
|
@ -122,13 +122,14 @@ public class FieldConfigDO implements Serializable {
|
||||
/**
|
||||
* 表单类型
|
||||
*/
|
||||
@Schema(description = "表单类型", example = "1")
|
||||
@Schema(description = "表单类型", type = "Integer", allowableValues = {"1", "2", "3", "4", "5", "6"}, example = "1")
|
||||
private FormTypeEnum formType;
|
||||
|
||||
/**
|
||||
* 查询方式
|
||||
*/
|
||||
@Schema(description = "查询方式", example = "1")
|
||||
@Schema(description = "查询方式", type = "Integer",
|
||||
allowableValues = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14"}, example = "1")
|
||||
private QueryTypeEnum queryType;
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,9 @@ springdoc:
|
||||
packages-to-scan: ${project.basePackage}.webapi.controller.auth
|
||||
- group: 'common'
|
||||
display-name: '通用接口'
|
||||
paths-to-match: '/common/**'
|
||||
paths-to-match:
|
||||
- '/common/**'
|
||||
- '/dashboard/**'
|
||||
packages-to-scan: ${project.basePackage}.webapi.controller.common
|
||||
- group: 'system'
|
||||
display-name: '系统管理'
|
||||
|
Loading…
Reference in New Issue
Block a user