From b87056848313690690145fb363fe4d080b63942f Mon Sep 17 00:00:00 2001 From: oyo Date: Thu, 18 Sep 2025 11:52:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20knowledge.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- knowledge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge.md b/knowledge.md index 4e85086..85edd11 100644 --- a/knowledge.md +++ b/knowledge.md @@ -516,7 +516,7 @@ TOCO中判断使用方式的步骤: * **类路径:** `**.entrance.web.vo` 包路径下 * **唯一标识符位置:** 类注解@AutoGenerated中指定,uuid规则:${VO在TOCO中的uuid}|VO|DEFINITION - **Converter** - * **生成产物:** controller层生成Java类(**有派生源**的VO才有Converter)和基类 + * **生成产物:** controller层生成Java类(**有派生源**的VO才有Converter,无根VO没有Converter)和基类 * **命名规则:** 实现类名以Converter结尾(${VoName}Converter),基类名以BaseConverter结尾(${VoName}BaseConverter) * **类路径:** `**.entrance.web.converter` 包路径下 * **职责:** 把DTO转换成VO;Converter含2种convert方法:1.基础convert方法,从DTO转换为VO,仅转换结构,方法命名为convertTo${VoName}、convertTo${VoName}List、convertTo${VoName}Map,其中**Map转换方法**为底层批量方法,单个和列表convert方法都通过**调用Map方法**实现;2.带数据拼装逻辑的convert方法,内部调用基础convert方法从DTO转换为VO,然后根据外键获取拼装最终数据,方法命名为convertAndAssembleData、convertAndAssembleDataList