方法补充static

main
yushun.ding 2023-03-25 21:12:22 +08:00
parent 4615e23317
commit 3c49ade7b4
1 changed files with 6 additions and 6 deletions

View File

@ -3878,8 +3878,8 @@ public class Util extends weaver.general.Util {
* @param newName * @param newName
* @param lanuage 7 8 9 * @param lanuage 7 8 9
*/ */
public String moreLanugageHandler(String oldName, String newName, String lanuage) { public static String moreLanugageHandler(String oldName, String newName, String lanuage) {
List languageIds = weaver.general.Util.getActiveLanguageIds();//获取系统支持的多语言 List languageIds = getActiveLanguageIds();//获取系统支持的多语言
String newMoreLanuage = ""; String newMoreLanuage = "";
//要按照当前系统支持的多语言id进行拼接处理 //要按照当前系统支持的多语言id进行拼接处理
if (oldName.startsWith("~`~`") && oldName.endsWith("`~`~")) { if (oldName.startsWith("~`~`") && oldName.endsWith("`~`~")) {
@ -3888,13 +3888,13 @@ public class Util extends weaver.general.Util {
//多语言的中间处理 //多语言的中间处理
String tempLanuage = joinLanuage(newName, languageIds); String tempLanuage = joinLanuage(newName, languageIds);
//中间处理转成map //中间处理转成map
Map splitMultilangData = weaver.general.Util.splitMultilangData(tempLanuage); Map splitMultilangData = splitMultilangData(tempLanuage);
Map<String, String> lanuageMap = new HashMap<>(); Map<String, String> lanuageMap = new HashMap<>();
for (Object id : languageIds) { for (Object id : languageIds) {
String labelLanuage = "`~`" + id; String labelLanuage = "`~`" + id;
if (oldName.contains(labelLanuage)) { if (oldName.contains(labelLanuage)) {
//获取过滤的语言name //获取过滤的语言name
String formatLanuageName = weaver.general.Util.formatMultiLang(oldName, String.valueOf(id)); String formatLanuageName = formatMultiLang(oldName, String.valueOf(id));
if (!weaver.general.StringUtil.isEmpty(formatLanuageName)) { if (!weaver.general.StringUtil.isEmpty(formatLanuageName)) {
lanuageMap.put(String.valueOf(id), formatLanuageName); lanuageMap.put(String.valueOf(id), formatLanuageName);
} }
@ -3911,7 +3911,7 @@ public class Util extends weaver.general.Util {
splitMultilangData.put(entry.getKey(), entry.getValue()); splitMultilangData.put(entry.getKey(), entry.getValue());
} }
} }
newMoreLanuage = weaver.general.Util.stitchMultilangData(splitMultilangData); newMoreLanuage = stitchMultilangData(splitMultilangData);
} else { } else {
//要根据系统支持的语言进行拼接 //要根据系统支持的语言进行拼接
newMoreLanuage = joinLanuage(newName, languageIds); newMoreLanuage = joinLanuage(newName, languageIds);
@ -3926,7 +3926,7 @@ public class Util extends weaver.general.Util {
* @param languageIds * @param languageIds
* @return * @return
*/ */
public String joinLanuage(String newName, List languageIds) { public static String joinLanuage(String newName, List languageIds) {
StringBuilder supportLanuage = new StringBuilder(); StringBuilder supportLanuage = new StringBuilder();
supportLanuage.append("~`~`"); supportLanuage.append("~`~`");
languageIds.forEach(id -> { languageIds.forEach(id -> {