diff --git a/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java b/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java index 82efd2af4df675ec47db5d610112d03bcc87a79d..b569128dbc6c37b48af92f14c78ad7a9f47fec2d 100644 --- a/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java +++ b/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java @@ -32,6 +32,7 @@ import java.util.stream.Collectors; public class FullTextIndexHandlerFactory extends ModuleInitializedListenerBase { private static final Map componentMap = new HashMap<>(); private static final List fullTextIndexTypeList = new ArrayList<>(); + private static final Map fullTextIndexTypeMap = new HashMap<>(); public static IFullTextIndexHandler getHandler(String type) { @@ -70,6 +71,12 @@ public class FullTextIndexHandlerFactory extends ModuleInitializedListenerBase { for (ModuleVo moduleVo : moduleList) { returnTypeList.addAll(fullTextIndexTypeList.stream().filter(type -> type.getModuleId().equals(moduleVo.getId())).collect(Collectors.toList())); } + for (FullTextIndexTypeVo typeVo : returnTypeList) { + IFullTextIndexType fullTextIndexType = fullTextIndexTypeMap.get(typeVo.getType()); + if (fullTextIndexType != null) { + typeVo.setTypeName(fullTextIndexType.getTypeName()); + } + } return returnTypeList; } @@ -104,6 +111,7 @@ public class FullTextIndexHandlerFactory extends ModuleInitializedListenerBase { if (component.getType() != null) { componentMap.put(component.getType().getType(), component); fullTextIndexTypeList.add(new FullTextIndexTypeVo(context.getModuleId(), component.getType().getType(), component.getType().getTypeName(), component.getType().isActiveGlobalSearch())); + fullTextIndexTypeMap.put(component.getType().getType(), component.getType()); } } } diff --git a/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java b/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java index 03bb7bda3e105c1bb440ab79ac8be3b54a31591a..fc1688856f522f83a69e21d60d06a76e9401de29 100644 --- a/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java +++ b/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java @@ -17,16 +17,15 @@ package neatlogic.framework.fulltextindex.enums; import neatlogic.framework.util.$; -import neatlogic.framework.util.I18n; public enum Status { - DOING("doing", new I18n("重建中")), - DONE("done", new I18n("重建完毕")); + DOING("doing", "nffe.status.doing"), + DONE("done", "nffe.status.done"); private final String value; - private final I18n text; + private final String text; - Status(String _value, I18n _text) { + Status(String _value, String _text) { this.value = _value; this.text = _text; } @@ -36,7 +35,7 @@ public enum Status { } public String getText() { - return $.t(text.toString()); + return $.t(text); } public static String getValue(String _status) {