Skip to content

Commit

Permalink
docs: 完善公共模块相关接口文档信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Aug 14, 2023
1 parent 90af86a commit 190385e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ public class BaseDetailVO extends BaseVO {
/**
* 修改人
*/
@Schema(description = "修改人")
@Schema(description = "修改人", example = "李四")
@ExcelProperty(value = "修改人")
private String updateUserString;

/**
* 修改时间
*/
@Schema(description = "修改时间")
@Schema(description = "修改时间", example = "2023-08-08 08:08:08")
@ExcelProperty(value = "修改时间")
private LocalDateTime updateTime;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class BaseVO implements Serializable {
/**
* ID
*/
@Schema(description = "ID")
@Schema(description = "ID", example = "1")
@ExcelProperty(value = "ID")
private Long id;

Expand All @@ -54,14 +54,14 @@ public class BaseVO implements Serializable {
/**
* 创建人
*/
@Schema(description = "创建人")
@Schema(description = "创建人", example = "超级管理员")
@ExcelProperty(value = "创建人")
private String createUserString;

/**
* 创建时间
*/
@Schema(description = "创建时间")
@Schema(description = "创建时间", example = "2023-08-08 08:08:08")
@ExcelProperty(value = "创建时间")
private LocalDateTime createTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class SortQuery implements Serializable {
/**
* 排序条件
*/
@Schema(description = "排序条件", example = "sort=published,desc&sort=title,asc")
@Schema(description = "排序条件", example = "createTime,desc")
private String[] sort;

/**
Expand All @@ -61,15 +61,15 @@ public Sort getSort() {

List<Sort.Order> orders = new ArrayList<>(sort.length);
if (StrUtil.contains(sort[0], StringConsts.COMMA)) {
// e.g "sort=published,desc&sort=title,asc"
// e.g "sort=createTime,desc&sort=name,asc"
for (String s : sort) {
List<String> sortList = StrUtil.splitTrim(s, StringConsts.COMMA);
Sort.Order order =
new Sort.Order(Sort.Direction.valueOf(sortList.get(1).toUpperCase()), sortList.get(0));
orders.add(order);
}
} else {
// e.g "sort=published,desc"
// e.g "sort=createTime,desc"
Sort.Order order = new Sort.Order(Sort.Direction.valueOf(sort[1].toUpperCase()), sort[0]);
orders.add(order);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class UpdateStatusRequest implements Serializable {
/**
* 状态(1启用 2禁用)
*/
@Schema(description = "状态(1启用 2禁用)", type = "Integer", allowableValues = {"1", "2"})
@Schema(description = "状态(1启用 2禁用)", type = "Integer", allowableValues = {"1", "2"}, example = "1")
@NotNull(message = "状态非法")
private DisEnableStatusEnum status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ public class CaptchaVO implements Serializable {
/**
* 验证码标识
*/
@Schema(description = "验证码标识")
@Schema(description = "验证码标识", example = "8a5a0296acd141a8b1bd789da867bc1a")
private String uuid;

/**
* 验证码图片(Base64编码,带图片格式:data:image/gif;base64)
*/
@Schema(description = "验证码图片(Base64编码,带图片格式:data:image/gif;base64)")
@Schema(description = "验证码图片(Base64编码,带图片格式:data:image/gif;base64)",
example = "data:image/png;base64,iVBORw0KGgoAAAAN...")
private String img;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ public class LabelValueVO<V> implements Serializable {
/**
* 标签
*/
@Schema(description = "标签")
@Schema(description = "标签", example = "男")
private String label;

/**
* 值
*/
@Schema(description = "值")
@Schema(description = "值", example = "1")
private V value;

public LabelValueVO(String label, V value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ public R<PageDataVO<TableVO>> pageTable(TableQuery query, @Validated PageQuery p
@Parameters({
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user",
in = ParameterIn.PATH),
@Parameter(name = "requireSync", description = "是否需要同步", example = "true",
in = ParameterIn.QUERY)})
@Parameter(name = "requireSync", description = "是否需要同步", example = "true", in = ParameterIn.QUERY)})
@GetMapping("/field/{tableName}")
public R<List<FieldConfigDO>> listFieldConfig(@PathVariable String tableName,
@RequestParam(required = false, defaultValue = "false") Boolean requireSync) {
Expand Down

0 comments on commit 190385e

Please sign in to comment.