docs 补充项目注释

This commit is contained in:
AprilWind
2026-06-01 11:50:59 +08:00
parent 941c0b9032
commit 107d3326b4
66 changed files with 1079 additions and 110 deletions
-6
View File
@@ -16,17 +16,11 @@
</description>
<modules>
<!-- demo模块 -->
<module>ruoyi-demo</module>
<!-- 代码生成模块 -->
<module>ruoyi-gen</module>
<!-- 调度任务模块 -->
<module>ruoyi-job</module>
<!-- 系统模块 -->
<module>ruoyi-system</module>
<!-- 工作流模块 -->
<module>ruoyi-workflow</module>
<!-- AI业务模块 -->
<module>ruoyi-ai</module>
</modules>
@@ -160,21 +160,51 @@ public class TestExcelController {
return excelResult.getList();
}
/**
* 多列表模板填充测试对象。
*/
@Data
@AllArgsConstructor
static class TestObj1 {
/**
* 测试字段1。
*/
private String test1;
/**
* 测试字段2。
*/
private String test2;
/**
* 测试字段3。
*/
private String test3;
}
/**
* 单列表模板填充测试对象。
*/
@Data
@AllArgsConstructor
static class TestObj {
/**
* 名称。
*/
private String name;
/**
* 列表字段1。
*/
private String list1;
/**
* 列表字段2。
*/
private String list2;
/**
* 列表字段3。
*/
private String list3;
/**
* 列表字段4。
*/
private String list4;
}
@@ -58,12 +58,21 @@ public class TestI18nController {
return R.ok(bo);
}
/**
* 国际化 Bean 校验测试对象。
*/
@Data
public static class TestI18nBo {
/**
* 名称。
*/
@NotBlank(message = "{not.null}")
private String name;
/**
* 年龄。
*/
@NotNull(message = "{not.null}")
@Range(min = 0, max = 100, message = "{length.not.valid}")
private Integer age;
@@ -38,6 +38,9 @@ public class TestSensitiveController extends BaseController {
return R.ok(testSensitive);
}
/**
* 脱敏测试对象。
*/
@Data
static class TestSensitive {
@@ -457,6 +457,13 @@ public class GenTableServiceImpl implements IGenTableService {
return new RenderContext(table, context, templates);
}
/**
* 模板渲染上下文。
*
* @param table 生成表信息
* @param context 模板上下文
* @param templates 待渲染模板
*/
private record RenderContext(GenTable table, Dict context, List<PathNamedTemplate> templates) {
}
@@ -627,4 +634,3 @@ public class GenTableServiceImpl implements IGenTableService {
}
}
@@ -103,6 +103,12 @@ public class DeptExcelConverter implements Converter<Long> {
return new WriteCellData<>(deptName);
}
/**
* 部门导入导出映射缓存。
*
* @param idToName 部门 ID 到部门名称的映射
* @param nameToId 部门名称到部门 ID 的映射
*/
private record DeptMaps(Map<Long, String> idToName, Map<String, Long> nameToId) {
}
@@ -42,6 +42,9 @@ public enum MessageTypeEnum {
*/
private final String desc;
/**
* 消息类型编码缓存。
*/
private static final Map<String, MessageTypeEnum> MESSAGE_TYPE_ENUM_MAP = Arrays.stream(values())
.collect(Collectors.toConcurrentMap(MessageTypeEnum::getCode, Function.identity()));
@@ -56,4 +59,3 @@ public enum MessageTypeEnum {
}
}
@@ -47,6 +47,9 @@ public enum TaskOperationEnum {
*/
private final String desc;
/**
* 操作编码缓存。
*/
private static final Map<String, TaskOperationEnum> CODE_MAP = Arrays.stream(values())
.collect(Collectors.toConcurrentMap(TaskOperationEnum::getCode, Function.identity()));
@@ -87,6 +87,9 @@ public enum TaskStatusEnum {
*/
private final String desc;
/**
* 状态编码与描述缓存。
*/
private static final Map<String, String> STATUS_DESC_MAP = Arrays.stream(values())
.collect(Collectors.toConcurrentMap(TaskStatusEnum::getStatus, TaskStatusEnum::getDesc));
@@ -112,4 +115,3 @@ public enum TaskStatusEnum {
}
}