update 优化代码注释

This commit is contained in:
疯狂的狮子Li
2026-05-15 14:32:59 +08:00
parent bf70c2c673
commit 70dacfb379
48 changed files with 1868 additions and 272 deletions
@@ -29,11 +29,25 @@ public class CategoryNameTranslationImpl implements TranslationInterface<String>
private final IFlwCategoryService flwCategoryService;
/**
* 将流程分类 ID 翻译为分类名称。
*
* @param key 流程分类 ID
* @param other 额外参数
* @return 流程分类名称
*/
@Override
public String translation(Object key, String other) {
return flwCategoryService.selectCategoryNameById(Convert.toLong(key));
}
/**
* 批量将流程分类 ID 翻译为分类名称。
*
* @param keys 流程分类 ID 集合
* @param other 额外参数
* @return 流程分类 ID 与分类名称映射
*/
@Override
public Map<Object, String> translationBatch(Set<Object> keys, String other) {
Set<Long> categoryIds = collectLongIds(keys);
@@ -48,6 +62,13 @@ public class CategoryNameTranslationImpl implements TranslationInterface<String>
return result;
}
/**
* 根据原始键构建流程分类名称翻译值。
*
* @param source 原始键
* @param categoryNames 流程分类 ID 与分类名称映射
* @return 流程分类名称
*/
private String buildValue(Object source, Map<Long, String> categoryNames) {
if (source instanceof String ids) {
return joinMappedValues(ids, categoryNames::get);