批量替换表前缀调整

dep_wangsr
RuoYi 5 years ago committed by Limy
parent 3483db5a45
commit a8e07dbe15

@ -5778,7 +5778,7 @@ td.visible-lg {
display: table-cell !important; display: table-cell !important;
} }
} }
.hidden-xs { .summernote .hidden-xs {
display: block !important; display: block !important;
} }
tr.hidden-xs { tr.hidden-xs {

@ -166,12 +166,32 @@ public class GenUtils
if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix))
{ {
String[] searchList = StringUtils.split(tablePrefix, ","); String[] searchList = StringUtils.split(tablePrefix, ",");
String[] replacementList = emptyList(searchList.length); tableName = replaceFirst(tableName, searchList);
tableName = StringUtils.replaceEach(tableName, searchList, replacementList);
} }
return StringUtils.convertToCamelCase(tableName); return StringUtils.convertToCamelCase(tableName);
} }
/**
*
*
* @param replacementm
* @param searchList
* @return
*/
public static String replaceFirst(String replacementm, String[] searchList)
{
String text = replacementm;
for (String searchString : searchList)
{
if (replacementm.startsWith(searchString))
{
text = replacementm.replaceFirst(searchString, "");
break;
}
}
return text;
}
/** /**
* *
* *

Loading…
Cancel
Save