后面显示编号的,去掉括号前的空格

This commit is contained in:
thinkgem
2024-04-19 19:03:55 +08:00
parent 132ff7a58d
commit 5c54c1aae4

View File

@@ -409,7 +409,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
if ("true".equals(isShowCode) || "1".equals(isShowCode)) {
return "(" + code + ") " + StringUtils.replace(name, SPACE, EMPTY);
} else if ("2".equals(isShowCode)) {
return name + " (" + code + ")";
return defaultIfBlank(name, EMPTY) + "(" + code + ")";
} else {
return name;
}