mirror of https://gitee.com/y_project/RuoYi.git
批量替换表前缀调整
parent
9247e004d0
commit
ca6a4b2ecf
|
@ -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…
Reference in New Issue