docs: 完善接口文档信息

This commit is contained in:
Charles7c 2023-08-23 21:44:12 +08:00
parent 5e7ba01a18
commit 58e838d5f9
18 changed files with 55 additions and 42 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
/**

View File

@ -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;
}

View File

@ -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未知12女)", type = "Integer", allowableValues = {"0", "1", "2"}, example = "1")
@NotNull(message = "性别非法")
private GenderEnum gender;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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) {

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -64,7 +64,7 @@ public class UserDetailVO extends BaseDetailVO {
/**
* 性别0未知12
*/
@Schema(description = "性别0未知12", example = "1")
@Schema(description = "性别0未知12", 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;

View File

@ -57,7 +57,7 @@ public class UserVO extends BaseVO {
/**
* 性别0未知12
*/
@Schema(description = "性别0未知12", example = "1")
@Schema(description = "性别0未知12", 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;
/**

View File

@ -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;
/**

View File

@ -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: '系统管理'