chore(wiki): address #437 review nits (import convention + English Javadoc)

Pure style cleanup, zero behavior change: replace inline FQN return type in WikiRawMaterialService.listFailures with an import + simple name, and translate the new WikiRawMaterialEntity field Javadocs to English.
This commit is contained in:
倪程伟 2026-06-28 14:24:19 +08:00 committed by GitHub
parent fbbd1218e8
commit 04197d7ba9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 13 deletions

View File

@ -69,36 +69,40 @@ public class WikiRawMaterialEntity {
private String errorMessage; private String errorMessage;
/** /**
* 结构化错误码 {@code WikiProcessingService#classifyErrorCode} 同一词表 * Structured error code, sharing the same vocabulary as
* AUTH_ERROR / BILLING / MODEL_NOT_FOUND / RATE_LIMIT / TIMEOUT / * {@code WikiProcessingService#classifyErrorCode}
* SERVER_ERROR / CONTENT_FILTER / NO_CONTENT / EMPTY_RESULT / UNKNOWN * (AUTH_ERROR / BILLING / MODEL_NOT_FOUND / RATE_LIMIT / TIMEOUT /
* 供前端做本地化的友好提示null 表示无错误 * SERVER_ERROR / CONTENT_FILTER / NO_CONTENT / EMPTY_RESULT / UNKNOWN).
* Used by the frontend for localized friendly messages; null = no error.
*/ */
@TableField(updateStrategy = FieldStrategy.ALWAYS) @TableField(updateStrategy = FieldStrategy.ALWAYS)
private String errorCode; private String errorCode;
/** /**
* 非阻断告警码材料整体处理成功completed/partial但某个异步子步骤 * Non-blocking warning code: the material was processed successfully
* 向量化 embedding / 实体图抽取失败导致功能降级如无法语义检索 * overall (completed/partial), but an async sub-step (embedding /
* {@link #errorCode} 同一友好提示机制null 表示无告警 * entity-graph extraction) failed causing a degraded feature (e.g. no
* semantic search). Shares the same friendly-prompt mechanism as
* {@link #errorCode}; null = no warning.
*/ */
@TableField(updateStrategy = FieldStrategy.ALWAYS) @TableField(updateStrategy = FieldStrategy.ALWAYS)
private String warningCode; private String warningCode;
/** 告警原始文本(供排查),与 {@link #warningCode} 配套。 */ /** Raw warning text (for troubleshooting), paired with {@link #warningCode}. */
@TableField(updateStrategy = FieldStrategy.ALWAYS) @TableField(updateStrategy = FieldStrategy.ALWAYS)
private String warningMessage; private String warningMessage;
/** /**
* RFC-012 M2 v2 UI当前处理阶段null 未开始 / "route" / "phase-b" / "done" * RFC-012 M2 v2 UI: current processing phase (null = not started /
* 供前端决定是否显示进度条以及显示"准备中"还是具体进度 * "route" / "phase-b" / "done"). Drives whether the frontend shows a
* progress bar and whether it says "preparing" or a concrete percentage.
*/ */
private String progressPhase; private String progressPhase;
/** RFC-012 M2 v2 UI本次处理计划的总页数route 阶段确定后写入)。 */ /** RFC-012 M2 v2 UI: total pages planned for this run (set after route phase). */
private Integer progressTotal; private Integer progressTotal;
/** RFC-012 M2 v2 UI:已完成的页数(每个 phase B 页成功后 +1 */ /** RFC-012 M2 v2 UI: completed page count (incremented per successful phase-B page). */
private Integer progressDone; private Integer progressDone;
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)

View File

@ -22,6 +22,7 @@ import java.nio.charset.StandardCharsets;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.util.HexFormat; import java.util.HexFormat;
import java.util.List; import java.util.List;
import vip.mate.wiki.dto.WikiFailureItem;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@ -515,7 +516,7 @@ public class WikiRawMaterialService {
} }
/** Cross-KB list of materials needing operator attention, newest first (capped). */ /** Cross-KB list of materials needing operator attention, newest first (capped). */
public java.util.List<vip.mate.wiki.dto.WikiFailureItem> listFailures(int limit) { public List<WikiFailureItem> listFailures(int limit) {
return rawMapper.listFailures(Math.max(1, Math.min(limit, 500))); return rawMapper.listFailures(Math.max(1, Math.min(limit, 500)));
} }